From f1ab701a34ec6cc824779bc255177177c060be0c Mon Sep 17 00:00:00 2001 From: Carlos G?lvez Date: Thu, 12 Dec 2019 10:40:24 +0100 Subject: [PATCH] Add missing import --- stock.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/stock.py b/stock.py index 63e8781..d770bfd 100644 --- a/stock.py +++ b/stock.py @@ -1,7 +1,7 @@ # The COPYRIGHT file at the top level of this repository contains the full # copyright notices and license terms. from trytond.pool import PoolMeta -from trytond.pyson import Eval +from trytond.pyson import Eval, If from trytond.transaction import Transaction __all__ = ['Lot', 'Move'] @@ -24,7 +24,8 @@ class Move(metaclass=PoolMeta): @classmethod def __setup__(cls): 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: cls.lot.depends.append('from_location') cls.lot.loading = 'lazy'