changeset c7385d3db79f in modules/stock_lot:default
details: https://hg.tryton.org/modules/stock_lot?cmd=changeset;node=c7385d3db79f
description:
        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
diffstat:

 stock.py |  6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)

diffs (16 lines):

diff -r 2987a2201834 -r c7385d3db79f stock.py
--- a/stock.py  Sun Aug 18 19:22:43 2019 +0200
+++ b/stock.py  Wed Sep 11 23:54:06 2019 +0200
@@ -160,6 +160,12 @@
 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),)
 

Reply via email to