[FIX] odex_web_app: exclude message type user notification

This commit is contained in:
Samir Ladoui 2024-09-09 13:51:04 +01:00
parent 76ac4559d3
commit 5bccc54707
1 changed files with 1 additions and 1 deletions

View File

@ -12,7 +12,7 @@ class Message(models.Model):
mt_comment = self.env.ref('mail.mt_comment')
mt_note = self.env.ref('mail.mt_note')
messages = super(Message, self).create(values_list)
for message in messages.filtered(lambda r: r.subtype_id.id in (mt_comment.id, mt_note.id) and r.model != 'mail.channel'):
for message in messages.filtered(lambda r: r.subtype_id.id in (mt_comment.id, mt_note.id) and r.model != 'mail.channel' and r.message_type != 'user_notification'):
# Get partners that should receive the message
if message.subtype_id.id == mt_comment.id:
partner_ids = self.env['mail.followers'].sudo().search([