Browse Source

fixup

pull/1289/head
Adrià Gil Sorribes 5 years ago
parent
commit
9effe7a2d2
  1. 2
      web_switch_company_warning/__manifest__.py
  2. 6
      web_switch_company_warning/static/src/js/switch_company_warning.js
  3. 5
      web_switch_company_warning/static/src/js/switch_company_warning_worker.js

2
web_switch_company_warning/__manifest__.py

@ -6,7 +6,7 @@
" in another tab or window.",
"version": "12.0.1.0.0",
"category": "web",
"website": "http://akretion.com",
"website": "https://github.com/OCA/web",
"license": "AGPL-3",
"author": "Akretion, "
"Odoo Community Association (OCA)",

6
web_switch_company_warning/static/src/js/switch_company_warning.js

@ -8,7 +8,7 @@ odoo.define('web_switch_company_warning.widget', function (require) {
// changed in another tab or window (in the same browser)
if (!window.SharedWorker) {
//not supported
// Not supported
return;
}
var SwitchCompanyWarningWidget = Widget.extend({
@ -32,7 +32,7 @@ odoo.define('web_switch_company_warning.widget', function (require) {
},
generateSignature: function () {
return [session.company_id, session.db].join();
}
},
});
UserMenu.include({
@ -40,7 +40,7 @@ odoo.define('web_switch_company_warning.widget', function (require) {
this._super(parent);
var switchCompanyWarning = new SwitchCompanyWarningWidget();
switchCompanyWarning.insertAfter('.o_main_navbar');
}
},
});

5
web_switch_company_warning/static/src/js/switch_company_warning_worker.js

@ -1,11 +1,12 @@
"use strict";
// Show a big banner in the top of the page if the company has been
//changed in another tab or window (in the same browser)
// Changed in another tab or window (in the same browser)
var con = [];
var lastCtx = null;
addEventListener("connect", function (ee) {
"use strict";
var port = ee.ports[0];
con.push(port);

Loading…
Cancel
Save