diff --git a/mail_usability/models/mail.py b/mail_usability/models/mail.py index 4163499..a17c91a 100644 --- a/mail_usability/models/mail.py +++ b/mail_usability/models/mail.py @@ -5,11 +5,24 @@ from odoo import models, api +import logging +_logger = logging.getLogger(__name__) class MailThread(models.AbstractModel): _inherit = 'mail.thread' + def _active_message_auto_subscribe_notify(self): + _logger.debug('Skip automatic subscribe notification') + return False + + def _message_auto_subscribe_notify(self, partner_ids): + if self._active_message_auto_subscribe_notify(): + return super(MailThread, self)._message_auto_subscribe_notify( + partner_ids) + else: + return True + @api.multi @api.returns('self', lambda value: value.id) def message_post(self, body='', subject=None, message_type='notification',