[FIX] decimal_precision : Fixed issue with decimal accuracy

bzr revid: dhs@tinyerp.com-20110502131402-5s92t7tf1ne14993
This commit is contained in:
DHS (OpenERP) 2011-05-02 18:44:02 +05:30
parent 45b8aa1944
commit a1aadad636
1 changed files with 1 additions and 3 deletions

View File

@ -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)