Skip to content
Snippets Groups Projects
Commit d5384f8f authored by Jeremy Kersten's avatar Jeremy Kersten
Browse files

[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
parent 83ec253b
No related branches found
No related tags found
No related merge requests found
......@@ -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:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment