Remove safe_eval

We convert all the fields that were storing python code into PYSON.
We add a pyson attribute on field tag to store PYSON value.

issue4416
review6971002
This commit is contained in:
Cédric Krier committed 2015-03-09 19:41:54 +01:00
1 parent 96b94d1641
commit 380990687d
2 files changed
+8 -2

No files matched your search

+7
View File
@@ -109,3 +109,10 @@ class Template:
@staticmethod
def default_weight_digits():
return 2
@classmethod
def view_attributes(cls):
return super(Template, cls).view_attributes() + [
('//page[@id="measurements"]', 'states', {
'invisible': Eval('type').in_(NON_MEASURABLE),
})]
+1 -2
View File
@@ -3,8 +3,7 @@
this repository contains the full copyright notices and license terms. -->
<data>
<xpath expr="/form/notebook" position="inside">
<page string="Measurements" col="3" id="measurements"
states="{'invisible': Eval('type').in_(['service'])}">
<page string="Measurements" col="3" id="measurements">
<label name="length"/>
<field name="length"/>
<field name="length_uom"/>