Skip to content
Snippets Groups Projects
Commit f7d5ba6f authored by Swapnesh Shah's avatar Swapnesh Shah Committed by Martin Trigaux
Browse files

[FIX] mrp: always set a value to computed fiec


Records were filtered so not every record was set in the for loop

Fixes odoo/odoo#38992
Closes odoo/odoo#39071

Signed-off-by: default avatarMartin Trigaux (mat) <mat@odoo.com>
parent 2dc54945
No related branches found
No related tags found
No related merge requests found
......@@ -237,7 +237,8 @@ class MrpWorkorder(models.Model):
@api.depends('production_id.product_qty', 'qty_produced')
def _compute_is_produced(self):
for order in self:
self.is_produced = False
for order in self.filtered(lambda p: p.production_id):
rounding = order.production_id.product_uom_id.rounding
order.is_produced = float_compare(order.qty_produced, order.production_id.product_qty, precision_rounding=rounding) >= 0
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment