changeset 7d65cf805a2c in modules/stock_lot:default
details: https://hg.tryton.org/modules/stock_lot?cmd=changeset;node=7d65cf805a2c
description:
Unify _get_inventory_move on shipment
Define them as instance method to provide more flexibility.
issue8255
review287251002
diffstat:
stock.py | 11 ++++-------
1 files changed, 4 insertions(+), 7 deletions(-)
diffs (28 lines):
diff -r e3bddc14a927 -r 7d65cf805a2c stock.py
--- a/stock.py Sun Apr 07 19:50:04 2019 +0200
+++ b/stock.py Thu Apr 11 18:54:55 2019 +0200
@@ -151,9 +151,8 @@
class ShipmentIn(metaclass=PoolMeta):
__name__ = 'stock.shipment.in'
- @classmethod
- def _get_inventory_moves(cls, incoming_move):
- move = super(ShipmentIn, cls)._get_inventory_moves(incoming_move)
+ def _get_inventory_move(self, incoming_move):
+ move = super()._get_inventory_move(incoming_move)
if move and incoming_move.lot:
move.lot = incoming_move.lot
return move
@@ -205,10 +204,8 @@
class ShipmentOutReturn(metaclass=PoolMeta):
__name__ = 'stock.shipment.out.return'
- @classmethod
- def _get_inventory_moves(cls, incoming_move):
- move = super(ShipmentOutReturn,
- cls)._get_inventory_moves(incoming_move)
+ def _get_inventory_move(self, incoming_move):
+ move = super()._get_inventory_move(incoming_move)
if move and incoming_move.lot:
move.lot = incoming_move.lot
return move