Browse Source

[10.0][IMP] web_switch_company_warning module

pull/1288/head
Adrià Gil Sorribes 6 years ago
parent
commit
b2bc53dd75
  1. 2
      web_switch_company_warning/__manifest__.py
  2. 7
      web_switch_company_warning/static/src/js/switch_company_warning.js

2
web_switch_company_warning/__manifest__.py

@ -5,7 +5,7 @@
"name": "Multicompany - Switch Company Warning",
"summary": "Show a warning if current company has been switched"
" in another tab or window.",
"version": "10.0.0.1.1",
"version": "10.0.0.1.2",
"category": "web",
"website": "http://akretion.com",
"license": "AGPL-3",

7
web_switch_company_warning/static/src/js/switch_company_warning.js

@ -38,7 +38,12 @@ odoo.define('web_switch_company_warning.widget', function (require) {
init: function(parent) {
this._super(parent);
var switchCompanyWarning = new SwitchCompanyWarningWidget();
switchCompanyWarning.appendTo('#oe_main_menu_navbar');
// Choose where to append depending on whether web_responsive is installed or not
if (document.getElementById('oe_main_menu_navbar')) {
switchCompanyWarning.appendTo('#oe_main_menu_navbar');
} else {
switchCompanyWarning.insertAfter('.main-nav');
}
}
});

Loading…
Cancel
Save