From c13298fdacf52aedb2d2fee4db98203247c5e523 Mon Sep 17 00:00:00 2001 From: Parth Choksi Date: Thu, 22 Nov 2018 09:41:46 +0000 Subject: [PATCH] [FIX] sale: display right quantity in sales by channel report By this commit, in sales by channel report of product page we are able to show the quanity of product which is just in 'sale' and 'done' state. Before this commit, the quantity of product included every state except 'cancel'. This commit is related to issue: #27643 closes odoo/odoo#28948 Signed-off-by: Damien Bouvy (dbo) --- addons/sale/report/report_all_channels_sales.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/sale/report/report_all_channels_sales.py b/addons/sale/report/report_all_channels_sales.py index 1638c087d05..473ab1f1362 100644 --- a/addons/sale/report/report_all_channels_sales.py +++ b/addons/sale/report/report_all_channels_sales.py @@ -52,7 +52,7 @@ class PosSaleReport(models.Model): LEFT JOIN product_pricelist pp ON (so.pricelist_id = pp.id) LEFT JOIN uom_uom u on (u.id=sol.product_uom) LEFT JOIN uom_uom u2 on (u2.id=pt.uom_id) - WHERE so.state != 'cancel' + WHERE so.state in ('sale','done') """ return so_str