diff --git a/web_notify/static/src/js/web_client.js b/web_notify/static/src/js/web_client.js index 0d8f4ab4d..6eb274b1b 100644 --- a/web_notify/static/src/js/web_client.js +++ b/web_notify/static/src/js/web_client.js @@ -24,13 +24,16 @@ odoo.define("web_notify.WebClient", function(require) { this.channel_info, this.channel_default, ]; - this.call("bus_service", "addChannel", this.channel_success); - this.call("bus_service", "addChannel", this.channel_danger); - this.call("bus_service", "addChannel", this.channel_warning); - this.call("bus_service", "addChannel", this.channel_info); - this.call("bus_service", "addChannel", this.channel_default); - this.call("bus_service", "on", "notification", this, this.bus_notification); this.call("bus_service", "startPolling"); + + if (this.call("bus_service", "isMasterTab")) { + this.call("bus_service", "addChannel", this.channel_success); + this.call("bus_service", "addChannel", this.channel_danger); + this.call("bus_service", "addChannel", this.channel_warning); + this.call("bus_service", "addChannel", this.channel_info); + this.call("bus_service", "addChannel", this.channel_default); + } + this.call("bus_service", "on", "notification", this, this.bus_notification); }, bus_notification: function(notifications) { var self = this;