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: