diff --git a/CHANGELOG b/CHANGELOG index a3b48802c4..21d5be1b15 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -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 diff --git a/trytond/convert.py b/trytond/convert.py index 9d50bb879c..315e18acea 100644 --- a/trytond/convert.py +++ b/trytond/convert.py @@ -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)