[FIX] mrp_repair: display tracking warning only if lot_id not defined
Closes #6826
This commit is contained in:
parent
02ae76ce0b
commit
076944cc3f
|
@ -285,7 +285,7 @@ class mrp_repair(osv.osv):
|
|||
else:
|
||||
self.write(cr, uid, [o.id], {'state': 'confirmed'})
|
||||
for line in o.operations:
|
||||
if line.product_id.track_production:
|
||||
if line.product_id.track_production and not line.lot_id:
|
||||
raise osv.except_osv(_('Warning!'), _("Serial number is required for operation line with product '%s'") % (line.product_id.name))
|
||||
mrp_line_obj.write(cr, uid, [l.id for l in o.operations], {'state': 'confirmed'})
|
||||
return True
|
||||
|
|
Loading…
Reference in New Issue