From 99ce17cfcaca141f13019746358eb8707fe64ffa Mon Sep 17 00:00:00 2001 From: Denis Ledoux Date: Thu, 21 Aug 2014 11:17:29 +0200 Subject: [PATCH] [FIX] point_of_sale: report, product_id of line is product_product product_id column of pos_order_line is a product_product the left join of l.product_id was done on product_template, instead of product_product It worked as long as the ids product_product were the same as product_template. Meaning that, if you used variants, this report view was screwed. --- addons/point_of_sale/report/pos_order_report.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/addons/point_of_sale/report/pos_order_report.py b/addons/point_of_sale/report/pos_order_report.py index c27738ec230..9728660fa79 100644 --- a/addons/point_of_sale/report/pos_order_report.py +++ b/addons/point_of_sale/report/pos_order_report.py @@ -75,7 +75,8 @@ class pos_order_report(osv.osv): l.product_id as product_id from pos_order_line as l left join pos_order s on (s.id=l.order_id) - left join product_template pt on (pt.id=l.product_id) + left join product_product p on (p.id=l.product_id) + left join product_template pt on (pt.id=p.product_tmpl_id) left join product_uom u on (u.id=pt.uom_id) group by to_char(s.date_order, 'dd-MM-YYYY'),to_char(s.date_order, 'YYYY'),to_char(s.date_order, 'MM'),