forked from OCA/product-attribute
-
Notifications
You must be signed in to change notification settings - Fork 0
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
[16.0][MIG] product_total_weight_from_packaging: Migrate to 16.0 #3
Merged
QuocDuong1306
merged 209 commits into
16.0
from
16.0-mig-product_total_weight_from_packaging
Mar 12, 2024
Merged
[16.0][MIG] product_total_weight_from_packaging: Migrate to 16.0 #3
QuocDuong1306
merged 209 commits into
16.0
from
16.0-mig-product_total_weight_from_packaging
Mar 12, 2024
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
As max_weight is defined now on stock.package.type, rely on that one. Migrate data that was filled in to weight field.
QuocDuong1306
force-pushed
the
16.0-mig-product_total_weight_from_packaging
branch
2 times, most recently
from
August 24, 2023 02:19
8b1d232
to
270a71c
Compare
dzungtran89
approved these changes
Aug 25, 2023
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
Currently translated at 100.0% (2 of 2 strings) Translation: product-attribute-16.0/product-attribute-16.0-product_multi_category Translate-URL: https://translation.odoo-community.org/projects/product-attribute-16-0/product-attribute-16-0-product_multi_category/es/
Currently translated at 100.0% (27 of 27 strings) Translation: product-attribute-16.0/product-attribute-16.0-product_assortment Translate-URL: https://translation.odoo-community.org/projects/product-attribute-16-0/product-attribute-16-0-product_assortment/es/
Currently translated at 100.0% (16 of 16 strings) Translation: product-attribute-16.0/product-attribute-16.0-product_sequence Translate-URL: https://translation.odoo-community.org/projects/product-attribute-16-0/product-attribute-16-0-product_sequence/es/
Currently translated at 100.0% (28 of 28 strings) Translation: product-attribute-16.0/product-attribute-16.0-product_logistics_uom Translate-URL: https://translation.odoo-community.org/projects/product-attribute-16-0/product-attribute-16-0-product_logistics_uom/es/
Currently translated at 100.0% (12 of 12 strings) Translation: product-attribute-16.0/product-attribute-16.0-product_dimension Translate-URL: https://translation.odoo-community.org/projects/product-attribute-16-0/product-attribute-16-0-product_dimension/es/
Currently translated at 100.0% (33 of 33 strings) Translation: product-attribute-16.0/product-attribute-16.0-product_state Translate-URL: https://translation.odoo-community.org/projects/product-attribute-16-0/product-attribute-16-0-product_state/es/
Currently translated at 100.0% (6 of 6 strings) Translation: product-attribute-16.0/product-attribute-16.0-product_manufacturer Translate-URL: https://translation.odoo-community.org/projects/product-attribute-16-0/product-attribute-16-0-product_manufacturer/es/
Currently translated at 100.0% (53 of 53 strings) Translation: product-attribute-16.0/product-attribute-16.0-product_supplierinfo_for_customer Translate-URL: https://translation.odoo-community.org/projects/product-attribute-16-0/product-attribute-16-0-product_supplierinfo_for_customer/es/
The field `secondary_uom_qty` is defined in the mixin class `product.secondary.unit.mixin` as being computed, but without precomputation. This makes that when this field is used in the variable `_secondary_unit_fields` for classes using the mixing, it ends up as a dependency of other fields that are computed and do require precomputation. But, not being the field `secondary_uom_qty` precomputed, it disables the precomputation of those other fields. This has an impact when installing the module `sale` along with the module `product_secondary_unit`, which causes the module `sale_order_secondary_unit` to be auto-installed. As a result, the following errors appear in the log, disabling the precomputation of 11 other fields: ```text /opt/project/repos/odoo/odoo/fields.py:802: UserWarning: Field sale.order.line.product_uom_qty cannot be precomputed as it depends on non-precomputed field sale.order.line.secondary_uom_qty /opt/project/repos/odoo/odoo/fields.py:802: UserWarning: Field sale.order.line.price_unit cannot be precomputed as it depends on non-precomputed field sale.order.line.product_uom_qty /opt/project/repos/odoo/odoo/fields.py:802: UserWarning: Field sale.order.line.discount cannot be precomputed as it depends on non-precomputed field sale.order.line.product_uom_qty /opt/project/repos/odoo/odoo/fields.py:802: UserWarning: Field sale.order.line.price_reduce cannot be precomputed as it depends on non-precomputed field sale.order.line.price_unit /opt/project/repos/odoo/odoo/fields.py:802: UserWarning: Field sale.order.line.price_subtotal cannot be precomputed as it depends on non-precomputed field sale.order.line.product_uom_qty /opt/project/repos/odoo/odoo/fields.py:802: UserWarning: Field sale.order.line.price_tax cannot be precomputed as it depends on non-precomputed field sale.order.line.product_uom_qty /opt/project/repos/odoo/odoo/fields.py:802: UserWarning: Field sale.order.line.price_total cannot be precomputed as it depends on non-precomputed field sale.order.line.product_uom_qty /opt/project/repos/odoo/odoo/fields.py:802: UserWarning: Field sale.order.line.price_reduce_taxexcl cannot be precomputed as it depends on non-precomputed field sale.order.line.price_subtotal /opt/project/repos/odoo/odoo/fields.py:802: UserWarning: Field sale.order.line.price_reduce_taxinc cannot be precomputed as it depends on non-precomputed field sale.order.line.price_total /opt/project/repos/odoo/odoo/fields.py:802: UserWarning: Field sale.order.line.product_packaging_id cannot be precomputed as it depends on non-precomputed field sale.order.line.product_uom_qty /opt/project/repos/odoo/odoo/fields.py:802: UserWarning: Field sale.order.line.product_packaging_qty cannot be precomputed as it depends on non-precomputed field sale.order.line.product_packaging_id ``` Making `secondary_uom_qty` precomputed solves these warnings.
…ply query if column max_weight exists. This column is no longer defined in 16.0
Currently translated at 100.0% (1 of 1 strings) Translation: product-attribute-13.0/product-attribute-13.0-product_total_weight_from_packaging Translate-URL: https://translation.odoo-community.org/projects/product-attribute-13-0/product-attribute-13-0-product_total_weight_from_packaging/es/
QuocDuong1306
force-pushed
the
16.0-mig-product_total_weight_from_packaging
branch
from
October 5, 2023 03:13
e331f71
to
9e06736
Compare
QuocDuong1306
force-pushed
the
16.0-mig-product_total_weight_from_packaging
branch
from
October 5, 2023 04:16
9e06736
to
204d6d1
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
No description provided.