try:
return unsafe_eval(a_eval, idref2)
except Exception:
- _logger.warning('could not eval(%s) for %s in %s' % (a_eval, node.get('name'), context), exc_info=True)
- return ""
+ logging.getLogger('openerp.tools.convert.init').error(
+ 'Could not eval(%s) for %s in %s', a_eval, node.get('name'), context)
+ raise
+ def _process(s, idref):
+ m = re.findall('[^%]%\((.*?)\)[ds]', s)
+ for id in m:
+ if not id in idref:
+ idref[id]=self.id_get(cr, id)
+ return s % idref
if t == 'xml':
- def _process(s, idref):
- m = re.findall('[^%]%\((.*?)\)[ds]', s)
- for id in m:
- if not id in idref:
- idref[id]=self.id_get(cr, id)
- return s % idref
_fix_multiple_roots(node)
return '<?xml version="1.0"?>\n'\
+_process("".join([etree.tostring(n, encoding='utf-8')