[FIX] mass_mailing: on mass mailing sending, set same_thread for message composer
same_thread boolean field of mail.compose.message model define wether or not replies should be posted in the thread or not On composer creation, this boolean should be passed according to the reply_to_mode of the mass_mailing Otherwise, all replies would be posted in the thread, and the reply_to will be ignored (if same_thread id True, reply_to is poped from the mails values, mail/wizard/mail_compose_message.py:284)
This commit is contained in:
parent
d6a2ae642b
commit
dd36a0e509
|
@ -244,6 +244,8 @@ class mail_compose_message(osv.TransientModel):
|
|||
def get_mail_values(self, cr, uid, wizard, res_ids, context=None):
|
||||
"""Generate the values that will be used by send_mail to create mail_messages
|
||||
or mail_mails. """
|
||||
import pudb
|
||||
pudb.set_trace()
|
||||
results = dict.fromkeys(res_ids, False)
|
||||
rendered_values, default_recipients = {}, {}
|
||||
mass_mail_mode = wizard.composition_mode == 'mass_mail'
|
||||
|
|
|
@ -571,6 +571,7 @@ class MassMailing(osv.Model):
|
|||
'composition_mode': 'mass_mail',
|
||||
'mass_mailing_id': mailing.id,
|
||||
'mailing_list_ids': [(4, l.id) for l in mailing.contact_list_ids],
|
||||
'same_thread': mailing.reply_to_mode == 'thread',
|
||||
}
|
||||
if mailing.reply_to_mode == 'email':
|
||||
composer_values['reply_to'] = mailing.reply_to
|
||||
|
|
Loading…
Reference in New Issue