diff options
Diffstat (limited to 'addons/mail/wizard/mail_compose_message.py')
| -rw-r--r-- | addons/mail/wizard/mail_compose_message.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/addons/mail/wizard/mail_compose_message.py b/addons/mail/wizard/mail_compose_message.py index cc2dff25f38..d8b88f9fce3 100644 --- a/addons/mail/wizard/mail_compose_message.py +++ b/addons/mail/wizard/mail_compose_message.py @@ -65,8 +65,7 @@ class MailComposer(models.TransientModel): result['model'] = result.get('model', self._context.get('active_model')) result['res_id'] = result.get('res_id', self._context.get('active_id')) result['parent_id'] = result.get('parent_id', self._context.get('message_id')) - - if not result['model'] or not result['model'] in self.pool or not hasattr(self.env[result['model']], 'message_post'): + if 'no_auto_thread' not in result and (not result['model'] or not result['model'] in self.pool or not hasattr(self.env[result['model']], 'message_post')): result['no_auto_thread'] = True # default values according to composition mode - NOTE: reply is deprecated, fall back on comment @@ -216,7 +215,7 @@ class MailComposer(models.TransientModel): if wizard.template_id: # template user_signature is added when generating body_html # mass mailing: use template auto_delete value -> note, for emails mass mailing only - Mail = Mail.with_context(mail_notify_user_signature=False, mail_server_id=wizard.template_id.mail_server_id.id) + Mail = Mail.with_context(mail_notify_user_signature=False) ActiveModel = ActiveModel.with_context(mail_notify_user_signature=False, mail_auto_delete=wizard.template_id.auto_delete) if not hasattr(ActiveModel, 'message_post'): ActiveModel = self.env['mail.thread'].with_context(thread_model=wizard.model) @@ -282,6 +281,7 @@ class MailComposer(models.TransientModel): 'email_from': self.email_from, 'record_name': self.record_name, 'no_auto_thread': self.no_auto_thread, + 'mail_server_id': self.mail_server_id.id, } # mass mailing: rendering override wizard static values if mass_mail_mode and self.model: |
