From 72f91a83663f8e2e016bf35ed69d4a511980129a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adri=C3=A0=20Gil=20Sorribes?= Date: Fri, 24 May 2019 13:47:42 +0200 Subject: [PATCH] [10.0][IMP] web_switch_company_warning module --- web_switch_company_warning/__manifest__.py | 2 +- .../static/src/js/switch_company_warning.js | 7 ++++++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/web_switch_company_warning/__manifest__.py b/web_switch_company_warning/__manifest__.py index 0d53e5d8..ebeb21f6 100644 --- a/web_switch_company_warning/__manifest__.py +++ b/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", diff --git a/web_switch_company_warning/static/src/js/switch_company_warning.js b/web_switch_company_warning/static/src/js/switch_company_warning.js index aa017e3e..7ef73984 100644 --- a/web_switch_company_warning/static/src/js/switch_company_warning.js +++ b/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'); + } } });