[REF] stock: inventory adjustment: error message
This commit is contained in:
committed by
Simon Lejeune
parent
5a5a2fa796
commit
bbc9b329b5
@@ -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')
|
||||
|
||||
Reference in New Issue
Block a user