Somesh Khare(OpenERP) has proposed merging
lp:~openerp-dev/openobject-addons/6.1-opw-577014-skh into
lp:openobject-addons/6.1.
Requested reviews:
Naresh(OpenERP) (nch-openerp)
For more details, see:
https://code.launchpad.net/~openerp-dev/openobject-addons/6.1-opw-577014-skh/+merge/115665
Hello Sir,
[FIX] email_template: sending mail from the template Sidebar action button
shows expression value not the original values.
Steps to reproduce:
1. Create a template as Issue Template on the model "project.issue" and provide
the email details as "${object.partner_address_id.email}" in the To/From/CC/BCC
field.
2. Create a Side bar action button on the template.
3. Open Issue form and create an issue and Try to send email from the created
Side bar action button.
Current Behavior:
Wizard shows the expression values as "${object.partner_address_id.email}"
Expected Behavior:
Wizard should shows actual email address
ex:"[email protected]".
This branch fixes this issue.
Thanks,
Somesh Khare
--
https://code.launchpad.net/~openerp-dev/openobject-addons/6.1-opw-577014-skh/+merge/115665
Your team OpenERP R&D Team is subscribed to branch
lp:~openerp-dev/openobject-addons/6.1-opw-577014-skh.
=== modified file 'email_template/wizard/mail_compose_message.py'
--- email_template/wizard/mail_compose_message.py 2012-04-12 12:34:50 +0000
+++ email_template/wizard/mail_compose_message.py 2012-07-19 08:56:10 +0000
@@ -88,6 +88,13 @@
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 = {}
_______________________________________________
Mailing list: https://launchpad.net/~openerp-dev-gtk
Post to : [email protected]
Unsubscribe : https://launchpad.net/~openerp-dev-gtk
More help : https://help.launchpad.net/ListHelp