[FIX] email_template: back to partner_ids generation when using templates
authorThibault Delavallée <tde@openerp.com>
Wed, 16 Apr 2014 08:39:46 +0000 (10:39 +0200)
committerThibault Delavallée <tde@openerp.com>
Wed, 16 Apr 2014 08:39:46 +0000 (10:39 +0200)
bzr revid: tde@openerp.com-20140416083946-2qlv0liu8doshh9q

addons/email_template/wizard/mail_compose_message.py

index 8bfc259..676f11b 100644 (file)
@@ -152,7 +152,7 @@ class mail_compose_message(osv.TransientModel):
         returned_fields = fields + ['partner_ids', 'attachments']
         values = dict.fromkeys(res_ids, False)
 
-        ctx = dict(context)
+        ctx = dict(context, tpl_partners_only=True)
         template_values = self.pool.get('email.template').generate_email_batch(cr, uid, template_id, res_ids, fields=fields, context=ctx)
         for res_id in res_ids:
             res_id_values = dict((field, template_values[res_id][field]) for field in returned_fields if template_values[res_id].get(field))