summaryrefslogtreecommitdiff
path: root/addons/mass_mailing/wizard/mail_compose_message.py
diff options
context:
space:
mode:
authorThibault Delavallée <tde@openerp.com>2014-06-03 12:03:42 +0200
committerThibault Delavallée <tde@openerp.com>2014-06-03 12:03:42 +0200
commitc1b2b657fa653bfe30b818afcf1fc17fd58c0116 (patch)
tree14d681de5a43a815fdb1f18a787bb06c47ef4dec /addons/mass_mailing/wizard/mail_compose_message.py
parentaa1165441c880f248cb4c7df23e5590a7e8a43ca (diff)
parentcbdf7830b1cc75a57f3a473f6199032cd4123378 (diff)
Merge pull request #288 from odoo-dev/saas-4-mass_mailing_fixes-tde
[FIX] mass_mailing: fixes - backport (+ cleaning) of eb22d202e48068a82ddcfa3878dbe0cbb845cc9c (saas-5): mail_thread: routing: instead of exclusive routing heuristics, use each case as a fallback of the previous. - better fix for dd36a0e5093df90bd92667d26f529a3a79fe0397 (saas-5): mail_thread: routing: fixed replies always choosen even when replying to emails with a specified reply_to (using ref_match in the algorithm) - backport of d6a2ae642b1a48ce6cb227c3cde2deca847a0a33 (saas-5): avoid evaluating a False / None domain - fixed keeping the original message for routing, only when choosing to reply in the original thread (notification=True) - mail_thread: routing: fixed replies always chosen even when replying to emails with a specified reply_to (using ref_match in the algorithm)
Diffstat (limited to 'addons/mass_mailing/wizard/mail_compose_message.py')
-rw-r--r--addons/mass_mailing/wizard/mail_compose_message.py17
1 files changed, 11 insertions, 6 deletions
diff --git a/addons/mass_mailing/wizard/mail_compose_message.py b/addons/mass_mailing/wizard/mail_compose_message.py
index 4aebff2d04d..ede3fe37803 100644
--- a/addons/mass_mailing/wizard/mail_compose_message.py
+++ b/addons/mass_mailing/wizard/mail_compose_message.py
@@ -43,10 +43,15 @@ class MailComposeMessage(osv.TransientModel):
}, context=context)
mass_mailing = self.pool['mail.mass_mailing'].browse(cr, uid, mass_mailing_id, context=context)
for res_id in res_ids:
- res[res_id]['mailing_id'] = mass_mailing.id
- res[res_id]['statistics_ids'] = [(0, 0, {
- 'model': wizard.model,
- 'res_id': res_id,
- 'mass_mailing_id': mass_mailing.id,
- })]
+ res[res_id].update({
+ 'mailing_id': mass_mailing.id,
+ 'statistics_ids': [(0, 0, {
+ 'model': wizard.model,
+ 'res_id': res_id,
+ 'mass_mailing_id': mass_mailing.id,
+ })],
+ # email-mode: keep original message for routing
+ 'notification': mass_mailing.reply_to_mode == 'thread',
+ 'auto_delete': True,
+ })
return res