diff --git a/addons/mrp/wizard/mrp_product_produce.py b/addons/mrp/wizard/mrp_product_produce.py index 23ed113e49d..1fbc99c661b 100644 --- a/addons/mrp/wizard/mrp_product_produce.py +++ b/addons/mrp/wizard/mrp_product_produce.py @@ -137,7 +137,9 @@ class MrpProductProduce(models.TransientModel): self.env['stock.move.line'].create(vals) for pl in self.produce_line_ids: - if pl.qty_done and pl.lot_id: + if pl.qty_done: + if not pl.lot_id: + raise UserError(_('Please enter a lot or serial number for %s !' % pl.product_id.name)) if not pl.move_id: # Find move_id that would match move_id = self.production_id.move_raw_ids.filtered(lambda x: x.product_id == pl.product_id and x.state not in ('done', 'cancel'))