summaryrefslogtreecommitdiff
path: root/addons/mail/wizard/mail_compose_message.py
diff options
context:
space:
mode:
authorThibault Delavallée <tde@odoo.com>2018-01-19 11:17:11 +0100
committerThibault Delavallée <tde@odoo.com>2018-01-29 16:33:07 +0100
commitcae1c3977ff2777dcb77e4c2a51deb72ee57db22 (patch)
treed1e22c2cbff9d2fe88c89e9acfa1947aa35b7fbf /addons/mail/wizard/mail_compose_message.py
parent304e6cf90b9ef969c809030b3e65ac6b667eea0e (diff)
[REF] mail: rename notification methods and make them private
Purpose of this commit is to perform a light cleaning of the email notification process. It renames method by prefixing them by _notify in order to easily spot them. It also makes them private because they should not be called outside of other methods. Indeed those methods are technical and do not provide useful information to external people. Future commits will probably improve the notification process in order to clean it and try to reduce its query count. This commit perform the following renaming * message_get_email_values -> _notify_specific_email_values * message_get_recipient_values -> _notify_email_recipients * _message_notification_recipients -> _notify_classify_recipients * message_get_reply_to -> _notify_get_reply_to
Diffstat (limited to 'addons/mail/wizard/mail_compose_message.py')
-rw-r--r--addons/mail/wizard/mail_compose_message.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/addons/mail/wizard/mail_compose_message.py b/addons/mail/wizard/mail_compose_message.py
index db46e76d5c8..de83584f282 100644
--- a/addons/mail/wizard/mail_compose_message.py
+++ b/addons/mail/wizard/mail_compose_message.py
@@ -277,8 +277,8 @@ class MailComposer(models.TransientModel):
# compute alias-based reply-to in batch
reply_to_value = dict.fromkeys(res_ids, None)
if mass_mail_mode and not self.no_auto_thread:
- # reply_to_value = self.env['mail.thread'].with_context(thread_model=self.model).browse(res_ids).message_get_reply_to(default=self.email_from)
- reply_to_value = self.env['mail.thread'].with_context(thread_model=self.model).message_get_reply_to(res_ids, default=self.email_from)
+ # reply_to_value = self.env['mail.thread'].with_context(thread_model=self.model).browse(res_ids)._notify_get_reply_to(default=self.email_from)
+ reply_to_value = self.env['mail.thread'].with_context(thread_model=self.model)._notify_get_reply_to(res_ids, default=self.email_from)
for res_id in res_ids:
# static wizard (mail.message) values
@@ -298,8 +298,8 @@ class MailComposer(models.TransientModel):
# mass mailing: rendering override wizard static values
if mass_mail_mode and self.model:
- if self.model in self.env and hasattr(self.env[self.model], 'message_get_email_values'):
- mail_values.update(self.env[self.model].browse(res_id).message_get_email_values())
+ if self.model in self.env and hasattr(self.env[self.model], '_notify_specific_email_values'):
+ mail_values.update(self.env[self.model].browse(res_id)._notify_specific_email_values(False))
# keep a copy unless specifically requested, reset record name (avoid browsing records)
mail_values.update(notification=not self.auto_delete_message, model=self.model, res_id=res_id, record_name=False)
# auto deletion of mail_mail