[MERGE][IMP] More explicit error message in res_currency

bzr revid: rim@openerp.com-20140423074037-igw9je00rcfgfzia
This commit is contained in:
Richard Mathot (OpenERP) 2014-04-23 09:40:37 +02:00
commit 700763f2da
1 changed files with 2 additions and 1 deletions

View File

@ -58,7 +58,8 @@ class res_currency(osv.osv):
elif not raise_on_no_rate:
res[id] = 0
else:
raise osv.except_osv(_('Error!'),_("No currency rate associated for currency %d for the given period" % (id)))
currency = self.browse(cr, uid, id, context=context)
raise osv.except_osv(_('Error!'),_("No currency rate associated for currency '%s' for the given period" % (currency.name)))
return res
_name = "res.currency"