From 940c168a204bf8a5b18040aea6b0c3e7bf5c05ca Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thibault=20Delavall=C3=A9e?= Date: Thu, 11 Jan 2024 17:23:06 +0100 Subject: [PATCH] [FIX] mail: respect 'scheduled_date' for push notifications (backport) Backport of odoo/odoo@1955c55f8642cc6cabb3b18296e4cad6ef505553 Sending notifications can be delayed by giving 'scheduled_date' as parameter for notification process. This is used notably when a process in several steps should wait for some user input before sending notifications e.g. rating feedback and update done in two steps. Sending web push notifications should respect this scheduling as already done by inbox and email notifications. Task-3695571 Related to Task-3669738 (Mail: Web Push Models Rename and Fixes) Part-of: odoo/odoo#150011 --- addons/mail/models/mail_thread.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/addons/mail/models/mail_thread.py b/addons/mail/models/mail_thread.py index 09c0a7eac29..18ad7864f7d 100644 --- a/addons/mail/models/mail_thread.py +++ b/addons/mail/models/mail_thread.py @@ -3080,11 +3080,11 @@ class MailThread(models.AbstractModel): }) else: # generate immediately the - # and send the and the notifications + # and send the , and the notifications self._notify_thread_by_inbox(message, recipients_data, msg_vals=msg_vals, **kwargs) self._notify_thread_by_email(message, recipients_data, msg_vals=msg_vals, **kwargs) + self._notify_thread_by_web_push(message, recipients_data, msg_vals, **kwargs) - self._notify_thread_by_web_push(message, recipients_data, msg_vals, **kwargs) return recipients_data def _notify_thread_by_inbox(self, message, recipients_data, msg_vals=False, **kwargs):