From e676beaa3851a4476876206b8217db87a7acd92f Mon Sep 17 00:00:00 2001 From: "Jalpesh Patel (OpenERP)" Date: Mon, 8 Oct 2012 11:41:46 +0530 Subject: [PATCH] [IMP]check condition bzr revid: pja@tinyerp.com-20121008061146-jz78eocp772xztob --- addons/mail/wizard/mail_compose_message.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/addons/mail/wizard/mail_compose_message.py b/addons/mail/wizard/mail_compose_message.py index b0e2e89d795..87050ebb771 100644 --- a/addons/mail/wizard/mail_compose_message.py +++ b/addons/mail/wizard/mail_compose_message.py @@ -81,8 +81,11 @@ class mail_compose_message(osv.TransientModel): elif composition_mode == 'comment' and model and res_id: vals = self.get_record_data(cr, uid, model, res_id, context=context) elif composition_mode == 'mass_mail' and model and active_ids: - vals = self.pool.get('email.template').generate_email(cr, uid, context.get('default_template_id'), res_id, context=context) - vals.update({'content_subtype': 'html'}) + if context.get('default_template_id'): + vals = email_template_obj.generate_email(cr, uid, context.get('default_template_id'), res_id, context=context) + vals.update({'content_subtype': 'html'}) + else: + vals = {'model': model, 'res_id': res_id, 'content_subtype': 'html'} else: vals = {'model': model, 'res_id': res_id} if composition_mode: