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

[FIX] volume_uom_id is ambiguous #1915

Merged
merged 1 commit into from
Mar 12, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions product_logistics_uom/hooks.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,9 @@ def pre_init_hook(env): # pragma: nocover
SET volume = product_product.volume / product_uom.factor * %s
FROM uom_uom product_uom,
product_template pt
WHERE product_uom.id = volume_uom_id
WHERE product_uom.id = pt.volume_uom_id
AND pt.id = product_product.product_tmpl_id
AND volume_uom_id IS NOT NULL AND pt.volume_uom_id != %s
AND pt.volume_uom_id IS NOT NULL AND pt.volume_uom_id != %s
""",
m3_uom_factor,
m3_uom_id,
Expand Down Expand Up @@ -102,9 +102,9 @@ def pre_init_hook(env): # pragma: nocover
UPDATE product_product
SET weight = product_product.weight / product_uom.factor * %s
FROM uom_uom product_uom, product_template pt
WHERE product_uom.id = weight_uom_id
WHERE product_uom.id = pt.weight_uom_id
AND pt.id = product_product.product_tmpl_id
AND weight_uom_id IS NOT NULL AND pt.weight_uom_id != %s
AND pt.weight_uom_id IS NOT NULL AND pt.weight_uom_id != %s
""",
kg_uom_factor,
kg_uom_id,
Expand Down