Use PySON

This commit is contained in:
Cédric Krier committed 2010-01-20 11:01:14 +01:00
1 parent 0f8ff90674
commit c9b2f6f9e7
3 files changed
+6 -4

No files matched your search

+2 -1
View File
@@ -1,9 +1,10 @@
#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
STATES = {
'readonly': "active == False",
'readonly': Not(Bool(Eval('active'))),
}
+2 -2
View File
@@ -165,8 +165,8 @@ this repository contains the full copyright notices and license terms. -->
<field name="name">Product by Category</field>
<field name="res_model">product.product</field>
<field name="view_type">form</field>
<field name="context">{'categories': [active_id]}</field>
<field name="domain">[('category','child_of', [active_id], 'parent')]</field>
<field name="context">{'categories': [Eval('active_id')]}</field>
<field name="domain">[('category','child_of', [Eval('active_id')], 'parent')]</field>
</record>
<record model="ir.action.act_window.view" id="act_product_by_category_view1">
<field name="sequence" eval="10"/>
+2 -1
View File
@@ -2,10 +2,11 @@
#this repository contains the full copyright notices and license terms.
from trytond.model import ModelView, ModelSQL, fields
from trytond.model.modelstorage import OPERATORS
from trytond.pyson import Not, Bool, Eval
from decimal import Decimal
STATES = {
'readonly': "(active == False)",
'readonly': Not(Bool(Eval('active'))),
}
class UomCategory(ModelSQL, ModelView):