From 3789a944acbc30e6f44f96e594291f67cfc835d1 Mon Sep 17 00:00:00 2001 From: Florent de Labarre Date: Fri, 19 Jan 2024 12:13:14 +0100 Subject: [PATCH] [FIX] website_sale: internal user cannot go to shop page - Create a company A with a ebsite - Create a company B without website - Create user 1 in company B only --> Issue when user 1 go to /shop --> error 403 Due to security restrictions, you are not allowed to access 'Companies' (res.company) records. closes odoo/odoo#150529 X-original-commit: be5bf24234955a4f9ccc044482b71ab37a44b8b0 Signed-off-by: Victor Feyens (vfe) --- addons/website_sale/controllers/main.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/website_sale/controllers/main.py b/addons/website_sale/controllers/main.py index 359c5735e6e..9b79f5e2938 100644 --- a/addons/website_sale/controllers/main.py +++ b/addons/website_sale/controllers/main.py @@ -343,7 +343,7 @@ class WebsiteSale(payment_portal.PaymentPortal): filter_by_price_enabled = website.is_view_active('website_sale.filter_products_price') if filter_by_price_enabled: - company_currency = website.company_id.currency_id + company_currency = website.company_id.sudo().currency_id conversion_rate = request.env['res.currency']._get_conversion_rate( company_currency, website.currency_id, request.website.company_id, fields.Date.today()) else: