Set lot on inventory move of ShipmentOut

If lot is set on the outgoing move, it should be set also on
the inventory move to allow proper synchronization.

issue8648
review285941002
This commit is contained in:
Cédric Krier
2019-09-11 23:54:06 +02:00
parent 277a3de175
commit 7d76c8cb2c
+6
View File
@@ -160,6 +160,12 @@ class ShipmentIn(metaclass=PoolMeta):
class ShipmentOut(metaclass=PoolMeta):
__name__ = 'stock.shipment.out'
def _get_inventory_move(self, outgoing_move):
move = super()._get_inventory_move(outgoing_move)
if move and outgoing_move.lot:
move.lot = outgoing_move.lot
return move
def _sync_move_key(self, move):
return super()._sync_move_key(move) + (('lot', move.lot),)