diff options
| author | Yannick Tivisse <yti@odoo.com> | 2019-05-21 15:53:08 +0200 |
|---|---|---|
| committer | Yannick Tivisse <yti@odoo.com> | 2019-06-04 14:01:42 +0200 |
| commit | 2996e7645fc41598bb2db856c9bcc47116c3f693 (patch) | |
| tree | 920da2a4ae83902df92b05f9367b8fc2ffc3131a /addons/mail/controllers/main.py | |
| parent | 3d06a773931aea34cdef6c31857447df10bc6304 (diff) | |
[IMP] base: Remove group toggle_multi_company
Fp request
Diffstat (limited to 'addons/mail/controllers/main.py')
| -rw-r--r-- | addons/mail/controllers/main.py | 9 |
1 files changed, 2 insertions, 7 deletions
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() |
