Fix the assignment of 'locations' in context
This commit is contained in:
parent
9e0dfc8150
commit
fef525dcb4
2
stock.py
2
stock.py
|
@ -24,7 +24,7 @@ class Move(metaclass=PoolMeta):
|
|||
@classmethod
|
||||
def __setup__(cls):
|
||||
super(Move, cls).__setup__()
|
||||
cls.lot.context['locations'] = [Eval('from_location')]
|
||||
cls.lot.context['locations'] = If(Eval('from_location'), [Eval('from_location')], [])
|
||||
if 'from_location' not in cls.lot.depends:
|
||||
cls.lot.depends.append('from_location')
|
||||
cls.lot.loading = 'lazy'
|
||||
|
|
Loading…
Reference in New Issue