Make PYSON more Pythonic
This commit is contained in:
1 parent
54b1c7f743
commit
7ca3217844
1 file changed
+2
-2
+2
-2
@@ -1,7 +1,7 @@
|
||||
#This file is part of Tryton. The COPYRIGHT file at the top level of
|
||||
#this repository contains the full copyright notices and license terms.
|
||||
from trytond.model import ModelView, ModelSQL, fields
|
||||
from trytond.pyson import Not, Equal, Eval
|
||||
from trytond.pyson import Eval
|
||||
from trytond.transaction import Transaction
|
||||
from trytond.pool import Pool
|
||||
|
||||
@@ -45,7 +45,7 @@ class PurchaseLine(ModelSQL, ModelView):
|
||||
analytic_accounts = fields.Many2One('analytic_account.account.selection',
|
||||
'Analytic Accounts',
|
||||
states={
|
||||
'invisible': Not(Equal(Eval('type'), 'line')),
|
||||
'invisible': Eval('type') != 'line',
|
||||
}, depends=['type'])
|
||||
|
||||
def _view_look_dom_arch(self, tree, type, field_children=None):
|
||||
|
||||
Reference in new issue
Block a user