summaryrefslogtreecommitdiff
path: root/addons/email_template/wizard/mail_compose_message.py
diff options
context:
space:
mode:
authorThibault Delavallée <tde@openerp.com>2013-04-11 15:41:19 +0200
committerThibault Delavallée <tde@openerp.com>2013-04-11 15:41:19 +0200
commitf728ec93fd506b5582725ca87c44e9ea819a99c8 (patch)
tree93b5329fd8a37f5756a308e4c882bd478e8e1c1b /addons/email_template/wizard/mail_compose_message.py
parent4da68cbc22e7da28f19d3409828744e93a0d1465 (diff)
[FIX] email_template: fixed errors due to template_id now being a many2one, not an int anymore.
bzr revid: tde@openerp.com-20130411134119-q1o71pn34v8u49jy
Diffstat (limited to 'addons/email_template/wizard/mail_compose_message.py')
-rw-r--r--addons/email_template/wizard/mail_compose_message.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/addons/email_template/wizard/mail_compose_message.py b/addons/email_template/wizard/mail_compose_message.py
index fa49309616a..7f44828ce15 100644
--- a/addons/email_template/wizard/mail_compose_message.py
+++ b/addons/email_template/wizard/mail_compose_message.py
@@ -57,7 +57,7 @@ class mail_compose_message(osv.TransientModel):
for wizard in self.browse(cr, uid, ids, context=context):
if not wizard.attachment_ids or wizard.composition_mode == 'mass_mail' or not wizard.template_id:
continue
- template = self.pool.get('email.template').browse(cr, uid, wizard.template_id, context=context)
+ template = self.pool.get('email.template').browse(cr, uid, wizard.template_id.id, context=context)
new_attachment_ids = []
for attachment in wizard.attachment_ids:
if attachment in template.attachment_ids:
@@ -163,7 +163,7 @@ class mail_compose_message(osv.TransientModel):
""" Override to handle templates. """
# generate the composer email
if wizard.template_id:
- values = self.generate_email_for_composer(cr, uid, wizard.template_id, res_id, context=context)
+ values = self.generate_email_for_composer(cr, uid, wizard.template_id.id, res_id, context=context)
else:
values = {}
# remove attachments as they should not be rendered