Make PYSON more Pythonic
This commit is contained in:
1 parent
1595175929
commit
dfd989b6f0
2 files changed
+6
-6
No files matched your search
+3
-3
@@ -1,13 +1,13 @@
|
||||
#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, Bool, Eval
|
||||
from trytond.pyson import Eval
|
||||
from trytond.transaction import Transaction
|
||||
from trytond.pool import Pool
|
||||
|
||||
STATES = {
|
||||
'readonly': Not(Bool(Eval('active'))),
|
||||
}
|
||||
'readonly': ~Eval('active', True),
|
||||
}
|
||||
DEPENDS = ['active']
|
||||
|
||||
|
||||
|
||||
@@ -3,13 +3,13 @@
|
||||
from decimal import Decimal
|
||||
from trytond.model import ModelView, ModelSQL, fields
|
||||
from trytond.model.modelstorage import OPERATORS
|
||||
from trytond.pyson import Not, Bool, Eval
|
||||
from trytond.pyson import Eval
|
||||
from trytond.transaction import Transaction
|
||||
from trytond.pool import Pool
|
||||
|
||||
STATES = {
|
||||
'readonly': Not(Bool(Eval('active'))),
|
||||
}
|
||||
'readonly': ~Eval('active', True),
|
||||
}
|
||||
DEPENDS = ['active']
|
||||
|
||||
class UomCategory(ModelSQL, ModelView):
|
||||
|
||||
Reference in new issue
Block a user