summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDenis Vermylen <dve@odoo.com>2017-10-25 17:52:59 +0200
committerDenis Vermylen <dve@odoo.com>2017-10-26 16:11:55 +0200
commit9dee7d1e58eb555eed1f3dbc5be396eed3ec2d7f (patch)
treeb917907e6addc88d628e0849c8a18208539bd03d
parenta44954b625132fea74e1bacd2ef6334f6645ca79 (diff)
[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.
-rw-r--r--addons/sale/models/sale.py1
1 files changed, 0 insertions, 1 deletions
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: