Merge lp:~josepato-o/openobject-addons/addons-fix-jpv-988336 into lp:openobject-addons/6.1

Proposed by OpenBias
Status: Needs review
Proposed branch: lp:~josepato-o/openobject-addons/addons-fix-jpv-988336
Merge into: lp:openobject-addons/6.1
Diff against target: 29 lines (+13/-1)
1 file modified
email_template/wizard/mail_compose_message.py (+13/-1)
To merge this branch: bzr merge lp:~josepato-o/openobject-addons/addons-fix-jpv-988336
Reviewer Review Type Date Requested Status
OpenERP Core Team Pending
Review via email: mp+104942@code.launchpad.net

Description of the change

  [FIX]-988336- on the mail compose window the values are displayed insted of the variables

To post a comment you must log in.

Unmerged revisions

6790. By Jose Patricio Villarreal

[FIX]-988336- on the mail compose window the values are displayed insted of the variables

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'email_template/wizard/mail_compose_message.py'
2--- email_template/wizard/mail_compose_message.py 2012-03-23 15:46:38 +0000
3+++ email_template/wizard/mail_compose_message.py 2012-05-07 17:06:03 +0000
4@@ -104,12 +104,24 @@
5 }
6 att_ids.append(attachment_obj.create(cr, uid, data_attach))
7 values['attachment_ids'] = att_ids
8+ ### Renders values
9+ template = self.pool.get('email.template').get_email_template(cr, uid, template_id, res_id, context)
10+ model = template.model
11+ values['body_text'] = self.render_template(cr, uid,values['body_text'] , model, res_id, context=None)
12+ values['email_from'] = self.render_template(cr, uid,values['email_from'] , model, res_id, context=None)
13+ values['email_to'] = self.render_template(cr, uid,values['email_to'] , model, res_id, context=None)
14+ values['email_cc'] = self.render_template(cr, uid,values['email_cc'] , model, res_id, context=None)
15+ values['email_bcc'] = self.render_template(cr, uid,values['email_bcc'] , model, res_id, context=None)
16+ values['subject'] = self.render_template(cr, uid,values['subject'] , model, res_id, context=None)
17+ values['body_html'] = self.render_template(cr, uid,values['body_html'] , model, res_id, context=None)
18+
19 else:
20 # restore defaults
21 values = self.default_get(cr, uid, self.fields_get_keys(cr, uid), context)
22 values.update(use_template=use_template, template_id=template_id)
23-
24 return {'value': values}
25+
26+
27
28
29 def template_toggle(self, cr, uid, ids, context=None):