[FIX]account_voucher: change signature of _get_current_rate according to res_currency from server

bzr revid: dle@openerp.com-20130801131234-p63bhee1aqrs9n8o
This commit is contained in:
Denis Ledoux
2013-08-01 15:12:34 +02:00
parent a99b5786d1
commit 1a04d7b128
+2 -2
View File
@@ -31,10 +31,10 @@ from openerp.report import report_sxw
class res_currency(osv.osv):
_inherit = "res.currency"
def _get_current_rate(self, cr, uid, ids, name, arg, context=None):
def _get_current_rate(self, cr, uid, ids, raise_on_no_rate=True, context=None):
if context is None:
context = {}
res = super(res_currency, self)._get_current_rate(cr, uid, ids, name, arg, context=context)
res = super(res_currency, self)._get_current_rate(cr, uid, ids, raise_on_no_rate, context=context)
if context.get('voucher_special_currency') in ids and context.get('voucher_special_currency_rate'):
res[context.get('voucher_special_currency')] = context.get('voucher_special_currency_rate')
return res