From 6ee640bdcb4bee170d3e875def615112e2153b8c Mon Sep 17 00:00:00 2001 From: Ahmed Aly Date: Wed, 4 Apr 2018 16:01:07 +0200 Subject: [PATCH] =?UTF-8?q?Fall=205402:=20CR1=20-=20H=C3=A4ndlerrabatt=20(?= =?UTF-8?q?Bugfix)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ext/custom-addons/dp_custom/models/sale.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ext/custom-addons/dp_custom/models/sale.py b/ext/custom-addons/dp_custom/models/sale.py index 7c5760cb..e2167a5a 100644 --- a/ext/custom-addons/dp_custom/models/sale.py +++ b/ext/custom-addons/dp_custom/models/sale.py @@ -442,7 +442,7 @@ class SaleOrderLine(models.Model): @api.multi def calc_discount(self): discount = 0.0 - context_partner = dict(self.env.context, partner_id=self.order_id.partner_id.id, date=self.order_id.date_order) + context_partner = dict(self.env.context, partner_id=self.order_id.partner_invoice_id.id, date=self.order_id.date_order) pricelist_context = dict(context_partner, uom=self.product_uom.id) price, rule_id = self.order_id.pricelist_id.with_context(pricelist_context).get_product_price_rule(