[FIX] mrp : Product Quantity Corrected with Different UoM in Production Order
authorAnup (OpenERP) <ach@openerp.com>
Fri, 4 Feb 2011 07:33:42 +0000 (13:03 +0530)
committerAnup (OpenERP) <ach@openerp.com>
Fri, 4 Feb 2011 07:33:42 +0000 (13:03 +0530)
lp bug: https://launchpad.net/bugs/709055 fixed

bzr revid: ach@openerp.com-20110204073342-wt1gkgtkco1exsuf

addons/mrp/mrp.py

index cb05ac7..33d58e6 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 / 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]