summaryrefslogtreecommitdiff
path: root/addons/mail/wizard/mail_compose_message.py
diff options
context:
space:
mode:
authorXavierDo <xdo@odoo.com>2018-06-27 16:10:50 +0200
committerXavierDo <xdo@odoo.com>2018-07-11 12:25:33 +0200
commitc8d283a592719fdbe2c0ab026899224ad348d861 (patch)
tree95d90cfe4321f56df4b2acf1f96882a4c91aa6ad /addons/mail/wizard/mail_compose_message.py
parent62591c58f8abded96b5fedcc4d9760550b7bdf18 (diff)
[FIX]: mail: storing add_sign on mail message
Only the add_sign from notif_values is usefull for a resend. We can consider that a mail on resend can be delete in every case, and we can find the model_description from model since a resend can only be performed on message linked to a model. The other notif_values are now parameter in order to ease the understanding of what can transit through this flow. Task: #1860054 PR: #25622
Diffstat (limited to 'addons/mail/wizard/mail_compose_message.py')
-rw-r--r--addons/mail/wizard/mail_compose_message.py10
1 files changed, 3 insertions, 7 deletions
diff --git a/addons/mail/wizard/mail_compose_message.py b/addons/mail/wizard/mail_compose_message.py
index 905c7194083..afccac5318a 100644
--- a/addons/mail/wizard/mail_compose_message.py
+++ b/addons/mail/wizard/mail_compose_message.py
@@ -147,7 +147,7 @@ class MailComposer(models.TransientModel):
return super(MailComposer, self).check_access_rule(operation)
@api.multi
- def _notify(self, layout=False, force_send=False, send_after_commit=True, values=None):
+ def _notify(self, **kwargs):
""" Override specific notify method of mail.message, because we do
not want that feature in the wizard. """
return
@@ -198,7 +198,6 @@ class MailComposer(models.TransientModel):
""" 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')
- ctx_notif_values = self._context.get('notif_values', {})
for wizard in self:
# Duplicate attachments linked to the email.template.
# Indeed, basic mail.compose.message wizard duplicates attachments in mass
@@ -247,15 +246,12 @@ class MailComposer(models.TransientModel):
if wizard.composition_mode == 'mass_mail':
batch_mails |= Mail.create(mail_values)
else:
- notif_values = dict(
- add_sign=not bool(wizard.template_id),
- mail_auto_delete=wizard.template_id.auto_delete if wizard.template_id else False,
- **ctx_notif_values)
post_params = dict(
message_type=wizard.message_type,
subtype_id=subtype_id,
notif_layout=notif_layout,
- notif_values=notif_values,
+ add_sign=not bool(wizard.template_id),
+ mail_auto_delete=wizard.template_id.auto_delete if wizard.template_id else False,
**mail_values)
if ActiveModel._name == 'mail.thread' and wizard.model:
post_params['model'] = wizard.model