summaryrefslogtreecommitdiff
path: root/addons/mail/models/mail_thread.py
diff options
context:
space:
mode:
Diffstat (limited to 'addons/mail/models/mail_thread.py')
-rw-r--r--addons/mail/models/mail_thread.py19
1 files changed, 0 insertions, 19 deletions
diff --git a/addons/mail/models/mail_thread.py b/addons/mail/models/mail_thread.py
index 349396ee0a4..5786a4ed357 100644
--- a/addons/mail/models/mail_thread.py
+++ b/addons/mail/models/mail_thread.py
@@ -478,25 +478,6 @@ class MailThread(models.AbstractModel):
return self
@api.model
- def _garbage_collect_attachments(self):
- """ Garbage collect lost mail attachments. Those are attachments
- - linked to res_model 'mail.compose.message', the composer wizard
- - with res_id 0, because they were created outside of an existing
- wizard (typically user input through Chatter or reports
- created on-the-fly by the templates)
- - unused since at least one day (create_date and write_date)
- """
- limit_date = datetime.datetime.utcnow() - datetime.timedelta(days=1)
- limit_date_str = datetime.datetime.strftime(limit_date, tools.DEFAULT_SERVER_DATETIME_FORMAT)
- self.env['ir.attachment'].search([
- ('res_model', '=', 'mail.compose.message'),
- ('res_id', '=', 0),
- ('create_date', '<', limit_date_str),
- ('write_date', '<', limit_date_str)]
- ).unlink()
- return True
-
- @api.model
def get_mail_message_access(self, res_ids, operation, model_name=None):
""" mail.message check permission rules for related document. This method is
meant to be inherited in order to implement addons-specific behavior.