From bbeacef4661c26f3036df33909a57ee9d414bd26 Mon Sep 17 00:00:00 2001 From: Dhruv Patel Date: Thu, 4 Feb 2021 09:26:51 +0000 Subject: [PATCH] [IMP] mail: notify user after subscription preference changes MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Currently, the user doesn't receive any feedback or notification when updating his subscription preferences. Therefore, he might be prompted to open the subscription modal again to double-check that his modifications were correctly applied or not. With this commit, We are now displaying screen notification with success message after successfully applying the changes. Task : 2445481 closes odoo/odoo#65957 X-original-commit: 95aebcbc8051f71762724149f6b20f3501485cdd Signed-off-by: Sébastien Theys (seb) --- addons/mail/i18n/mail.pot | 7 +++++++ addons/mail/static/src/models/follower/follower.js | 4 ++++ 2 files changed, 11 insertions(+) diff --git a/addons/mail/i18n/mail.pot b/addons/mail/i18n/mail.pot index 8e45c2830ef..12870de7323 100644 --- a/addons/mail/i18n/mail.pot +++ b/addons/mail/i18n/mail.pot @@ -6983,3 +6983,10 @@ msgstr "" #: model:ir.model.fields.selection,name:mail.selection__mail_activity_type__delay_unit__weeks msgid "weeks" msgstr "" + +#. module: mail +#. openerp-web +#: code:addons/mail/static/src/models/follower/follower.js:0 +#, python-format +msgid "The subscription preferences were successfully applied." +msgstr "" diff --git a/addons/mail/static/src/models/follower/follower.js b/addons/mail/static/src/models/follower/follower.js index 591e6a2ee57..b06a7bfc707 100644 --- a/addons/mail/static/src/models/follower/follower.js +++ b/addons/mail/static/src/models/follower/follower.js @@ -158,6 +158,10 @@ function factory(dependencies) { args: [[this.followedThread.id]], kwargs, })); + this.env.services['notification'].notify({ + type: 'success', + message: this.env._t("The subscription preferences were successfully applied."), + }); } this.closeSubtypes(); }