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 76 commits into
base: 18.0
Choose a base branch
from

Conversation

pfranck
Copy link

@pfranck pfranck commented Nov 12, 2024

No description provided.

sergio-teruel and others added 30 commits November 12, 2024 13:20
Currently translated at 100.0% (17 of 17 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/fr/
Updated by Update PO files to match POT (msgmerge) hook in Weblate.
Updated by Update PO files to match POT (msgmerge) hook in Weblate.
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/
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate.

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

Translation: product-attribute-12.0/product-attribute-12.0-product_secondary_unit
Translate-URL: https://translation.odoo-community.org/projects/product-attribute-12-0/product-attribute-12-0-product_secondary_unit/zh_CN/
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/es_MX/
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
adrianojprado and others added 19 commits November 12, 2024 13:20
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/pt_BR/
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/
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/it/
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/it/
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 mentioned this pull request Nov 12, 2024
20 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 4 times, most recently from 537a66b to 8c43708 Compare November 13, 2024 07:20
@pfranck pfranck force-pushed the 18.0-mig-product_secondary_unit branch from 8c43708 to ce1231a Compare November 13, 2024 07:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.