Skip to content
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_secondary_unit: Migration to 18.0 #1767

Open
wants to merge 42 commits into
base: 18.0
Choose a base branch
from

Conversation

pfranck
Copy link

@pfranck pfranck commented Nov 12, 2024

No description provided.

@pfranck pfranck mentioned this pull request Nov 12, 2024
32 tasks
@pfranck pfranck marked this pull request as ready for review November 12, 2024 16:18
@pfranck pfranck force-pushed the 18.0-mig-product_secondary_unit branch 2 times, most recently from 7b431a9 to 9c83b79 Compare November 12, 2024 23:42
@pfranck pfranck force-pushed the 18.0-mig-product_secondary_unit branch 5 times, most recently from 8c43708 to ce1231a Compare November 13, 2024 07:25
Copy link

@luc-adhoc luc-adhoc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

functional review

@pfranck pfranck force-pushed the 18.0-mig-product_secondary_unit branch from ce1231a to 8fe8fc1 Compare January 15, 2025 04:58
sergio-teruel and others added 18 commits January 16, 2025 02:58
Currently translated at 100.0% (16 of 16 strings)

Translation: product-attribute-11.0/product-attribute-11.0-product_secondary_unit
Translate-URL: https://translation.odoo-community.org/projects/product-attribute-11-0/product-attribute-11-0-product_secondary_unit/es/
Currently translated at 100.0% (16 of 16 strings)

Translation: product-attribute-13.0/product-attribute-13.0-product_secondary_unit
Translate-URL: https://translation.odoo-community.org/projects/product-attribute-13-0/product-attribute-13-0-product_secondary_unit/fr/
…en secondary uom changes

[FIX] product_secondary_unit: Avoid cache missed
Kev-Roche and others added 24 commits January 16, 2025 02:58
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate.

Translation: product-attribute-15.0/product-attribute-15.0-product_secondary_unit
Translate-URL: https://translation.odoo-community.org/projects/product-attribute-15-0/product-attribute-15-0-product_secondary_unit/
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate.

Translation: product-attribute-16.0/product-attribute-16.0-product_secondary_unit
Translate-URL: https://translation.odoo-community.org/projects/product-attribute-16-0/product-attribute-16-0-product_secondary_unit/
Currently translated at 100.0% (24 of 24 strings)

Translation: product-attribute-16.0/product-attribute-16.0-product_secondary_unit
Translate-URL: https://translation.odoo-community.org/projects/product-attribute-16-0/product-attribute-16-0-product_secondary_unit/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.
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate.

Translation: product-attribute-16.0/product-attribute-16.0-product_secondary_unit
Translate-URL: https://translation.odoo-community.org/projects/product-attribute-16-0/product-attribute-16-0-product_secondary_unit/
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate.

Translation: product-attribute-17.0/product-attribute-17.0-product_secondary_unit
Translate-URL: https://translation.odoo-community.org/projects/product-attribute-17-0/product-attribute-17-0-product_secondary_unit/
@pfranck pfranck force-pushed the 18.0-mig-product_secondary_unit branch from 8fe8fc1 to fd18c54 Compare January 16, 2025 02:58
Copy link

@ced-adhoc ced-adhoc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@matiasperalta1
Copy link

@rousseldenis @pedrobaeza Is it ready to merge?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.