-
-
Notifications
You must be signed in to change notification settings - Fork 868
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
[16.0][MIG] company_default_partner_pricelist #1946
base: 16.0
Are you sure you want to change the base?
[16.0][MIG] company_default_partner_pricelist #1946
Conversation
Odoo standard gives priority to a generic property before using the domain hook to obtain the default pricelist. Therefore, this fix manages the default pricelist in the company by utilizing a generic property.
a382afa
to
ffbfa74
Compare
|
||
@openupgrade.migrate() | ||
def migrate(env, version): | ||
company = env["res.company"] |
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_obj or ResCompany
@openupgrade.migrate() | ||
def migrate(env, version): | ||
company = env["res.company"] | ||
ir_property = env["ir.property"] |
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.
ir_property_obj or IrProperty
company = env["res.company"] | ||
ir_property = env["ir.property"] | ||
field = env["ir.model.fields"]._get("res.partner", "property_product_pricelist") | ||
for record in company.search([]): |
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.
for record in company.search([]): | |
for company in company.search([]): |
Migration to 16.0