Skip to content
Snippets Groups Projects
Commit b4a9e5b8 authored by Csaba Tóth's avatar Csaba Tóth Committed by GitHub
Browse files

[FIX] stock: missing field from a compute method dependency


The `uom_id` field from the product is used, but the field is missed from the dependency decorator. Because the `product_qty` field is stored, than it will never recalculated when i modify the uom on the product.

closes odoo/odoo#80911

Signed-off-by: default avatarArnold Moyaux <arm@odoo.com>
parent 8f42ad03
Branches
Tags
No related merge requests found
......@@ -78,7 +78,7 @@ class StockMoveLine(models.Model):
else:
line.lots_visible = line.product_id.tracking != 'none'
@api.depends('product_id', 'product_uom_id', 'product_uom_qty')
@api.depends('product_id', 'product_id.uom_id', 'product_uom_id', 'product_uom_qty')
def _compute_product_qty(self):
for line in self:
line.product_qty = line.product_uom_id._compute_quantity(line.product_uom_qty, line.product_id.uom_id, rounding_method='HALF-UP')
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment