[IMP]:mrp:revert product_to_consume and consumed_product in mrp report.(it's displayed wrong calculation..).
bzr revid: apa@tinyerp.com-20100503090643-sbpgtgwajcim856u
This commit is contained in:
@@ -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,
|
||||
|
||||
@@ -16,8 +16,8 @@
|
||||
<field name="bom_id" invisible="1"/>
|
||||
<field name="product_id" invisible="1"/>
|
||||
<field name="product_qty" sum='Product Qty'/>
|
||||
<field name="products_to_consumme" sum='Products to Consumme'/>
|
||||
<field name="consummed_products" sum='Consummed Products'/>
|
||||
<!--field name="products_to_consumme" sum='Products to Consumme'/>
|
||||
<field name="consummed_products" sum='Consummed Products'/-->
|
||||
<field name="nbr" string="#Production Orders" sum='#Production Orders'/>
|
||||
<field name="state" invisible="1"/>
|
||||
<field name="routing_id" invisible="1"/>
|
||||
|
||||
Reference in New Issue
Block a user