summaryrefslogtreecommitdiff
path: root/addons/mail/wizard/mail_compose_message.py
diff options
context:
space:
mode:
authorThibault Delavallée <tde@openerp.com>2013-03-14 12:03:44 +0100
committerThibault Delavallée <tde@openerp.com>2013-03-14 12:03:44 +0100
commit8a95e1886ebdb92916b37cd5a0ff4d5cd2fc7ee1 (patch)
treed6ac6ef136f309b812d22abf715c28459fe68916 /addons/mail/wizard/mail_compose_message.py
parentf4dbf7051b4326b169cc1b94fc3b3ffd112b0640 (diff)
[FIX] mail_compose_message: remove some keys from the context, as they conflict with mail_mail values.
bzr revid: tde@openerp.com-20130314110344-w5ashhs3jc1oslzp
Diffstat (limited to 'addons/mail/wizard/mail_compose_message.py')
-rw-r--r--addons/mail/wizard/mail_compose_message.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/addons/mail/wizard/mail_compose_message.py b/addons/mail/wizard/mail_compose_message.py
index 57daaf15a5e..12c26c14732 100644
--- a/addons/mail/wizard/mail_compose_message.py
+++ b/addons/mail/wizard/mail_compose_message.py
@@ -234,6 +234,10 @@ class mail_compose_message(osv.TransientModel):
# automatically subscribe recipients if asked to
if context.get('mail_post_autofollow') and wizard.model and post_values.get('partner_ids'):
active_model_pool.message_subscribe(cr, uid, [res_id], [item[1] for item in post_values.get('partner_ids')], context=context)
+ # clean the context (hint: mass mailing sets some default values that
+ # could be wrongly interpreted by mail_mail)
+ context.pop('default_email_to', None)
+ context.pop('default_partner_ids', None)
# post the message
if mass_mail_mode and not wizard.post:
post_values['recipient_ids'] = post_values.pop('partner_ids')