diff options
| author | Thibault Delavallée <tde@odoo.com> | 2018-01-12 12:39:30 +0100 |
|---|---|---|
| committer | Thibault Delavallée <tde@odoo.com> | 2018-01-29 16:35:36 +0100 |
| commit | d1ec600c432b0f47a40e6655a1e462213c4ad5a1 (patch) | |
| tree | d14c355fc036466050a773dd909d7e9ddd6399d6 /addons/mail/wizard/mail_compose_message.py | |
| parent | cae1c3977ff2777dcb77e4c2a51deb72ee57db22 (diff) | |
[IMP] mail: move custom_layout context management in wizard
Purpose of this commit is to clean the use of custom_layout in context
in order to have more explicit argument.
Several mail.compose.message instances are called using the
custom_layout magic key. As this parameter is now managed directly
by message_post API we can remove its management in the notification
process and add it explicitly in the wizard's message_post call.
Diffstat (limited to 'addons/mail/wizard/mail_compose_message.py')
| -rw-r--r-- | addons/mail/wizard/mail_compose_message.py | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/addons/mail/wizard/mail_compose_message.py b/addons/mail/wizard/mail_compose_message.py index de83584f282..1aa444cd854 100644 --- a/addons/mail/wizard/mail_compose_message.py +++ b/addons/mail/wizard/mail_compose_message.py @@ -197,6 +197,7 @@ class MailComposer(models.TransientModel): def send_mail(self, auto_commit=False): """ Process the wizard content and proceed with sending the related email(s), rendering any template patterns on the fly if needed. """ + notif_layout = self._context.get('custom_layout') for wizard in self: # Duplicate attachments linked to the email.template. # Indeed, basic mail.compose.message wizard duplicates attachments in mass @@ -255,6 +256,7 @@ class MailComposer(models.TransientModel): ActiveModel.browse(res_id).message_post( message_type=wizard.message_type, subtype_id=subtype_id, + notif_layout=notif_layout, **mail_values) if wizard.composition_mode == 'mass_mail': |
