diff --git a/addons/mrp/models/mrp_production.py b/addons/mrp/models/mrp_production.py index 45eb460a25b..0adfcea608a 100644 --- a/addons/mrp/models/mrp_production.py +++ b/addons/mrp/models/mrp_production.py @@ -455,7 +455,7 @@ class MrpProduction(models.Model): move[0].with_context(do_not_unreserve=True).write({'product_uom_qty': quantity}) move[0]._recompute_state() move[0]._action_assign() - move.unit_factor = quantity / move.raw_material_production_id.product_qty + move[0].unit_factor = quantity / move[0].raw_material_production_id.product_qty elif quantity < 0: # Do not remove 0 lines if move[0].quantity_done > 0: raise UserError(_('Lines need to be deleted, but can not as you still have some quantities to consume in them. '))