[REF] stock: inventory adjustment: error message

This commit is contained in:
Dhaval Panchal
2018-01-10 10:44:07 +01:00
committed by Simon Lejeune
parent 5a5a2fa796
commit bbc9b329b5
+3 -3
View File
@@ -383,9 +383,9 @@ class InventoryLine(models.Model):
('prod_lot_id', '=', values.get('prod_lot_id'))])
res = super(InventoryLine, self).create(values)
if existings:
raise UserError(_("You cannot have two inventory adjustements in state 'in Progress' with the same product "
"(%s), same location (%s), same package, same owner and same lot. Please first validate "
"the first inventory adjustement with this product before creating another one.") % (res.product_id.display_name, res.location_id.name))
raise UserError(_("You cannot have two inventory adjustments in progress for the same product (%s) "
"in the same location, for the same package, the same owner and the same lot number. "
"Please validate or cancel the first inventory adjustment before creating a new one.") % (res.product_id.display_name))
return res
@api.constrains('product_id')