[FIX] mass_mailing: force to not use a template for the rendering
If the user configures a default `template_id` for the `mail.compose.message`, this template was used by the mass mailing to render the email, and, among others, it therefore used the `email_to` of this email template, to render the recipients, and it was configured empty or something else than `object.id`, it did not used the `active_ids` passed in the context to the `mail.compose.message` `create` call to compute the correct recipients To reproduce: - In developer mode (?debug) - Open the full mail compose message e.g. in app sales, open a so, hit new message, and hit the button to open the full message composer - Set the template to the quotation template is not there already - In the debug menu of the dialog, View > Set defaults, - Click the radio button to all users, and the default to Use template = ... - Then, try to send a mass mailing. It will fail because it cannot compute the `email_to` values correctly because the `email_to` of the quotation template is empty. opw-1840287
This commit is contained in:
@@ -785,6 +785,7 @@ class MassMailing(osv.Model):
|
||||
'mass_mailing_id': mailing.id,
|
||||
'mailing_list_ids': [(4, l.id) for l in mailing.contact_list_ids],
|
||||
'no_auto_thread': mailing.reply_to_mode != 'thread',
|
||||
'template_id': None,
|
||||
}
|
||||
if mailing.reply_to_mode == 'email':
|
||||
composer_values['reply_to'] = mailing.reply_to
|
||||
|
||||
Reference in New Issue
Block a user