From 181b1388a1ee18efd56178b66c38e63df2f51a3d Mon Sep 17 00:00:00 2001 From: Fabien Pinckaers Date: Sat, 24 Jan 2009 02:14:23 +0100 Subject: [PATCH] bugfix bzr revid: fp@tinyerp.com-20090124011423-tqvob3cyx9f8ujh3 --- addons/stock/report_stock.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/addons/stock/report_stock.py b/addons/stock/report_stock.py index 36b7c166397..b8ee64a2307 100644 --- a/addons/stock/report_stock.py +++ b/addons/stock/report_stock.py @@ -49,10 +49,12 @@ class stock_report_prodlots(osv.osv): sm.location_id, sm.product_id, sm.prodlot_id, - -sum(sm.product_qty) as qty + -sum(sm.product_qty /uo.factor) as qty from stock_move as sm left join stock_location sl on (sl.id = sm.location_id) + left join product_uom uo + on (uo.id=sm.product_uom) where state = 'done' group by sm.location_id, sm.product_id, sm.product_uom, sm.prodlot_id union all @@ -60,10 +62,12 @@ class stock_report_prodlots(osv.osv): sm.location_dest_id as location_id, sm.product_id, sm.prodlot_id, - sum(sm.product_qty) as qty + sum(sm.product_qty /uo.factor) as qty from stock_move as sm left join stock_location sl on (sl.id = sm.location_dest_id) + left join product_uom uo + on (uo.id=sm.product_uom) where sm.state = 'done' group by sm.location_dest_id, sm.product_id, sm.product_uom, sm.prodlot_id ) as report