[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) <anv@odoo.com> Signed-off-by: Anh Thao Pham (pta) <pta@odoo.com>
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user