From 5bccc54707c4f43e4c35511066d968536e321a51 Mon Sep 17 00:00:00 2001 From: Samir Ladoui Date: Mon, 9 Sep 2024 13:51:04 +0100 Subject: [PATCH] [FIX] odex_web_app: exclude message type user notification --- odex25_mobile/odex_web_app/models/mail_message.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/odex25_mobile/odex_web_app/models/mail_message.py b/odex25_mobile/odex_web_app/models/mail_message.py index 464c3393f..4dda22bf0 100644 --- a/odex25_mobile/odex_web_app/models/mail_message.py +++ b/odex25_mobile/odex_web_app/models/mail_message.py @@ -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([