mirror of
https://github.com/OCA/web.git
synced 2025-02-22 13:21:25 +02:00
[IMP] web_notify: add channels only if not done already
This commit is contained in:
committed by
David
parent
9d15e2fc9c
commit
0f7f8b5876
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user