[IMP] email.template.preview: preview HTML body too

bzr revid: odo@openerp.com-20110930210954-8clkgqf4euf2xczl
This commit is contained in:
Olivier Dony 2011-09-30 23:09:54 +02:00
parent dc5089ed1c
commit f463c4f0b5
1 changed files with 2 additions and 0 deletions

View File

@ -87,6 +87,8 @@ class email_template_preview(osv.osv_memory):
signature = self.pool.get('res.users').browse(cr, uid, uid, context).signature
description += '\n' + signature
vals['body_text'] = description
if template.body_html:
vals['body_html'] = self.render_template(cr, uid, template.body_html, model, res_id, context) or ''
vals['report_name'] = self.render_template(cr, uid, template.report_name, model, res_id, context)
return {'value': vals}