From 11cdeb99298b071b75855a1e8633d04af8c567c9 Mon Sep 17 00:00:00 2001 From: "Ferdinand @ Camptocamp" <> Date: Mon, 27 Dec 2010 12:32:20 +0530 Subject: [PATCH] [FIX] Sale: Sale report => sale_report - wrong table join lp bug: https://launchpad.net/bugs/694248 fixed bzr revid: mra@mra-laptop-20101227070220-s4v56ta762n3ztyt --- addons/sale/report/sale_report.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/addons/sale/report/sale_report.py b/addons/sale/report/sale_report.py index cdc86891e62..546e88ce37a 100644 --- a/addons/sale/report/sale_report.py +++ b/addons/sale/report/sale_report.py @@ -99,9 +99,10 @@ class sale_report(osv.osv): sum(l.product_uom_qty*l.price_unit) as price_total, pt.categ_id, l.order_id from - sale_order_line l - left join product_uom u on (u.id=l.product_uom) - left join product_template pt on (pt.id=l.product_id) + sale_order_line l ,product_uom u, product_product p, product_template pt + where u.id = l.product_uom + and pt.id = p.product_tmpl_id + and p.id = l.product_id group by l.id, l.order_id, l.product_id, u.name, pt.categ_id, u.uom_type, u.category_id) el where s.id = el.order_id group by el.id,