From 9dee7d1e58eb555eed1f3dbc5be396eed3ec2d7f Mon Sep 17 00:00:00 2001 From: Denis Vermylen Date: Wed, 25 Oct 2017 17:52:59 +0200 Subject: [PATCH] [FIX] sale: pricelist without_discount included taxes When having a product with included taxes that are changed/removed with a fiscal position, the price changes depending on if the pricelist's discount_policy is with_discount or without_discount. This commit aligns the without_discount behavior to the with_discount behavior. Note: the behaviour isn't 100% correct. The applied discount will be computed on the list_price, instead of the tax excluded list_price. If a price_surcharge is set, it will be wrong. --- addons/sale/models/sale.py | 1 - 1 file changed, 1 deletion(-) diff --git a/addons/sale/models/sale.py b/addons/sale/models/sale.py index 6e68fdad57a..40ce0e98088 100644 --- a/addons/sale/models/sale.py +++ b/addons/sale/models/sale.py @@ -998,7 +998,6 @@ class SaleOrderLine(models.Model): price, rule_id = self.order_id.pricelist_id.with_context(pricelist_context).get_product_price_rule(self.product_id, self.product_uom_qty or 1.0, self.order_id.partner_id) new_list_price, currency_id = self.with_context(context_partner)._get_real_price_currency(self.product_id, rule_id, self.product_uom_qty, self.product_uom, self.order_id.pricelist_id.id) - new_list_price = self.env['account.tax']._fix_tax_included_price_company(new_list_price, self.product_id.taxes_id, self.tax_id, self.company_id) if new_list_price != 0: if self.order_id.pricelist_id.currency_id.id != currency_id: