Skip to content
Snippets Groups Projects
Commit e6aadeb5 authored by Fabien Meghazi's avatar Fabien Meghazi
Browse files

[FIX] Set correct record id for <template> tag converter

bzr revid: fme@openerp.com-20140327103844-irs3dga2xs969mdk
parent 4d850cdb
Branches
Tags
No related merge requests found
......@@ -857,12 +857,12 @@ form: module.record_id""" % (xml_id,)
def _tag_template(self, cr, el, data_node=None):
# This helper transforms a <template> element into a <record> and forwards it
tpl_id = el.get('id', el.get('t-name', '')).encode('ascii')
module = self.module
if '.' in tpl_id:
module, tpl_id = tpl_id.split('.', 1)
full_tpl_id = tpl_id
if '.' not in full_tpl_id:
full_tpl_id = '%s.%s' % (self.module, tpl_id)
# set the full template name for qweb <module>.<id>
if not (el.get('inherit_id') or el.get('inherit_option_id')):
el.set('t-name', '%s.%s' % (module, tpl_id))
el.set('t-name', full_tpl_id)
el.tag = 't'
else:
el.tag = 'data'
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment