Skip to content
Permalink
Browse files

Merge pull request #730 from yelizariev/10.0-backport-web_website-fix…

…-non-admin-

🚑 Website Switcher didn't work for non-admin users
  • Loading branch information...
yelizariev committed Feb 15, 2019
2 parents 66e5f41 + af72455 commit 3238ecc8af2cf52e97bfcf39a26125fc21a8c27d
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 3238ecc

Please sign in to comment.
You can’t perform that action at this time.