3
0
Fork 0

[IMP] web_notify: add channels only if not done already

13.0
Juan Jose Scarafia 2020-07-24 23:23:49 -03:00
parent 4961ba74e1
commit b02d3dbbc1
1 changed files with 9 additions and 6 deletions

View File

@ -24,13 +24,16 @@ odoo.define("web_notify.WebClient", function(require) {
this.channel_info,
this.channel_default,
];
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);
this.call("bus_service", "startPolling");
},
bus_notification: function(notifications) {
var self = this;