Added "stock_lot" extra_depend.

This commit is contained in:
José Miguel Pardo Salar 2021-10-14 17:33:35 +02:00
parent c0f83460e2
commit 5d1be1b65b
4 changed files with 19 additions and 2 deletions

View File

@ -7,6 +7,7 @@ from . import sale
from . import party
from . import configuration
from . import stock
from . import stock_lot
def register():
@ -45,3 +46,7 @@ def register():
configuration.ConfigurationLoad,
module='carrier_load_ul', type_='model',
depends=['carrier_load_grouping_method'])
Pool.register(
stock_lot.LoadOrder,
module='carrier_load_ul', type_='model',
depends=['stock_lot'])

View File

@ -460,8 +460,7 @@ class LoadOrder(metaclass=PoolMeta):
currency=move.currency,
unit_price=move.unit_price,
unit_load=move.unit_load,
origin=move.origin,
lot=getattr(move, 'lot', None)
origin=move.origin
)
@classmethod

12
stock_lot.py Normal file
View File

@ -0,0 +1,12 @@
# The COPYRIGHT file at the top level of this repository contains the full
# copyright notices and license terms.
from trytond.pool import PoolMeta
class LoadOrder(metaclass=PoolMeta):
__name__ = 'carrier.load.order'
def _get_inventory_move(self, move):
move_ = super()._get_inventory_move(move)
move_.lot = move.lot
return move_

View File

@ -9,6 +9,7 @@ depends:
extras_depend:
carrier_load_grouping_method
stock_lot
xml:
load.xml