diff --git a/openerp/addons/base/res/res_currency.py b/openerp/addons/base/res/res_currency.py index 931666f3d7f..0a50631f50b 100644 --- a/openerp/addons/base/res/res_currency.py +++ b/openerp/addons/base/res/res_currency.py @@ -56,9 +56,9 @@ class res_currency(osv.osv): if cr.rowcount: res[id] = cr.fetchone()[0] elif not raise_on_no_rate: - res[currency.id] = 0 + res[id] = 0 else: - raise osv.except_osv(_('Error!'),_("No currency rate associated for currency '%s' for the given period" % (currency.name))) + raise osv.except_osv(_('Error!'),_("No currency rate associated for currency '%d' for the given period" % (id))) return res _name = "res.currency"