From d29461fa9a53c2d07d4a9b82cb84d2fc1245f89b Mon Sep 17 00:00:00 2001 From: "Rucha (Open ERP)" Date: Mon, 4 Jul 2011 16:52:06 +0530 Subject: [PATCH] [REF]: res.currency: Improvements in checking by len(), passed context properly bzr revid: rpa@tinyerp.com-20110704112206-1yvd6w8s43mqd7fw --- openerp/addons/base/res/res_currency.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/openerp/addons/base/res/res_currency.py b/openerp/addons/base/res/res_currency.py index 9db27e49e2a..965c3036b7a 100644 --- a/openerp/addons/base/res/res_currency.py +++ b/openerp/addons/base/res/res_currency.py @@ -83,11 +83,11 @@ class res_currency(osv.osv): context = {} # We can use the following line,if we want to restrict this name_get for company setup only # But, its better to show currencies as name(Code). - if not len(ids): + if not ids:: return [] if isinstance(ids, (int, long)): ids = [ids] - reads = self.read(cr, uid, ids, ['name','symbol'], context, load='_classic_write') + reads = self.read(cr, uid, ids, ['name','symbol'], context=context, load='_classic_write') return [(x['id'], tools.ustr(x['name']) + (x['symbol'] and (' (' + tools.ustr(x['symbol']) + ')') or '')) for x in reads] def round(self, cr, uid, currency, amount):