- Manage multiple companies on the same browser tab. Be careful that this advanced tool should
- only be used for reporting purpose.
-
-
-
diff --git a/addons/mail/controllers/main.py b/addons/mail/controllers/main.py
index e617935120a..39b7c53ddf5 100644
--- a/addons/mail/controllers/main.py
+++ b/addons/mail/controllers/main.py
@@ -85,18 +85,13 @@ class MailController(http.Controller):
# - Guess the supposed necessary company to access the record via the method
# _get_mail_redirect_suggested_company
# - If no company, then redirect to the messaging
- # - If the multi company per tag group is activated, merge the suggested company
- # withe the companies on the cookie
- # - else, use this company as enabled company
+ # - Merge the suggested company with the companies on the cookie
# - Make a new access test if it succeeds, redirect to the record. Otherwise,
# redirect to the messaging.
suggested_company = record_sudo._get_mail_redirect_suggested_company()
if not suggested_company:
raise AccessError()
- if user.has_group('base.group_toggle_company'):
- cids += [suggested_company.id]
- else:
- cids = [suggested_company.id]
+ cids += [suggested_company.id]
record_sudo.sudo(uid).with_context(allowed_company_ids=cids).check_access_rule('read')
except AccessError:
return cls._redirect_to_messaging()
diff --git a/addons/web/models/ir_http.py b/addons/web/models/ir_http.py
index 7ae119c02d3..d4280e7f25a 100644
--- a/addons/web/models/ir_http.py
+++ b/addons/web/models/ir_http.py
@@ -56,7 +56,6 @@ class Http(models.AbstractModel):
"web.base.url": self.env['ir.config_parameter'].sudo().get_param('web.base.url', default=''),
"show_effect": True,
"display_switch_company_menu": user.has_group('base.group_multi_company') and len(user.company_ids) > 1,
- "toggle_company": user.has_group('base.group_toggle_company'),
"cache_hashes": {
"load_menus": hashlib.sha1(menu_json_utf8).hexdigest(),
"qweb": qweb_checksum,
diff --git a/addons/web/static/src/js/widgets/switch_company_menu.js b/addons/web/static/src/js/widgets/switch_company_menu.js
index 4b52b879447..153c6b164cb 100644
--- a/addons/web/static/src/js/widgets/switch_company_menu.js
+++ b/addons/web/static/src/js/widgets/switch_company_menu.js
@@ -31,7 +31,6 @@ var SwitchCompanyMenu = Widget.extend({
this._onSwitchCompanyClick = _.debounce(this._onSwitchCompanyClick, 1500, true);
this.allowed_company_ids = String(session.user_context.allowed_company_ids).split(',');
this.user_companies = session.user_companies.allowed_companies;
- this.toggle_company = session.toggle_company;
var hash = $.bbq.getState()
if (!hash.cids || hash.cids === undefined) {
diff --git a/addons/web/static/src/xml/base.xml b/addons/web/static/src/xml/base.xml
index 77e8ab075b1..9c29b21968c 100644
--- a/addons/web/static/src/xml/base.xml
+++ b/addons/web/static/src/xml/base.xml
@@ -1582,18 +1582,16 @@
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
diff --git a/odoo/addons/base/__manifest__.py b/odoo/addons/base/__manifest__.py
index f32d529a487..d47214a5ce9 100644
--- a/odoo/addons/base/__manifest__.py
+++ b/odoo/addons/base/__manifest__.py
@@ -80,7 +80,6 @@ The kernel of Odoo, needed for all installation.
'data/res_bank_demo.xml',
'data/res_partner_demo.xml',
'data/res_partner_image_demo.xml',
- 'data/res_groups_demo.xml',
],
'test': [],
'installable': True,
diff --git a/odoo/addons/base/data/ir_module_category_data.xml b/odoo/addons/base/data/ir_module_category_data.xml
index 7b06f7437d6..d99fed12077 100644
--- a/odoo/addons/base/data/ir_module_category_data.xml
+++ b/odoo/addons/base/data/ir_module_category_data.xml
@@ -110,9 +110,5 @@
-
-
-
-
diff --git a/odoo/addons/base/data/res_groups_demo.xml b/odoo/addons/base/data/res_groups_demo.xml
deleted file mode 100644
index 66d728ff776..00000000000
--- a/odoo/addons/base/data/res_groups_demo.xml
+++ /dev/null
@@ -1,8 +0,0 @@
-
-
-
-
-
-
-
-
diff --git a/odoo/addons/base/security/base_groups.xml b/odoo/addons/base/security/base_groups.xml
index 10541a1a4df..3bdf8ee3928 100644
--- a/odoo/addons/base/security/base_groups.xml
+++ b/odoo/addons/base/security/base_groups.xml
@@ -41,10 +41,6 @@
-
- Allow to toggle company visibility in the company switch bar
-
-
Contact Creation