From 636ff15ee1d245c253ddbbc1916c453d78624ad7 Mon Sep 17 00:00:00 2001 From: apa-tiny Date: Mon, 3 May 2010 14:36:43 +0530 Subject: [PATCH] [IMP]:mrp:revert product_to_consume and consumed_product in mrp report.(it's displayed wrong calculation..). bzr revid: apa@tinyerp.com-20100503090643-sbpgtgwajcim856u --- addons/mrp/report/mrp_production_order.py | 14 ++------------ addons/mrp/report/mrp_production_order_view.xml | 4 ++-- 2 files changed, 4 insertions(+), 14 deletions(-) diff --git a/addons/mrp/report/mrp_production_order.py b/addons/mrp/report/mrp_production_order.py index c5bc5020e20..8f4fe764608 100644 --- a/addons/mrp/report/mrp_production_order.py +++ b/addons/mrp/report/mrp_production_order.py @@ -33,8 +33,8 @@ class mrp_production_order(osv.osv): 'day': fields.char('Day',size=64,readonly=True), 'origin': fields.char('Source Document', size=64), 'nbr': fields.integer('# of Orders', readonly=True), - 'products_to_consumme': fields.integer('Products to Consumme', readonly=True), - 'consummed_products': fields.integer('Consummed Products', readonly=True), +# 'products_to_consumme': fields.integer('Products to Consumme', readonly=True), +# 'consummed_products': fields.integer('Consummed Products', readonly=True), 'date': fields.date('Date', readonly=True), 'product_id': fields.many2one('product.product', 'Product', readonly=True), 'product_qty': fields.float('Product Qty', readonly=True), @@ -79,16 +79,6 @@ class mrp_production_order(osv.osv): sum(l.product_qty * u.factor) as product_qty, s.company_id as company_id, count(*) as nbr, - (select count(ll.id) from mrp_production_move_ids as mv - left join stock_move as sm ON (sm.id=mv.move_id) - left join mrp_production_product_line as ll ON (ll.id=mv.production_id) - where sm.state not in ('done','cancel') and ll.id=l.id - group by ll.id) as products_to_consumme, - (select count(ll.id) from mrp_production_move_ids as mv - left join stock_move as sm ON (sm.id=mv.move_id) - left join mrp_production_product_line as ll ON (ll.id=mv.production_id) - where sm.state in ('done','cancel') and ll.id=l.id - group by ll.id) as consummed_products, s.location_src_id, s.location_dest_id, s.bom_id, diff --git a/addons/mrp/report/mrp_production_order_view.xml b/addons/mrp/report/mrp_production_order_view.xml index acac00d590a..a28dd281fa2 100644 --- a/addons/mrp/report/mrp_production_order_view.xml +++ b/addons/mrp/report/mrp_production_order_view.xml @@ -16,8 +16,8 @@ - - +