[FIX]:decimal_precision when precision is specified as 0
lp bug: https://launchpad.net/bugs/762960 fixed bzr revid: nch@tinyerp.com-20110426124915-u1qykxakf9oyc35b
This commit is contained in:
parent
4dde776265
commit
ca3c3fdbc9
|
@ -41,7 +41,9 @@ class decimal_precision(osv.osv):
|
|||
def precision_get(self, cr, uid, application):
|
||||
cr.execute('select digits from decimal_precision where name=%s', (application,))
|
||||
res = cr.fetchone()
|
||||
return res and res[0] or 2
|
||||
if res:
|
||||
return res[0]
|
||||
return 2
|
||||
|
||||
def write(self, cr, uid, ids, data, *args, **argv):
|
||||
res = super(decimal_precision, self).write(cr, uid, ids, data, *args, **argv)
|
||||
|
|
Loading…
Reference in New Issue