[IMP]if there is there is no line repair oreder is confirm

bzr revid: sgo@tinyerp.com-20120628102412-phgjf8lw7rfydxm8
This commit is contained in:
Sanjay Gohel (Open ERP) 2012-06-28 15:54:12 +05:30
parent ac58997812
commit 78d49dcabe
1 changed files with 0 additions and 2 deletions

View File

@ -331,8 +331,6 @@ class mrp_repair(osv.osv):
self.write(cr, uid, [o.id], {'state': '2binvoiced'})
else:
self.write(cr, uid, [o.id], {'state': 'confirmed'})
if not o.operations:
raise osv.except_osv(_('Error !'),_('You cannot confirm a repair order which has no line.'))
for line in o.operations:
if line.product_id.track_production and not line.prodlot_id:
raise osv.except_osv(_('Warning'), _("Serial number is required for operation line with product '%s'") % (line.product_id.name))