summaryrefslogtreecommitdiff
path: root/addons/mail/models/mail_thread.py
diff options
context:
space:
mode:
authorThibault Delavallée <tde@odoo.com>2018-01-03 15:56:42 +0100
committerThibault Delavallée <tde@odoo.com>2018-01-08 15:04:56 +0100
commitfc1348dd3d73c2a5fbcc043f75b00272fedd6b20 (patch)
treee82c95b48809d69f757e41a6a85ff20934182e71 /addons/mail/models/mail_thread.py
parent4622059b4d093df90e19154bfee2589f21d23bc6 (diff)
[REM] mail: remove unnecessary methods from mail.thread
* one dead method; * one unnecessary method to inline; * one unnecessary wrapper;
Diffstat (limited to 'addons/mail/models/mail_thread.py')
-rw-r--r--addons/mail/models/mail_thread.py25
1 files changed, 3 insertions, 22 deletions
diff --git a/addons/mail/models/mail_thread.py b/addons/mail/models/mail_thread.py
index 317efc6d09d..1131f1fe570 100644
--- a/addons/mail/models/mail_thread.py
+++ b/addons/mail/models/mail_thread.py
@@ -555,13 +555,6 @@ class MailThread(models.AbstractModel):
DocModel.browse(res_ids).check_access_rule(check_operation)
@api.model
- def _get_inbox_action_xml_id(self):
- """ When redirecting towards the Inbox, choose which action xml_id has
- to be fetched. This method is meant to be inherited, at least in portal
- because portal users have a different Inbox action than classic users. """
- return 'mail.mail_channel_action_client_chat'
-
- @api.model
def _generate_notification_token(self, base_link, params):
secret = self.env['ir.config_parameter'].sudo().get_param('database.secret')
token = '%s?%s' % (base_link, ' '.join('%s=%s' % (key, params[key]) for key in sorted(params)))
@@ -808,15 +801,6 @@ class MailThread(models.AbstractModel):
# Mail gateway
# ------------------------------------------------------
- @api.model
- def message_capable_models(self):
- """ Used by the plugin addon, based for plugin_outlook and others. """
- ret_dict = {}
- for model_name, model in self.env.items():
- if hasattr(model, "message_process") and hasattr(model, "message_post"):
- ret_dict[model_name] = model._description
- return ret_dict
-
def _message_find_partners(self, message, header_fields=['From']):
""" Find partners related to some header fields of the message.
@@ -1705,18 +1689,15 @@ class MailThread(models.AbstractModel):
]).write({'author_id': partner_info['partner_id']})
return result
- def _message_preprocess_attachments(self, attachments, attachment_ids, attach_model, attach_res_id):
+ def _message_post_process_attachments(self, attachments, attachment_ids, message_data):
""" Preprocess attachments for mail_thread.message_post() or mail_mail.create().
:param list attachments: list of attachment tuples in the form ``(name,content)``,
where content is NOT base64 encoded
:param list attachment_ids: a list of attachment ids, not in tomany command form
- :param str attach_model: the model of the attachments parent record
- :param integer attach_res_id: the id of the attachments parent record
+ :param dict message_data: model: the model of the attachments parent record,
+ res_id: the id of the attachments parent record
"""
- return self._message_post_process_attachments(attachments, attachment_ids, {'model': attach_model, 'res_id': attach_res_id})
-
- def _message_post_process_attachments(self, attachments, attachment_ids, message_data):
IrAttachment = self.env['ir.attachment']
m2m_attachment_ids = []
cid_mapping = {}