-
-
Notifications
You must be signed in to change notification settings - Fork 1k
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] sale_product_set_packaging_qty: Migration to 18.0 #3474
base: 18.0
Are you sure you want to change the base?
[18.0][MIG] sale_product_set_packaging_qty: Migration to 18.0 #3474
Conversation
Set the digits on product_packaging_qty to be consistent with other modules.
Currently translated at 100.0% (5 of 5 strings) Translation: sale-workflow-13.0/sale-workflow-13.0-sale_product_set_packaging_qty Translate-URL: https://translation.odoo-community.org/projects/sale-workflow-13-0/sale-workflow-13-0-sale_product_set_packaging_qty/es/
Currently translated at 50.0% (4 of 8 strings) Translation: sale-workflow-14.0/sale-workflow-14.0-sale_product_set_packaging_qty Translate-URL: https://translation.odoo-community.org/projects/sale-workflow-14-0/sale-workflow-14-0-sale_product_set_packaging_qty/it/
Currently translated at 100.0% (8 of 8 strings) Translation: sale-workflow-14.0/sale-workflow-14.0-sale_product_set_packaging_qty Translate-URL: https://translation.odoo-community.org/projects/sale-workflow-14-0/sale-workflow-14-0-sale_product_set_packaging_qty/it/
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate. Translation: sale-workflow-14.0/sale-workflow-14.0-sale_product_set_packaging_qty Translate-URL: https://translation.odoo-community.org/projects/sale-workflow-14-0/sale-workflow-14-0-sale_product_set_packaging_qty/
Currently translated at 100.0% (8 of 8 strings) Translation: sale-workflow-14.0/sale-workflow-14.0-sale_product_set_packaging_qty Translate-URL: https://translation.odoo-community.org/projects/sale-workflow-14-0/sale-workflow-14-0-sale_product_set_packaging_qty/es/
…set.line Changing qty on packaging in product form is not reflected on product.set.line record having this package set. To avoid this situation, we should recompute packaging_qty and update values on the product.set.line whenever packaging_ids changes on product.
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.
Do you agree with the code move @sebalix @sbejaoui @rousseldenis ?
Having a packaging on a product set line should be in product_set
base module.
# Copyright 2020 Camptocamp SA | ||
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl) | ||
{ | ||
"name": "Sale Product Set Packaging Quantity", |
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.
"name": "Sale Product Set Packaging Quantity", | |
"name": "Sales Product Set Packaging", |
def prepare_sale_order_line_values(self, order, quantity, max_sequence=0): | ||
res = super().prepare_sale_order_line_values( | ||
order, quantity, max_sequence=max_sequence | ||
) | ||
if self.product_packaging_id: | ||
res["product_packaging_id"] = self.product_packaging_id.id | ||
return res |
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.
In my opinion, only this block should be in this module. Having a packaging on a product set line should be in product_set
base module.
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.
Hi, great idea, let me work on it, thanks
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.
Hello @jbaudoux, I updated the code: packaging logic was moved in OCA/product-attribute#1828
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.
@trisdoan You forgot to move the views
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.
Hi, I moved the view
|
770c93f
to
b14d43f
Compare
b14d43f
to
ae06686
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.
LGTM
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
Note
Changes in 18.0
product_packaging
was removed since 15.0, in herepositive_qty
was added since 16.0, in here