-
-
Notifications
You must be signed in to change notification settings - Fork 98
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
[18.0][MIG] stock_quant_package_dimension: Migration to 18.0 #1872 #44
base: 18.0
Are you sure you want to change the base?
[18.0][MIG] stock_quant_package_dimension: Migration to 18.0 #1872 #44
Conversation
When a packaging is auto-assigned on a package, it should not override any previously set dimensions. When * if a user changes the packaging from the UI, all the dimensions are overridden from the packaging (even if they are zero) which match the general behavior of onchanges * if the packaging is changed through the "auto assign" mechanism (_auto_assign_packaging in context), only the package fields != 0 are set from the packaging, as we don't want to silently erase previously set dimensions In the second case, the packaging dimensions act as "default values" for the dimensions. Example: an hardware scale sets the weight, the other dimensions (width, height, ...) are completed from the packaging).
Add estimated_pack_weight_kg to stock.quant.package
Co-authored-by: Denis Roussel (ACSONE) <[email protected]>
First, we add a new 'estimated_pack_weight' on the package in 'stock_quant_package_dimension' module which is similar to the 'weight' field implemented in the standard 'delivery' module: it is done on purpose to not depend on 'delivery'. This weight is thus computed from product weight. Second, we re-implement this field in 'stock_quant_package_dimension_total_weight_from_packaging' module (auto_install) which make use of the weight computation mechanism from 'product_total_weight_from_packaging'. The weight here is computed from the packaging weight.
Currently translated at 58.3% (14 of 24 strings) Translation: stock-logistics-workflow-16.0/stock-logistics-workflow-16.0-stock_quant_package_dimension Translate-URL: https://translation.odoo-community.org/projects/stock-logistics-workflow-16-0/stock-logistics-workflow-16-0-stock_quant_package_dimension/it/
Currently translated at 100.0% (24 of 24 strings) Translation: stock-logistics-workflow-16.0/stock-logistics-workflow-16.0-stock_quant_package_dimension Translate-URL: https://translation.odoo-community.org/projects/stock-logistics-workflow-16-0/stock-logistics-workflow-16-0-stock_quant_package_dimension/es/
…efault As the original field is a computed one with a default, Odoo generates warning about that default if defined on a related field. So, override the compute method instead.
Currently translated at 58.3% (14 of 24 strings) Translation: stock-logistics-workflow-16.0/stock-logistics-workflow-16.0-stock_quant_package_dimension Translate-URL: https://translation.odoo-community.org/projects/stock-logistics-workflow-16-0/stock-logistics-workflow-16-0-stock_quant_package_dimension/it/
Currently translated at 58.3% (14 of 24 strings) Translation: stock-logistics-workflow-16.0/stock-logistics-workflow-16.0-stock_quant_package_dimension Translate-URL: https://translation.odoo-community.org/projects/stock-logistics-workflow-16-0/stock-logistics-workflow-16-0-stock_quant_package_dimension/it/
Currently translated at 100.0% (24 of 24 strings) Translation: stock-logistics-workflow-16.0/stock-logistics-workflow-16.0-stock_quant_package_dimension Translate-URL: https://translation.odoo-community.org/projects/stock-logistics-workflow-16-0/stock-logistics-workflow-16-0-stock_quant_package_dimension/it/
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate. Translation: stock-logistics-workflow-16.0/stock-logistics-workflow-16.0-stock_quant_package_dimension Translate-URL: https://translation.odoo-community.org/projects/stock-logistics-workflow-16-0/stock-logistics-workflow-16-0-stock_quant_package_dimension/
Currently translated at 100.0% (24 of 24 strings) Translation: stock-logistics-workflow-16.0/stock-logistics-workflow-16.0-stock_quant_package_dimension Translate-URL: https://translation.odoo-community.org/projects/stock-logistics-workflow-16-0/stock-logistics-workflow-16-0-stock_quant_package_dimension/it/
Currently translated at 100.0% (24 of 24 strings) Translation: stock-logistics-workflow-16.0/stock-logistics-workflow-16.0-stock_quant_package_dimension Translate-URL: https://translation.odoo-community.org/projects/stock-logistics-workflow-16-0/stock-logistics-workflow-16-0-stock_quant_package_dimension/es/
Currently translated at 100.0% (24 of 24 strings) Translation: stock-logistics-workflow-16.0/stock-logistics-workflow-16.0-stock_quant_package_dimension Translate-URL: https://translation.odoo-community.org/projects/stock-logistics-workflow-16-0/stock-logistics-workflow-16-0-stock_quant_package_dimension/it/
Currently translated at 100.0% (24 of 24 strings) Translation: stock-logistics-workflow-16.0/stock-logistics-workflow-16.0-stock_quant_package_dimension Translate-URL: https://translation.odoo-community.org/projects/stock-logistics-workflow-16-0/stock-logistics-workflow-16-0-stock_quant_package_dimension/it/
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate. Translation: stock-logistics-workflow-17.0/stock-logistics-workflow-17.0-stock_quant_package_dimension Translate-URL: https://translation.odoo-community.org/projects/stock-logistics-workflow-17-0/stock-logistics-workflow-17-0-stock_quant_package_dimension/
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.
Thanks for the migration.
"weight": "pack_weight", | ||
"length_uom_id": "length_uom_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.
Can you also copy the volume?
In a separate commit.
To be compliant with OCA/product-attribute#1696
/ocabot migration stock_quant_package_dimension |
Module migrated to version 18.0
Depends on: