-
-
Notifications
You must be signed in to change notification settings - Fork 772
[18.0][MOV] stock_packaging_calculator => product_packaging_calculator #1932
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][MOV] stock_packaging_calculator => product_packaging_calculator #1932
Conversation
Customizing the minimal unit was not needed at all. This way we always assume the precision is the on of the UoM.
Allows to ship more information with each element in the list.
Optionally include contained packaging qty.
Allows to reuse the mapping every time is needed.
…g calculator return
Make sure unit is always the last element in the list.
Use _packaging_values_handler ctx key to pass your own handler for specific on demand overrides.
Retrieve quickly packagin bty qty as a string.
This mixin can be used to provide qty by packaging features to any model.
Otherwise translations won't be taken into account.
This way no matter who's changing the behavior of the name getter we'll get the right name.
Currently translated at 100.0% (5 of 5 strings) Translation: stock-logistics-warehouse-18.0/stock-logistics-warehouse-18.0-stock_packaging_calculator Translate-URL: https://translation.odoo-community.org/projects/stock-logistics-warehouse-18-0/stock-logistics-warehouse-18-0-stock_packaging_calculator/it/
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
22a1678
to
30a5d2c
Compare
env.cr, "stock_packaging_calculator" | ||
) and not ou.is_module_installed(env.cr, "product_packaging_calculator"): | ||
modules = [("stock_packaging_calculator", "product_packaging_calculator")] | ||
ou.update_module_names(env.cr, modules, merge_modules=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.
One issue by doing this:
if we have stock_packaging_calculator
installed, then we switch to its new version (transitional module), this will install product_packaging_calculator
, and the hook here will remove stock_packaging_calculator
entry from ir_module_module
table. And if we still have other modules depending on this one, they have their dependencies broken (and could be uninstalled by mistake).
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.
Will do a try with update_module_moved_fields
+ update_module_moved_models
instead
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.
Working well with update_module_moved_fields
+ update_module_moved_models
👍 This keeps the existing stock_packaging_calculator
module installed. Up to the admin to uninstall it afterwards.
…ator And moved from OCA/stock-logistics-warehouse where it was already migrated. As this module doesn't depend on `stock`, there is no need for this module to: - be hosted in a stock-logistics-* repository - be named with prefix `stock_` `stock_packaging_calculator` will be transformed into a transitional module to install the new `product_packaging_calculator`.
30a5d2c
to
1bd81d4
Compare
/ocabot merge nobump |
This PR looks fantastic, let's merge it! |
Congratulations, your PR was merged at c1dc122. Thanks a lot for contributing to OCA. ❤️ |
And moved from
OCA/stock-logistics-warehouse
where it was already migrated (based on these comments: OCA/stock-logistics-warehouse#2173 (comment)).As this module doesn't depend on
stock
, there is no need for this module to:stock_
As
stock_packaging_calculator
is already available in 18.0, it is transformed into a transitional module to install the newproduct_packaging_calculator
:product_packaging_calculator
stock-logistics-warehouse#2294