From f728ec93fd506b5582725ca87c44e9ea819a99c8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thibault=20Delavall=C3=A9e?= Date: Thu, 11 Apr 2013 15:41:19 +0200 Subject: [PATCH] [FIX] email_template: fixed errors due to template_id now being a many2one, not an int anymore. bzr revid: tde@openerp.com-20130411134119-q1o71pn34v8u49jy --- addons/email_template/wizard/mail_compose_message.py | 4 ++-- 1 file 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