[REF]: res.currency: Improvements in checking by len(), passed context properly

bzr revid: rpa@tinyerp.com-20110704112206-1yvd6w8s43mqd7fw
This commit is contained in:
Rucha (Open ERP) 2011-07-04 16:52:06 +05:30
parent 247309d870
commit d29461fa9a
1 changed files with 2 additions and 2 deletions

View File

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