[FIX] stock: improve warning to help user to find the picking that block.

When you valid a picking wave of 100 pickings, and that one is blocked
(eg: no serial attributed), you have no way to know wich one fail except
opening all one by one.
This commit is contained in:
Jeremy Kersten
2017-07-28 18:30:01 +02:00
parent f3f66d2b8e
commit 3d558c435a
+1 -1
View File
@@ -555,7 +555,7 @@ class StockMove(models.Model):
(move.picking_id.picking_type_id.use_existing_lots or move.picking_id.picking_type_id.use_create_lots) and \
move.product_id.tracking != 'none' and \
not (move.restrict_lot_id or (pack_operation and (pack_operation.product_id and pack_operation.pack_lot_ids)) or (pack_operation and not pack_operation.product_id)):
raise UserError(_('You need to provide a Lot/Serial Number for product %s') % move.product_id.name)
raise UserError(_('You need to provide a Lot/Serial Number for product %s') % ("%s (%s)" % (move.product_id.name, move.picking_id.name)))
@api.multi
def action_assign(self, no_prepare=False):