[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) <vfe@odoo.com>
This commit is contained in:
Florent de Labarre
2024-01-23 22:51:59 +00:00
committed by GitHub
parent bc440ff045
commit 3789a944ac
+1 -1
View File
@@ -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: