-
-
Notifications
You must be signed in to change notification settings - Fork 529
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[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? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please consider the discussion about 13.0 road-map #386
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Work well on functional side
base_contract/models/agreement.py
Outdated
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
_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, |
base_contract/views/agreement.xml
Outdated
<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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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