[13.0] [MIG] agreement -> base_contract#397
Conversation
requested by @bealdav
[UPD] README.rst
Currently translated at 100.0% (27 of 27 strings) Translation: contract-12.0/contract-12.0-agreement Translate-URL: https://translation.odoo-community.org/projects/contract-12-0/contract-12-0-agreement/pt_PT/
we move the is_template field definition and the agreement.type model from the agreement_legal module to the agreement module. The fields are not displayed by default, unless the feature is enabled through a technical feature group, this is configurable in the agreement_sale module (because agreement in itself has no UI, and agreement_legal enables the feature by default)
|
@i-vyshnevska Please have a look at #386 |
|
@i-vyshnevska can you rename the module base_contract? |
7aeec7c to
9baa5bf
Compare
|
Do we finally have an agreement - hehe - on the renaming? |
jgrandguillaume
left a comment
There was a problem hiding this comment.
Work well on functional side
| company_id = fields.Many2one( | ||
| "res.company", | ||
| string="Company", | ||
| default=lambda self: self.env["res.company"]._company_default_get(), |
There was a problem hiding this comment.
_company_default_get() should be removed: https://github.com/odoo/odoo/blob/58492733b81073694a7e2f5e790b31983f91df7d/odoo/addons/base/models/res_company.py#L205
It shows a warning at loading of the module.
| default=lambda self: self.env["res.company"]._company_default_get(), | |
| default=lambda self: self.env.company.id, |
| <field name="agreement_type_id" | ||
| groups="agreement.group_use_agreement_type"/> | ||
| <field name="is_template" groups="agreement.group_use_agreement_template"/> |
There was a problem hiding this comment.
Warnings:
2020-05-06 13:44:29,775 115 WARNING odoodb odoo.addons.base.models.ir_ui_view: The group agreement.group_use_agreement_type defined in view agreement.form does not exist!
2020-05-06 13:44:29,776 115 WARNING odoodb odoo.addons.base.models.ir_ui_view: The group agreement.group_use_agreement_template defined in view agreement.form does not exist!
| <field name="agreement_type_id" | |
| groups="agreement.group_use_agreement_type"/> | |
| <field name="is_template" groups="agreement.group_use_agreement_template"/> | |
| <field name="agreement_type_id" | |
| groups="base_contract.group_use_agreement_type"/> | |
| <field name="is_template" groups="base_contract.group_use_agreement_template"/> |
I didn't check for other places
Replace deprecated _company_default_get() by standard v13 syntax Add domain field Add chatter on agreement object
|
I fixed and improved several points in this PR via a PR on @i-vyshnevska 's branch i-vyshnevska#1 |
|
What's the progress on this one? Is there still something todo or does it just need some more reviews? |
base_contract: Improve your OCA PR
Chabagutor
left a comment
There was a problem hiding this comment.
Tested and installed for prodution purpose.
|
This is ready to be merged. @sbejaoui 's comment is one year old and he asks to take into account the roadmap discussion, and it's precisely what has been implemented here. So let's move on and merge. |
|
There is something I don't understand with "pre-commit run -a" : when I run it on this branch, it doesn't change anything... although Travis complains about black/isort stuff. |
|
@alexis-via probably you should try to rebase this branch on 13.0 before trying your local precommit. compare: Is it clearer now? |
|
A few days ago, I created another PR to replace this one: #578 |
|
@i-vyshnevska please close this pr supersede #628 |
migrate agreement