[FIX] decimal_precision : Fixed issue with decimal accuracy
bzr revid: dhs@tinyerp.com-20110502131402-5s92t7tf1ne14993
This commit is contained in:
parent
45b8aa1944
commit
a1aadad636
|
@ -41,9 +41,7 @@ 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()
|
||||
if res:
|
||||
return res[0]
|
||||
return 2
|
||||
return res[0] if res else 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