diff --git a/trytond/ir/actions.xml b/trytond/ir/actions.xml
index f1a4997759..866f3e44fc 100644
--- a/trytond/ir/actions.xml
+++ b/trytond/ir/actions.xml
@@ -7,7 +7,7 @@
ir.actions.actions
form
-
@@ -22,7 +22,7 @@
- ]]>
+ ]]>
@@ -30,12 +30,12 @@
ir.actions.actions
tree
-
- ]]>
+ ]]>
@@ -65,7 +65,7 @@
ir.actions.report
form
-
@@ -73,7 +73,7 @@
- ]]>
+ ]]>
@@ -81,13 +81,13 @@
ir.actions.report
tree
-
- ]]>
+ ]]>
@@ -117,7 +117,7 @@
ir.actions.act_window
form
-
@@ -145,7 +145,7 @@
- ]]>
+ ]]>
@@ -153,7 +153,7 @@
ir.actions.act_window
tree
-
@@ -161,7 +161,7 @@
- ]]>
+ ]]>
@@ -189,14 +189,14 @@
ir.actions.wizard
form
-
- ]]>
+ ]]>
@@ -204,14 +204,14 @@
ir.actions.wizard
tree
-
- ]]>
+ ]]>
diff --git a/trytond/ir/attachment.xml b/trytond/ir/attachment.xml
index 61c5be3ff3..c0987edc89 100644
--- a/trytond/ir/attachment.xml
+++ b/trytond/ir/attachment.xml
@@ -6,7 +6,7 @@
ir.attachment
form
-
@@ -17,7 +17,7 @@
- ]]>
+ ]]>
@@ -25,13 +25,13 @@
ir.attachment
tree
-
- ]]>
+ ]]>
diff --git a/trytond/ir/cron.xml b/trytond/ir/cron.xml
index 3dd72333b1..61819a90eb 100644
--- a/trytond/ir/cron.xml
+++ b/trytond/ir/cron.xml
@@ -6,7 +6,7 @@
ir.cron
tree
-
@@ -14,7 +14,7 @@
- ]]>
+ ]]>
@@ -22,7 +22,7 @@
ir.cron
form
-
@@ -41,7 +41,7 @@
- ]]>
+ ]]>
diff --git a/trytond/ir/exports.xml b/trytond/ir/exports.xml
index 4e8b10c4cc..4ad90c20ff 100644
--- a/trytond/ir/exports.xml
+++ b/trytond/ir/exports.xml
@@ -6,13 +6,13 @@
ir.exports
form
-
- ]]>
+ ]]>
@@ -20,12 +20,12 @@
ir.exports
tree
-
- ]]>
+ ]]>
diff --git a/trytond/ir/model.xml b/trytond/ir/model.xml
index 5113b193cb..59941a332e 100644
--- a/trytond/ir/model.xml
+++ b/trytond/ir/model.xml
@@ -6,7 +6,7 @@
ir.model
form
-
@@ -22,7 +22,7 @@
- ]]>
+ ]]>
@@ -30,12 +30,12 @@
ir.model
tree
-
- ]]>
+ ]]>
@@ -64,7 +64,7 @@
ir.model.fields
form
-
@@ -72,7 +72,7 @@
- ]]>
+ ]]>
@@ -80,12 +80,12 @@
ir.model.fields
tree
-
- ]]>
+ ]]>
@@ -114,13 +114,13 @@
ir.model.access
tree
-
- ]]>
+ ]]>
@@ -128,7 +128,7 @@
ir.model.access
form
-
@@ -139,7 +139,7 @@
- ]]>
+ ]]>
diff --git a/trytond/ir/module/category.xml b/trytond/ir/module/category.xml
index ef2b9321bf..1700819a0c 100644
--- a/trytond/ir/module/category.xml
+++ b/trytond/ir/module/category.xml
@@ -6,12 +6,12 @@
ir.module.category
form
-
- ]]>
+ ]]>
@@ -20,11 +20,11 @@
tree
child_ids
-
- ]]>
+ ]]>
diff --git a/trytond/ir/module/module.xml b/trytond/ir/module/module.xml
index 28c4dc64bf..a019c8e528 100644
--- a/trytond/ir/module/module.xml
+++ b/trytond/ir/module/module.xml
@@ -7,7 +7,7 @@
ir.module.module
form
-
@@ -51,7 +51,7 @@
- ]]>
+ ]]>
@@ -59,7 +59,7 @@
ir.module.module
tree
-
@@ -69,7 +69,7 @@
- ]]>
+ ]]>
diff --git a/trytond/ir/module/repository.xml b/trytond/ir/module/repository.xml
index a289c8b05b..88339687f0 100644
--- a/trytond/ir/module/repository.xml
+++ b/trytond/ir/module/repository.xml
@@ -6,7 +6,7 @@
ir.module.repository
form
-
@@ -14,7 +14,7 @@
- ]]>
+ ]]>
@@ -22,14 +22,14 @@
ir.module.repository
tree
-
- ]]>
+ ]]>
diff --git a/trytond/ir/rule.xml b/trytond/ir/rule.xml
index d3d224c6af..fc1980d6a8 100644
--- a/trytond/ir/rule.xml
+++ b/trytond/ir/rule.xml
@@ -6,7 +6,7 @@
ir.rule.group
form
-
@@ -19,7 +19,7 @@
colspan="6" align="0.0"/>
- ]]>
+ ]]>
@@ -27,13 +27,13 @@
ir.rule.group
tree
-
- ]]>
+ ]]>
@@ -62,7 +62,7 @@
ir.rule
form
-
@@ -70,7 +70,7 @@
- ]]>
+ ]]>
@@ -78,13 +78,13 @@
ir.rule
tree
-
- ]]>
+ ]]>
diff --git a/trytond/ir/sequence.xml b/trytond/ir/sequence.xml
index 8ce92a0d04..3927633977 100644
--- a/trytond/ir/sequence.xml
+++ b/trytond/ir/sequence.xml
@@ -7,7 +7,7 @@
ir.sequence
form
-
@@ -23,8 +23,8 @@
- ]]>
-
+ ]]>
+
@@ -32,13 +32,13 @@
ir.sequence
tree
-
- ]]>
+ ]]>
@@ -69,12 +69,12 @@
ir.sequence.type
form
-
- ]]>
+ ]]>
@@ -82,12 +82,12 @@
ir.sequence.type
tree
-
- ]]>
+ ]]>
ir.translation
form
-
@@ -15,7 +15,7 @@
- ]]>
+ ]]>
@@ -23,7 +23,7 @@
ir.translation
tree
-
@@ -31,7 +31,7 @@
- ]]>
+ ]]>
diff --git a/trytond/ir/values.xml b/trytond/ir/values.xml
index de99bd3c13..7db70eb195 100644
--- a/trytond/ir/values.xml
+++ b/trytond/ir/values.xml
@@ -6,7 +6,7 @@
ir.values
form
-
@@ -18,7 +18,7 @@
- ]]>
+ ]]>
@@ -26,7 +26,7 @@
ir.values
tree
-
@@ -34,7 +34,7 @@
- ]]>
+ ]]>
diff --git a/trytond/res/lang.xml b/trytond/res/lang.xml
index 0a4bda68a6..b2b5a67dcf 100644
--- a/trytond/res/lang.xml
+++ b/trytond/res/lang.xml
@@ -10,7 +10,7 @@
res.lang
tree
-
@@ -18,7 +18,7 @@
- ]]>
+ ]]>
diff --git a/trytond/res/request.xml b/trytond/res/request.xml
index 9c72d63d2e..0fb25201ea 100644
--- a/trytond/res/request.xml
+++ b/trytond/res/request.xml
@@ -6,7 +6,7 @@
res.request
tree
-
@@ -16,7 +16,7 @@
- ]]>
+ ]]>
@@ -24,7 +24,7 @@
res.request
form
-
@@ -60,7 +60,7 @@
- ]]>
+ ]]>
@@ -90,13 +90,13 @@
res.request.link
form
-
- ]]>
+ ]]>
@@ -104,12 +104,12 @@
res.request.link
tree
-
- ]]>
+ ]]>
@@ -117,14 +117,14 @@
res.request.history
tree
-
- ]]>
+ ]]>
@@ -132,7 +132,7 @@
res.request.history
form
-
@@ -140,7 +140,7 @@
- ]]>
+ ]]>
diff --git a/trytond/res/users.xml b/trytond/res/users.xml
index 42bf3c8f18..96de8437f5 100644
--- a/trytond/res/users.xml
+++ b/trytond/res/users.xml
@@ -9,16 +9,16 @@
admin
Administrator
Administrator
-
-
-
+
+
+
res.user.form
res.user
form
-
@@ -41,7 +41,7 @@
- ]]>
+ ]]>
@@ -49,12 +49,12 @@
res.user
tree
-
- ]]>
+ ]]>
@@ -84,7 +84,7 @@
res.group
form
-
@@ -98,7 +98,7 @@
- ]]>
+ ]]>
@@ -106,11 +106,11 @@
res.group
tree
-
- ]]>
+ ]]>
@@ -140,12 +140,12 @@
res.role
form
-
- ]]>
+ ]]>
@@ -154,11 +154,11 @@
tree
parent_id
-
- ]]>
+ ]]>
diff --git a/trytond/tools/convert.py b/trytond/tools/convert.py
index 36c3f71ea6..739c22b76a 100644
--- a/trytond/tools/convert.py
+++ b/trytond/tools/convert.py
@@ -10,8 +10,6 @@ from trytond.config import CONFIG
from trytond.version import VERSION
import logging
-
-
CDATA_START = re.compile('^\s*\<\!\[cdata\[', re.IGNORECASE)
CDATA_END = re.compile('\]\]\>\s*$', re.IGNORECASE)
@@ -882,9 +880,24 @@ class RecordTagHandler:
self.values[field_name] = self.mh.get_id(ref_attr)
elif eval_attr:
- print "NOT IMPLEMENTED : eval"
- pass
+ import time
+ context = {}
+ context['time'] = time
+ context['version'] = VERSION.rsplit('.', 1)[0]
+ context['ref'] = self.mh.get_id
+ context['obj'] = lambda *a: 1
+ try:
+ import pytz
+ except:
+ Logger().notify_channel("init", LOG_INFO,
+ 'could not find pytz library')
+ class Pytz(object):
+ all_timezones = []
+
+ pytz = Pytz()
+ context['pytz'] = pytz
+ self.values[field_name] = eval(eval_attr, context)
else:
raise Exception("Tags '%s' not supported inside tag record."% (name,))
@@ -995,9 +1008,8 @@ class TrytondXmlHandler(sax.handler.ContentHandler):
pass
else:
- # TODO logger, logger, logger, ...
- print "Tag", name , "not supported"
- raise
+ Logger().notify_channel("init", LOG_INFO,
+ "Tag", name , "not supported")
return
else:
self.taghandler.startElement(name, attributes)
@@ -1043,4 +1055,4 @@ def convert_xml_import_sax(cursor, module, xmlstream, idref=None, mode='init',
# use convert_xml_import_sax or convert_xml_import_dom
-convert_xml_import = convert_xml_import_dom
+convert_xml_import = convert_xml_import_sax
diff --git a/trytond/workflow/workflow.xml b/trytond/workflow/workflow.xml
index df5323bffa..07178f7c94 100644
--- a/trytond/workflow/workflow.xml
+++ b/trytond/workflow/workflow.xml
@@ -7,7 +7,7 @@
workflow
form
-
@@ -15,7 +15,7 @@
- ]]>
+ ]]>
@@ -23,13 +23,13 @@
workflow
tree
-
- ]]>
+ ]]>
@@ -58,7 +58,7 @@
workflow.activity
form
-
@@ -94,7 +94,7 @@
- ]]>
+ ]]>
@@ -102,7 +102,7 @@
workflow.activity
tree
-
@@ -111,7 +111,7 @@
- ]]>
+ ]]>
@@ -140,7 +140,7 @@
workflow.transition
form
-
@@ -150,7 +150,7 @@
- ]]>
+ ]]>
@@ -158,7 +158,7 @@
workflow.transition
tree
-
@@ -168,7 +168,7 @@
- ]]>
+ ]]>
@@ -197,7 +197,7 @@
workflow.instance
form
-
@@ -205,7 +205,7 @@
- ]]>
+ ]]>
@@ -213,7 +213,7 @@
workflow.instance
tree
-
@@ -221,7 +221,7 @@
- ]]>
+ ]]>
@@ -243,14 +243,14 @@
workflow.workitem
form
-
- ]]>
+ ]]>
@@ -258,14 +258,14 @@
workflow.workitem
tree
-
- ]]>
+ ]]>