[FIX] mrp : UoM factor calculation corrected
authornep-OpenERP <nep@tinyerp.com>
Fri, 27 May 2011 09:03:07 +0000 (14:33 +0530)
committernep-OpenERP <nep@tinyerp.com>
Fri, 27 May 2011 09:03:07 +0000 (14:33 +0530)
lp bug: https://launchpad.net/bugs/751966 fixed

bzr revid: nep@tinyerp.com-20110527090307-m3zq2zogdqf889s4

addons/mrp/mrp.py

index 9e48cd2..dcbeba2 100644 (file)
@@ -471,7 +471,7 @@ class mrp_production(osv.osv):
             #if bom_point.routing_id and bom_point.routing_id.location_id:
             #   self.write(cr, uid, [production.id], {'location_src_id': bom_point.routing_id.location_id.id})
 
-            factor = production.product_qty * production.product_uom.factor_inv / bom_point.product_uom.factor
+            factor = production.product_qty * production.product_uom.factor_inv * bom_point.product_uom.factor
             res = self.pool.get('mrp.bom')._bom_explode(cr, uid, bom_point, factor / bom_point.product_qty, properties)
             results = res[0]
             results2 = res[1]