From ca93a52e6468a926737bdbe41e6872cf48c43c04 Mon Sep 17 00:00:00 2001 From: Stephane Wirtel Date: Tue, 21 Aug 2012 10:23:43 +0200 Subject: [PATCH] [FIX] point_of_sale: fix a report bzr revid: stw@openerp.com-20120821082343-mu1p8231c4wa0kjm --- addons/point_of_sale/report/pos_sales_user.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/addons/point_of_sale/report/pos_sales_user.py b/addons/point_of_sale/report/pos_sales_user.py index e49528441b9..6ac2e1892c1 100644 --- a/addons/point_of_sale/report/pos_sales_user.py +++ b/addons/point_of_sale/report/pos_sales_user.py @@ -37,14 +37,14 @@ class pos_sales_user(report_sxw.rml_parse): dt1 = form['date_start'] + ' 00:00:00' dt2 = form['date_end'] + ' 23:59:59' data={} - self.cr.execute("select po.name as pos,po.date_order,ru.name as user,po.state,rc.name " \ - "from pos_order as po,res_users as ru,res_company as rc " \ + self.cr.execute("select po.name as pos,po.date_order,rp.name as user,po.state,rc.name " \ + "from pos_order as po,res_users as ru,res_company as rc, res_partner as rp " \ "where po.date_order >= %s and po.date_order <= %s " \ - "and po.company_id=rc.id and po.user_id=ru.id and po.user_id IN %s " \ + "and po.company_id=rc.id and po.user_id=ru.id and po.user_id IN %s and ru.partner_id = rp.id" \ ,(dt1,dt2,tuple(form['user_id']))) return self.cr.dictfetchall() report_sxw.report_sxw('report.pos.sales.user', 'pos.order', 'addons/point_of_sale/report/pos_sales_user.rml', parser=pos_sales_user,header='internal') -# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: \ No newline at end of file +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: