bzr revid: fp@tinyerp.com-20090124011423-tqvob3cyx9f8ujh3
This commit is contained in:
Fabien Pinckaers 2009-01-24 02:14:23 +01:00
parent 67df4268fe
commit 181b1388a1
1 changed files with 6 additions and 2 deletions

View File

@ -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