mirror of
https://github.com/NaN-tic/trytond-stock_lot_quantity.git
synced 2023-12-14 03:12:59 +01:00
Add missing import
This commit is contained in:
parent
1921294171
commit
f1ab701a34
5
stock.py
5
stock.py
|
@ -1,7 +1,7 @@
|
||||||
# The COPYRIGHT file at the top level of this repository contains the full
|
# The COPYRIGHT file at the top level of this repository contains the full
|
||||||
# copyright notices and license terms.
|
# copyright notices and license terms.
|
||||||
from trytond.pool import PoolMeta
|
from trytond.pool import PoolMeta
|
||||||
from trytond.pyson import Eval
|
from trytond.pyson import Eval, If
|
||||||
from trytond.transaction import Transaction
|
from trytond.transaction import Transaction
|
||||||
|
|
||||||
__all__ = ['Lot', 'Move']
|
__all__ = ['Lot', 'Move']
|
||||||
|
@ -24,7 +24,8 @@ class Move(metaclass=PoolMeta):
|
||||||
@classmethod
|
@classmethod
|
||||||
def __setup__(cls):
|
def __setup__(cls):
|
||||||
super(Move, cls).__setup__()
|
super(Move, cls).__setup__()
|
||||||
cls.lot.context['locations'] = If(Eval('from_location'), [Eval('from_location')], [])
|
cls.lot.context['locations'] = If(Eval('from_location'),
|
||||||
|
[Eval('from_location')], [])
|
||||||
if 'from_location' not in cls.lot.depends:
|
if 'from_location' not in cls.lot.depends:
|
||||||
cls.lot.depends.append('from_location')
|
cls.lot.depends.append('from_location')
|
||||||
cls.lot.loading = 'lazy'
|
cls.lot.loading = 'lazy'
|
||||||
|
|
Loading…
Reference in a new issue