-
-
Notifications
You must be signed in to change notification settings - Fork 727
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] product_total_weight_from_packaging: Migration to 18.0 #1792
[18.0][MIG] product_total_weight_from_packaging: Migration to 18.0 #1792
Conversation
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.
LG
class TestProductTotalWeightFromPackaging(TransactionCase): | ||
@classmethod | ||
def setUpClass(cls): | ||
super().setUpClass() | ||
cls.env = cls.env(context=dict(cls.env.context, tracking_disable=True)) |
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.
Shouldn't this extend TestProductCommon
instead ? Then no need for tracking_disable
class TestProductTotalWeightFromPackaging(TransactionCase): | |
@classmethod | |
def setUpClass(cls): | |
super().setUpClass() | |
cls.env = cls.env(context=dict(cls.env.context, tracking_disable=True)) | |
from odoo.addons.product.tests.common import TestProductCommon | |
class TestProductTotalWeightFromPackaging(TestProductCommon): | |
@classmethod | |
def setUpClass(cls): | |
super().setUpClass() |
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate. Translation: product-attribute-16.0/product-attribute-16.0-product_total_weight_from_packaging Translate-URL: https://translation.odoo-community.org/projects/product-attribute-16-0/product-attribute-16-0-product_total_weight_from_packaging/
…x_weight The max_weight is a concept that was introduced in odoo delivery module to define the transporter weight limit for the shipped packaging. Before v16, the transporter packaging and product packaging was the same model product.packaging. Now the transporter packaging is moved to the model stock.package.type. In v13, max_weight defined in delivery module on product.packaging was used also for product packaging dimension. In v14, the weight field was added on the product.packaging and the max_weight was still coming from delivery module. This was introducing inconsistency as some modules migrated from v13 to v14 still rely on max_weight and some rely on the new weight field. In v16, we have to drop this max_weight on product.packaging as the delivery module moved it to stock.package.type and we should rely only on the weight field. The migration of the product_packaging_dimension OCA#1161 has to be fixed to not expose the old max_weight field and any data on max_weight must be moved to weight if empty. This module also deserves a big warning that it is lacking the weight uom conversions as it depends on product_packaging_dimension that depends on product_logistics_uom that allows to set a uom on the weight. The sum in this module is assuming all weights are in kg Co-authored-by: Jacques-Etienne Baudoux <[email protected]>
d8b48f9
to
13f532d
Compare
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.
:)
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.
LGTM
This PR has the |
/ocabot migration product_total_weight_from_packaging |
"author": "Camptocamp, Odoo Community Association (OCA)", | ||
"license": "AGPL-3", | ||
"installable": True, | ||
"depends": ["stock_packaging_calculator", "product_packaging_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.
Once OCA/stock-logistics-warehouse#2173 (comment) done
"depends": ["stock_packaging_calculator", "product_packaging_dimension"], | |
"depends": ["product_packaging_calculator", "product_packaging_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.
PR here: #1932
13f532d
to
f423916
Compare
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 update the pr description depends on with the new PR?
pending pr merged |
f423916
to
3a6303b
Compare
/ocabot merge nobump |
Hey, thanks for contributing! Proceeding to merge this for you. |
Congratulations, your PR was merged at 4687db4. Thanks a lot for contributing to OCA. ❤️ |
No description provided.