Merge pull request #1049 from expsa/samir-aladawi-send-all-notifications

[FIX] odex_web_app: exclude message type user notification
This commit is contained in:
SamirLADOUI-sa 2024-09-09 14:26:38 +01:00 committed by GitHub
commit 590f9f3341
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
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([