summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEL HADJI DEM <elhadji.dem@savoirfairelinux.com>2015-05-22 16:02:56 -0400
committerNicolas Martinelli <nim@odoo.com>2015-07-07 12:47:13 +0200
commit076944cc3fa86fbb2ceae04b79ac75b9de183be4 (patch)
tree771d7f4b3b7f96bb12172bb937f623c564db83be
parent02ae76ce0b3f61444f9fbcd07ba1f2a92545d0ea (diff)
[FIX] mrp_repair: display tracking warning only if lot_id not defined
Closes #6826
-rw-r--r--addons/mrp_repair/mrp_repair.py2
1 files changed, 1 insertions, 1 deletions
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