Skip to content
Snippets Groups Projects
Commit a81772f0 authored by Fabien Pinckaers's avatar Fabien Pinckaers
Browse files

merge

lp bug: https://launchpad.net/bugs/842758 fixed

bzr revid: fp@tinyerp.com-20110925221543-650h1jd4q57fyu0i
parents 440ed51b cc2878ad
No related branches found
No related tags found
No related merge requests found
......@@ -75,7 +75,7 @@ class product_uom(osv.osv):
_description = 'Product Unit of Measure'
def _compute_factor_inv(self, factor):
return factor and round(1.0 / factor, 6) or 0.0
return factor and (1.0 / factor) or 0.0
def _factor_inv(self, cursor, user, ids, name, arg, context=None):
res = {}
......@@ -100,7 +100,7 @@ class product_uom(osv.osv):
'factor': fields.float('Ratio', required=True,digits=(12, 12),
help='How many times this UoM is smaller than the reference UoM in this category:\n'\
'1 * (reference unit) = ratio * (this unit)'),
'factor_inv': fields.function(_factor_inv, digits_compute=dp.get_precision('Product UoM'),
'factor_inv': fields.function(_factor_inv, digits=(12,12),
fnct_inv=_factor_inv_write,
string='Ratio',
help='How many times this UoM is bigger than the reference UoM in this category:\n'\
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment