[FIX] base, res_currency: raise an error if a currency doesn't have any rate associated to the given period (if any)
bzr revid: qdp-launchpad@openerp.com-20130314153800-wl48wkp5f3zz0pb6
This commit is contained in:
commit
64502253b8
|
@ -49,7 +49,7 @@ class res_currency(osv.osv):
|
|||
id, rate = cr.fetchall()[0]
|
||||
res[id] = rate
|
||||
else:
|
||||
res[id] = 0
|
||||
raise osv.except_osv(_('Error!'),_("No currency rate associated for currency %d for the given period" % (id)))
|
||||
return res
|
||||
_name = "res.currency"
|
||||
_description = "Currency"
|
||||
|
|
Loading…
Reference in New Issue