diff --git a/addons/im_livechat/static/src/js/im_livechat.js b/addons/im_livechat/static/src/js/im_livechat.js index e9d23227202..d652325d757 100644 --- a/addons/im_livechat/static/src/js/im_livechat.js +++ b/addons/im_livechat/static/src/js/im_livechat.js @@ -1,9 +1,9 @@ odoo.define('im_livechat.im_livechat', function (require) { "use strict"; +var bus = require('bus.bus').bus; var config = require('web.config'); var core = require('web.core'); -var ServiceProviderMixin = require('web.ServiceProviderMixin'); var session = require('web.session'); var time = require('web.time'); var utils = require('web.utils'); @@ -33,11 +33,7 @@ if (!_.contains(url_history, page)) { utils.set_cookie(LIVECHAT_COOKIE_HISTORY, JSON.stringify(url_history), 60*60*24); // 1 day cookie } -/** - * In order to handle services like ajax in the external lib, - * The parent of Livechat, LivechatButton, is set as a service provider - */ -var LivechatButton = Widget.extend(ServiceProviderMixin, { +var LivechatButton = Widget.extend({ className:"openerp o_livechat_button hidden-print", events: { @@ -56,7 +52,7 @@ var LivechatButton = Widget.extend(ServiceProviderMixin, { this.chat_window = null; this.messages = []; this.server_url = server_url; - this.busBus = this.call('bus_service', 'getBus'); + this.busBus = bus; }, willStart: function () { diff --git a/addons/im_livechat/views/im_livechat_channel_templates.xml b/addons/im_livechat/views/im_livechat_channel_templates.xml index ec25a417dca..3c13ab09fd8 100644 --- a/addons/im_livechat/views/im_livechat_channel_templates.xml +++ b/addons/im_livechat/views/im_livechat_channel_templates.xml @@ -142,7 +142,6 @@ - diff --git a/addons/website_livechat/views/website_livechat.xml b/addons/website_livechat/views/website_livechat.xml index 3a994c4e4ac..3a0caa340ba 100644 --- a/addons/website_livechat/views/website_livechat.xml +++ b/addons/website_livechat/views/website_livechat.xml @@ -9,7 +9,6 @@