From 11358e95ba1dfd91a4cf01983cebcdaed0e87e2c Mon Sep 17 00:00:00 2001 From: "Anh Thao Pham (pta)" Date: Thu, 25 Jan 2024 19:16:08 +0100 Subject: [PATCH] [FIX] website_sale: fix eshop prices on branch website Steps to reproduce: - Create a branch for a company (e.g. Branch X) - Go to "Website / Configuration / Websites" - Create or configure a website on Branch X (e.g. Website X) - Go to "Website / Configuration / Settings" - Select Website X - Set "Display Product Prices" to "Tax Included" - Create a product for a price of $100 and a tax from parent company (e.g. 15%) - Go to eShop page of Website X Issue: On the eShop products list page, the price of the product should be "Tax Included" ($115), but it is not. The displayed price is $100. When accessing the product page, the price is correctly displayed with the tax ($115). Cause: When computing the prices, taxes from parent companies are not taken into account. opw-3660156 closes odoo/odoo#151320 X-original-commit: cbea1dac9d5d30fb42912b4ec25061952cde67a8 Signed-off-by: Antoine Vandevenne (anv) Signed-off-by: Anh Thao Pham (pta) --- addons/website_sale/models/product_template.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/website_sale/models/product_template.py b/addons/website_sale/models/product_template.py index a0fecb2b6d4..9e3b1276358 100644 --- a/addons/website_sale/models/product_template.py +++ b/addons/website_sale/models/product_template.py @@ -273,7 +273,7 @@ class ProductTemplate(models.Model): for template in self: price_reduce = sales_prices[template.id] - product_taxes = template.sudo().taxes_id.filtered(lambda t: t.company_id == t.env.company) + product_taxes = template.sudo().taxes_id.filtered(lambda t: t.company_id in t.env.company.parent_ids) taxes = fiscal_position.map_tax(product_taxes) base_price = None