Make PYSON more Pythonic

This commit is contained in:
Cédric Krier committed 2011-08-21 11:20:46 +02:00
1 parent 1595175929
commit dfd989b6f0
2 files changed
+6 -6

No files matched your search

+3 -3
View File
@@ -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 -3
View File
@@ -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):