[IMP] by default do not send an email when user_id is fill on object
This commit is contained in:
@@ -5,11 +5,24 @@
|
|||||||
|
|
||||||
|
|
||||||
from odoo import models, api
|
from odoo import models, api
|
||||||
|
import logging
|
||||||
|
_logger = logging.getLogger(__name__)
|
||||||
|
|
||||||
|
|
||||||
class MailThread(models.AbstractModel):
|
class MailThread(models.AbstractModel):
|
||||||
_inherit = 'mail.thread'
|
_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.multi
|
||||||
@api.returns('self', lambda value: value.id)
|
@api.returns('self', lambda value: value.id)
|
||||||
def message_post(self, body='', subject=None, message_type='notification',
|
def message_post(self, body='', subject=None, message_type='notification',
|
||||||
|
|||||||
Reference in New Issue
Block a user