diff options
| author | Goffin Simon <sig@odoo.com> | 2021-03-17 10:02:23 +0000 |
|---|---|---|
| committer | Goffin Simon <sig@odoo.com> | 2021-03-18 11:49:26 +0000 |
| commit | 4565f92c459f136fc0db79f8145b058e8a8a8972 (patch) | |
| tree | f19f4b889346a06508af00a0bf6d4aeefe60412f /addons/website_sale/models | |
| parent | 402009b6c5082d949e433b8c8cbadb7012174865 (diff) | |
[FIX] website_sale: Wrong price in the shop
Steps to reproduce the issue:
- Let's consider a product P (11€) with a 10% included tax T1
- Let's consider a fiscal position FP that mappes T1 to a tax T2 (0%)
- Let's consider a website that displays prices with tax included
- Let's consider a portal user PU with FP as fiscal postion
- Log with PU
- Go to the shop and filter products to see P
Bug:
The price of P was 11€ instead of 10€
PS: When adding P in the cart, the correct price is displayed.
opw:2472528
closes odoo/odoo#68074
X-original-commit: e7bfadea847012ee956b7bb425688b5f9ccda9cf
Signed-off-by: Simon Goffin (sig) <sig@openerp.com>
Diffstat (limited to 'addons/website_sale/models')
| -rw-r--r-- | addons/website_sale/models/product.py | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/addons/website_sale/models/product.py b/addons/website_sale/models/product.py index caecf35012f..291d4185ce5 100644 --- a/addons/website_sale/models/product.py +++ b/addons/website_sale/models/product.py @@ -296,8 +296,10 @@ class ProductTemplate(models.Model): # The list_price is always the price of one. quantity_1 = 1 + combination_info['price'] = self.env['account.tax']._fix_tax_included_price_company(combination_info['price'], product.sudo().taxes_id, taxes, company_id) price = taxes.compute_all(combination_info['price'], pricelist.currency_id, quantity_1, product, partner)[tax_display] if pricelist.discount_policy == 'without_discount': + combination_info['list_price'] = self.env['account.tax']._fix_tax_included_price_company(combination_info['list_price'], product.sudo().taxes_id, taxes, company_id) list_price = taxes.compute_all(combination_info['list_price'], pricelist.currency_id, quantity_1, product, partner)[tax_display] else: list_price = price |
