summaryrefslogtreecommitdiff
path: root/addons/product_margin/models
diff options
context:
space:
mode:
authorChristophe Simonis <chs@odoo.com>2018-10-16 17:53:26 +0200
committerChristophe Simonis <chs@odoo.com>2018-10-16 17:53:26 +0200
commit41bf8ce6d900cd247c4adf33cc75e3d018c89ffb (patch)
treea248bfe02d5b1e1495ad274bbc3c2b33f87d0b82 /addons/product_margin/models
parenta9f11fb4772f2862ca5806baee38cf6a043b5143 (diff)
parentb29b545fe8464610ce04ac8be11e0356962d10d9 (diff)
[MERGE] forward port branch 11.0 up to b29b545fe84
Diffstat (limited to 'addons/product_margin/models')
-rw-r--r--addons/product_margin/models/product_product.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/addons/product_margin/models/product_product.py b/addons/product_margin/models/product_product.py
index 46adfc5118b..9fc94ea6310 100644
--- a/addons/product_margin/models/product_product.py
+++ b/addons/product_margin/models/product_product.py
@@ -107,7 +107,7 @@ class ProductProduct(models.Model):
select
sum(l.price_unit * l.quantity)/nullif(sum(l.quantity),0) as avg_unit_price,
sum(l.quantity) as num_qty,
- sum(l.quantity * (l.price_subtotal/(nullif(l.quantity,0)))) as total,
+ sum(l.quantity * (l.price_subtotal_signed/(nullif(l.quantity,0)))) as total,
sum(l.quantity * pt.list_price) as sale_expected
from account_invoice_line l
left join account_invoice i on (l.invoice_id = i.id)