[FIX] sale_margin: wrong margin when update the discount

This commit is contained in:
Christophe Matthieu
2017-06-22 10:25:49 +02:00
parent 10c6908c63
commit 6a0e07b6aa
+1 -1
View File
@@ -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