[IMP] account: display the currency in name_get of journal also for journals in company currency

bzr revid: qdp-launchpad@openerp.com-20111202110716-yt4nc2v3p07zdmkl
This commit is contained in:
Quentin (OpenERP) 2011-12-02 12:07:16 +01:00
parent 8dcc7aac7a
commit e1e585aee3
1 changed files with 4 additions and 2 deletions

View File

@ -789,9 +789,11 @@ class account_journal(osv.osv):
result = self.browse(cr, user, ids, context=context)
res = []
for rs in result:
name = rs.name
if rs.currency:
name = "%s (%s)" % (rs.name, rs.currency.name)
currency = rs.currency
else:
currency = rs.company_id.currency_id
name = "%s (%s)" % (rs.name, currency.name)
res += [(rs.id, name)]
return res