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
=== modified file 'email_template/wizard/mail_compose_message.py'
--- email_template/wizard/mail_compose_message.py 2012-03-23 15:46:38 +0000
+++ email_template/wizard/mail_compose_message.py 2012-05-07 17:06:03 +0000
@@ -104,12 +104,24 @@
104 }104 }
105 att_ids.append(attachment_obj.create(cr, uid, data_attach))105 att_ids.append(attachment_obj.create(cr, uid, data_attach))
106 values['attachment_ids'] = att_ids106 values['attachment_ids'] = att_ids
107 ### Renders values
108 template = self.pool.get('email.template').get_email_template(cr, uid, template_id, res_id, context)
109 model = template.model
110 values['body_text'] = self.render_template(cr, uid,values['body_text'] , model, res_id, context=None)
111 values['email_from'] = self.render_template(cr, uid,values['email_from'] , model, res_id, context=None)
112 values['email_to'] = self.render_template(cr, uid,values['email_to'] , model, res_id, context=None)
113 values['email_cc'] = self.render_template(cr, uid,values['email_cc'] , model, res_id, context=None)
114 values['email_bcc'] = self.render_template(cr, uid,values['email_bcc'] , model, res_id, context=None)
115 values['subject'] = self.render_template(cr, uid,values['subject'] , model, res_id, context=None)
116 values['body_html'] = self.render_template(cr, uid,values['body_html'] , model, res_id, context=None)
117
107 else:118 else:
108 # restore defaults119 # restore defaults
109 values = self.default_get(cr, uid, self.fields_get_keys(cr, uid), context)120 values = self.default_get(cr, uid, self.fields_get_keys(cr, uid), context)
110 values.update(use_template=use_template, template_id=template_id)121 values.update(use_template=use_template, template_id=template_id)
111
112 return {'value': values}122 return {'value': values}
123
124
113125
114126
115 def template_toggle(self, cr, uid, ids, context=None):127 def template_toggle(self, cr, uid, ids, context=None):