-
-
Notifications
You must be signed in to change notification settings - Fork 740
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_packaging_calculator_packaging_level: Migration to 18.0 #2234
base: 18.0
Are you sure you want to change the base?
[18.0][MIG] stock_packaging_calculator_packaging_level: Migration to 18.0 #2234
Conversation
74902ab
to
689b450
Compare
/ocabot migration stock_packaging_calculator_packaging_level |
@Kimkhoi3010 Thanks for this. To help reviewers, could you add the link to the depending PR in this one's description ? Thanks |
689b450
to
1b06d8f
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.
LG
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.
The commits history is lacking before 16.0
c745ca5
to
c4fff18
Compare
c4fff18
to
c98b378
Compare
…ging_calculator_packaging_level
Currently translated at 100.0% (2 of 2 strings) Translation: stock-logistics-warehouse-16.0/stock-logistics-warehouse-16.0-stock_packaging_calculator_packaging_level Translate-URL: https://translation.odoo-community.org/projects/stock-logistics-warehouse-16-0/stock-logistics-warehouse-16-0-stock_packaging_calculator_packaging_level/it/
c98b378
to
3168b87
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.
Not directly related to migration. Can you put those fixes in a separate commit?
def _packaging_name_getter(self, packaging): | ||
return packaging.packaging_level_id.name |
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.
I would not change that as this is called when there is no packaging level
sep = "" if compact_mode else " " | ||
# Override to use packaging level code | ||
if packaging and packaging.packaging_level_id: | ||
name = packaging.packaging_level_id[qty_by_packaging_level_fname] |
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 = packaging.packaging_level_id[qty_by_packaging_level_fname] | |
name = packaging.packaging_level_id.get(qty_by_packaging_level_fname, "code") |
"license": "LGPL-3", | ||
"application": False, | ||
"installable": True, | ||
"auto_install": 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.
I would make it optional. It should be up to the user to choose to display by packaging name or level code
"auto_install": True, | |
"auto_install": False, |
Glue module for stock_packaging_calculator and product_packaging_type. | ||
|
||
Mainly to use packaging type's code instead of packaging's name. |
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.
Glue module for stock_packaging_calculator and product_packaging_type. | |
Mainly to use packaging type's code instead of packaging's name. | |
Modify the string representation of the quantities by packaging. Use the packaging level code instead of the packaging name. | |
For example, instead of "1 Pallet, 2 Big Box, 7 Box, 10 Units", you get "1PL, 2TU, 7CU, 10 Units" |
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.
To move to product-attribute and rename into product_packaging....
Following #2173 (comment)
# Copyright 2021 Camptocamp SA | ||
# License LGPL-3.0 or later (https://www.gnu.org/licenses/lgpl) | ||
{ | ||
"name": "Stock packaging calculator packaging level", |
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": "Stock packaging calculator packaging level", | |
"name": "Product packaging calculator packaging level", |
"application": False, | ||
"installable": True, | ||
"auto_install": True, | ||
"depends": ["stock_packaging_calculator", "product_packaging_level"], |
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.
"depends": ["stock_packaging_calculator", "product_packaging_level"], | |
"depends": ["product_packaging_calculator", "product_packaging_level"], |
No description provided.