From 84ea3966ac4fe184e8063ee2fbbd1828a96e241b Mon Sep 17 00:00:00 2001 From: "Andrea Grazioso (agr-odoo)" Date: Fri, 8 Dec 2023 11:28:44 +0100 Subject: [PATCH] [FIX] account: public user cannot access product with tag Install module l10n_eu_oss_reports and website_sale Edit a product (i.e. Acoustic Bloc Screens) In Accounting tab add an account tag Try to access the product webshop page as public user User receive an error message 403: Forbidden The page you were looking for could not be authorized. Error message: You are not allowed to access 'Account Tag' (account.account.tag) records. [...] This occurs because during tax computation the system try to access account tags but they cannot be read by the public user opw-3455325 closes odoo/odoo#149638 X-original-commit: 6428081e385ff08e6d4be47938e8b91abeb4246b Signed-off-by: Laurent Smet (las) --- addons/account/models/account_tax.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/account/models/account_tax.py b/addons/account/models/account_tax.py index 13b9d34895d..7423dc78d39 100644 --- a/addons/account/models/account_tax.py +++ b/addons/account/models/account_tax.py @@ -834,7 +834,7 @@ class AccountTax(models.Model): # Get product tags, account.account.tag objects that need to be injected in all # the tax_tag_ids of all the move lines created by the compute all for this product. - product_tag_ids = product.account_tag_ids.ids if product else [] + product_tag_ids = product.sudo().account_tag_ids.ids if product else [] taxes_vals = [] i = 0