Skip to content
Permalink
Browse files

🚑 Website Switcher didn't work for non-admin users

  • Loading branch information...
yelizariev committed Aug 14, 2018
1 parent 66e5f41 commit af72455f57ba7836f2ebcee40c1a037b9fe48bed
Showing with 13 additions and 1 deletion.
  1. +1 −1 web_website/__manifest__.py
  2. +5 −0 web_website/doc/changelog.rst
  3. +7 −0 web_website/models/res_users.py
@@ -7,7 +7,7 @@
"category": "Hidden",
# "live_test_url": "",
"images": [],
"version": "10.0.1.0.1",
"version": "10.0.1.0.2",
"application": False,

"author": "IT-Projects LLC, Ivan Yelizariev",
@@ -1,3 +1,8 @@
`1.0.2`
-------

- **Fix:** Website Switcher didn't work for non-admin users

`1.0.1`
-------

@@ -58,3 +58,10 @@ def _check_backend_website_in_current_company(self):
and record.backend_website_id.company_id \
and record.backend_website_id.company_id != record.company_id:
raise ValidationError(_("Current website doesn't belong to Current Company"))

def __init__(self, pool, cr):
# don't save result of super to return after extension due to E0101, return-in-init
super(ResUsers, self).__init__(pool, cr)
# duplicate list to avoid modifying the original reference
type(self).SELF_WRITEABLE_FIELDS = list(self.SELF_WRITEABLE_FIELDS)
type(self).SELF_WRITEABLE_FIELDS.extend(['backend_website_id'])

0 comments on commit af72455

Please sign in to comment.
You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.