[FIX]mrp:raw material units should always be rounded up
authorron@tinyerp.com <>
Mon, 14 Mar 2011 13:12:54 +0000 (18:42 +0530)
committerron@tinyerp.com <>
Mon, 14 Mar 2011 13:12:54 +0000 (18:42 +0530)
lp bug: https://launchpad.net/bugs/718722 fixed

bzr revid: ron@tinyerp.com-20110314131254-inohohq5tfgw32ey

addons/mrp/mrp.py

index 2fa72d6..976325f 100644 (file)
@@ -386,9 +386,10 @@ class mrp_bom_revision(osv.osv):
 mrp_bom_revision()
 
 def rounding(f, r):
+    import math
     if not r:
         return f
-    return round(f / r) * r
+    return math.ceil(f / r) * r
 
 class mrp_production(osv.osv):
     """