Allow to specify datetime related values in XML files

issue6660
review35181002
This commit is contained in:
Nicolas Évrard
2017-07-27 09:40:14 +02:00
parent 6a762d9213
commit d634220a9f
2 changed files with 3 additions and 0 deletions
+1
View File
@@ -1,3 +1,4 @@
* Allow to specify datetime related values in XML files
* Add environment variables to wsgi script
* Add unique ids check on RPC
* Assert unique records on ModelView.button and Workflow.transition
+2
View File
@@ -1,6 +1,7 @@
# This file is part of Tryton. The COPYRIGHT file at the top level of
# this repository contains the full copyright notices and license terms.
import time
import datetime
from xml import sax
import logging
import re
@@ -230,6 +231,7 @@ class RecordTagHandler:
context['version'] = __version__.rsplit('.', 1)[0]
context['ref'] = self.mh.get_id
context['Decimal'] = Decimal
context['datetime'] = datetime
if pyson_attr:
context.update(CONTEXT)
value = eval(eval_attr, context)