[FIX]email_template: render_template_batch return a dict, so we must get the right id of the dict to get the lang

bzr revid: dle@openerp.com-20131118163114-rpmyjik1dkjuipez
This commit is contained in:
Denis Ledoux 2013-11-18 17:31:14 +01:00
parent 9cede6794d
commit f0ee6bac0a
1 changed files with 1 additions and 1 deletions

View File

@ -378,7 +378,7 @@ class email_template(osv.osv):
# Ensure report is rendered using template's language
ctx = context.copy()
if template.lang:
ctx['lang'] = self.render_template_batch(cr, uid, template.lang, template.model, [res_id], context) # take 0 ?
ctx['lang'] = self.render_template_batch(cr, uid, template.lang, template.model, [res_id], context)[res_id] # take 0 ?
result, format = openerp.report.render_report(cr, uid, [res_id], report_service, {'model': template.model}, ctx)
result = base64.b64encode(result)
if not report_name: