From 7d76c8cb2c5271e0bb2ef3a7f4be4e108a50f222 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Krier?= Date: Wed, 11 Sep 2019 23:54:06 +0200 Subject: [PATCH] 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 --- stock.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/stock.py b/stock.py index 4218823615..34a9063153 100644 --- a/stock.py +++ b/stock.py @@ -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),)