From 076944cc3fa86fbb2ceae04b79ac75b9de183be4 Mon Sep 17 00:00:00 2001 From: EL HADJI DEM Date: Fri, 22 May 2015 16:02:56 -0400 Subject: [PATCH] [FIX] mrp_repair: display tracking warning only if lot_id not defined Closes #6826 --- addons/mrp_repair/mrp_repair.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/mrp_repair/mrp_repair.py b/addons/mrp_repair/mrp_repair.py index aa4dc961d43..d30abe291c1 100644 --- a/addons/mrp_repair/mrp_repair.py +++ b/addons/mrp_repair/mrp_repair.py @@ -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