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

bzr revid: fme@openerp.com-20140327103844-irs3dga2xs969mdk
This commit is contained in:
Fabien Meghazi 2014-03-27 11:38:44 +01:00
parent 4d850cdbc9
commit e6aadeb58c
1 changed files with 4 additions and 4 deletions

View File

@ -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'