diff --git a/addons/point_of_sale/report/pos_users_product.py b/addons/point_of_sale/report/pos_users_product.py index 141445bcafe..63f75e4b76a 100644 --- a/addons/point_of_sale/report/pos_users_product.py +++ b/addons/point_of_sale/report/pos_users_product.py @@ -43,7 +43,7 @@ class pos_user_product(report_sxw.rml_parse): for r in data: a_l.append(r['id']) if len(a_l): - sql2="""SELECT sum(qty) as qty,l.price_unit*sum(l.qty) as amt,t.name as name from product_product p, product_template t, pos_order_line l where order_id IN %s and p.product_tmpl_id=t.id and l.product_id=p.id group by t.name, l.price_unit""",(tuple(a_l),) + sql2="""SELECT sum(qty) as qty,l.price_unit*sum(l.qty) as amt,t.name as name from product_product p, product_template t, pos_order_line l where order_id = %d and p.product_tmpl_id=t.id and l.product_id=p.id group by t.name, l.price_unit"""%(o.id) self.cr.execute(sql2) data = self.cr.dictfetchall() for d in data: diff --git a/addons/point_of_sale/report/pos_users_product.rml b/addons/point_of_sale/report/pos_users_product.rml index 54c41ddf4a9..ce746b207b0 100644 --- a/addons/point_of_sale/report/pos_users_product.rml +++ b/addons/point_of_sale/report/pos_users_product.rml @@ -1,6 +1,6 @@ -