[FIX] read of a single id in int in res.currency

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

bzr revid: jir@tinyerp.com-20120822095433-55l2n56fplfiglwv
This commit is contained in:
Jignesh Rathod (Open ERP) 2012-08-22 15:24:33 +05:30
parent 5ff60ccd9f
commit 18ffbff5f1
1 changed files with 4 additions and 1 deletions

View File

@ -98,7 +98,10 @@ class res_currency(osv.osv):
def read(self, cr, user, ids, fields=None, context=None, load='_classic_read'):
res = super(res_currency, self).read(cr, user, ids, fields, context, load)
currency_rate_obj = self.pool.get('res.currency.rate')
for r in res:
values = res
if not isinstance(values, (list)):
values = [values]
for r in values:
if r.__contains__('rate_ids'):
rates=r['rate_ids']
if rates: