-
-
Notifications
You must be signed in to change notification settings - Fork 789
[19.0][MIG] product #5477
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
base: 19.0
Are you sure you want to change the base?
[19.0][MIG] product #5477
Conversation
|
/ocabot migration product |
44a5d66 to
7882bd2
Compare
9366c47 to
7a9d1a8
Compare
7a9d1a8 to
4fa5139
Compare
| FROM product_product, product_template | ||
| WHERE | ||
| product_supplierinfo.product_id=product_product.id |
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.
| FROM product_product, product_template | |
| WHERE | |
| product_supplierinfo.product_id=product_product.id | |
| FROM product_template | |
| WHERE | |
| product_supplierinfo.product_id IS NOT NULL |
| Rename product_packaging here to product_uom, and amend with data in post-migration | ||
| Set uom_id to dummy UOM to have the ORM set up the not null constraint correctly | ||
| """ | ||
| openupgrade.rename_tables(env.cr, [("product_packaging", "product_uom")]) |
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.
call rename_models too.
| # NOTHING TO DO: virtual field only used for searching | ||
|
|
||
| product / product.product / packaging_ids (one2many) : DEL relation: product.packaging | ||
| product / product.product / product_uom_ids (one2many) : NEW relation: product.uom |
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.
why not rename fields too?
| openupgrade.delete_records_safely_by_xml_id( | ||
| env, | ||
| [ | ||
| "product.constraint_product_packaging_positive_qty", |
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.
better delete constraints with delete_sql_constraint_safely.
| NEW product.category: product.product_category_services (noupdate) | ||
| DEL product.category: product.cat_expense (noupdate) | ||
| DEL product.category: product.product_category_1 (noupdate) | ||
| DEL product.category: product.product_category_all (noupdate) |
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.
safely remove this one
depends: