From 6a0e07b6aa4a1adf85a95a46ace7dfbfc875f291 Mon Sep 17 00:00:00 2001 From: Christophe Matthieu Date: Thu, 22 Jun 2017 09:32:26 +0200 Subject: [PATCH] [FIX] sale_margin: wrong margin when update the discount --- addons/sale_margin/models/sale_order.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/sale_margin/models/sale_order.py b/addons/sale_margin/models/sale_order.py index dfb24840f2d..90f866ecfec 100644 --- a/addons/sale_margin/models/sale_order.py +++ b/addons/sale_margin/models/sale_order.py @@ -55,7 +55,7 @@ class SaleOrderLine(models.Model): return super(SaleOrderLine, self).create(vals) - @api.depends('product_id', 'purchase_price', 'product_uom_qty', 'price_unit') + @api.depends('product_id', 'purchase_price', 'product_uom_qty', 'price_unit', 'price_subtotal') def _product_margin(self): for line in self: currency = line.order_id.pricelist_id.currency_id