From 59849fd5e58e0a218ba89e600f3a34e42495071e Mon Sep 17 00:00:00 2001 From: Somesh Khare Date: Thu, 19 Jul 2012 14:05:22 +0530 Subject: [PATCH] [FIX] email_template: sending mail from the template action shows expression value not the original values (Case: Ref 577014) bzr revid: skh@tinyerp.com-20120719083522-bhtt53sqrme1z6q5 --- addons/email_template/wizard/mail_compose_message.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/addons/email_template/wizard/mail_compose_message.py b/addons/email_template/wizard/mail_compose_message.py index f37df754c7e..40593260cca 100644 --- a/addons/email_template/wizard/mail_compose_message.py +++ b/addons/email_template/wizard/mail_compose_message.py @@ -88,6 +88,13 @@ class mail_compose_message(osv.osv_memory): values = self.pool.get('email.template').read(cr, uid, template_id, self.fields_get_keys(cr, uid), context) report_xml_pool = self.pool.get('ir.actions.report.xml') template = self.pool.get('email.template').get_email_template(cr, uid, template_id, res_id, context) + values['email_from'] = self.render_template(cr, uid, template.email_from, template.model, res_id, context) + values['email_to'] = self.render_template(cr, uid, template.email_to, template.model, res_id, context) + values['email_cc'] = self.render_template(cr, uid, template.email_cc, template.model, res_id, context) + values['email_bcc'] = self.render_template(cr, uid, template.email_bcc, template.model, res_id, context) + values['reply_to'] = self.render_template(cr, uid, template.reply_to, template.model, res_id, context) + values['subject'] = self.render_template(cr, uid, template.subject, template.model, res_id, context) + values['body_text'] = self.render_template(cr, uid, template.body_text, template.model, res_id, context) or '' values['attachments'] = False attachments = {}