[10.0][IMP] web_switch_company_warning module

pull/1289/head
Adrià Gil Sorribes 2019-05-24 13:47:42 +02:00
parent fb0744c1f0
commit 72f91a8366
2 changed files with 7 additions and 2 deletions

View File

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

View File

@ -38,7 +38,12 @@ odoo.define('web_switch_company_warning.widget', function (require) {
init: function(parent) { init: function(parent) {
this._super(parent); this._super(parent);
var switchCompanyWarning = new SwitchCompanyWarningWidget(); 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');
}
} }
}); });