3
0
Fork 0

[10.0][IMP] web_switch_company_warning module

11.0
Adrià Gil Sorribes 2019-05-24 13:47:42 +02:00
parent 2a3b55eeca
commit b2bc53dd75
2 changed files with 7 additions and 2 deletions

View File

@ -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",

View File

@ -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');
}
}
});