diff options
| author | Thibault Delavallée <tde@openerp.com> | 2014-06-02 13:52:27 +0200 |
|---|---|---|
| committer | Thibault Delavallée <tde@openerp.com> | 2014-06-02 13:52:27 +0200 |
| commit | cbdf7830b1cc75a57f3a473f6199032cd4123378 (patch) | |
| tree | 1a6805536c6d34ab003cb66544b27fee5219bf44 /addons/mass_mailing/wizard/mail_compose_message.py | |
| parent | c319dc40e7e87971865e95c68789b0534bd84b28 (diff) | |
[FIX] mass_mailing: fixes:
- fixed keeping the original message for routing, only when choosing to reply in the
original thread (notification=True)
- auto delete sent emails explicitely
- mail_thread: routing: fixed replies always choosen even when replying to emails
with a specified reply_to (using ref_match in the algorithm)
- mail_thread: routing: instead of exclusive routing heuristics, use each case
as a fallback of the previous.
Diffstat (limited to 'addons/mass_mailing/wizard/mail_compose_message.py')
| -rw-r--r-- | addons/mass_mailing/wizard/mail_compose_message.py | 17 |
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 |
