summaryrefslogtreecommitdiff
path: root/addons
diff options
context:
space:
mode:
authorJeremy Kersten <jke@odoo.com>2017-04-25 10:16:35 +0200
committerJeremy Kersten <jke@odoo.com>2017-04-25 10:56:34 +0200
commitd5384f8f9d76063f008b8107bb6d945405501ac5 (patch)
tree5185a397381c36725c2725db9177113bf75ff0d8 /addons
parent83ec253b78ee07290a64f71b08d24ff56feb1c4e (diff)
[FIX] website_portal: portal user don't have access to website.company_id
Avoid portal user to receive 403 when trying to edit vat code on /my/account There are no risk to read field in sudo in this case. opw-740314
Diffstat (limited to 'addons')
-rw-r--r--addons/website_portal/controllers/main.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/addons/website_portal/controllers/main.py b/addons/website_portal/controllers/main.py
index a39a7ed6114..117e0f7dba7 100644
--- a/addons/website_portal/controllers/main.py
+++ b/addons/website_portal/controllers/main.py
@@ -105,7 +105,7 @@ class website_account(http.Controller):
# vat validation
if data.get("vat") and hasattr(request.env["res.partner"], "check_vat"):
- if request.website.company_id.vat_check_vies:
+ if request.website.company_id.sudo().vat_check_vies:
# force full VIES online check
check_func = request.env["res.partner"].vies_vat_check
else: