From: Quentin (OpenERP) Date: Wed, 23 Nov 2011 16:48:34 +0000 (+0100) Subject: [FIX] account_voucher: fixed onchange_payment_rate_currency X-Git-Tag: 6.1.0-rc1-addons~847^2~11 X-Git-Url: http://git.inspyration.org/?a=commitdiff_plain;h=bc07877f642a68abd57c78c1fc541abfd9ea9bcc;p=odoo%2Fodoo.git [FIX] account_voucher: fixed onchange_payment_rate_currency bzr revid: qdp-launchpad@openerp.com-20111123164834-m4tjfjtxpp8j2iew --- diff --git a/addons/account_voucher/account_voucher.py b/addons/account_voucher/account_voucher.py index e47038d..b759387 100644 --- a/addons/account_voucher/account_voucher.py +++ b/addons/account_voucher/account_voucher.py @@ -615,7 +615,7 @@ class account_voucher(osv.osv): default['value']['writeoff_amount'] = self._compute_writeoff_amount(cr, uid, default['value']['line_dr_ids'], default['value']['line_cr_ids'], price) return default - def onchange_payment_rate_currency(self, cr, uid, ids, currency_id, payment_rate_currency_id, date, amount, company_id, context=None): + def onchange_payment_rate_currency(self, cr, uid, ids, currency_id, payment_rate, payment_rate_currency_id, date, amount, company_id, context=None): if context is None: context = {} res = {'value': {}} @@ -623,8 +623,6 @@ class account_voucher(osv.osv): if currency_id and currency_id == payment_rate_currency_id: ctx = context.copy() ctx.update({'date': date}) - payment_rate = self.pool.get('res.currency').browse(cr, uid, currency_id, context=ctx).rate - res['value'].update({'payment_rate': payment_rate}) vals = self.onchange_rate(cr, uid, ids, payment_rate, amount, currency_id, payment_rate_currency_id, company_id, context=ctx) for key in vals.keys(): res[key].update(vals[key]) diff --git a/addons/account_voucher/voucher_payment_receipt_view.xml b/addons/account_voucher/voucher_payment_receipt_view.xml index 17216ed..4b6817d 100644 --- a/addons/account_voucher/voucher_payment_receipt_view.xml +++ b/addons/account_voucher/voucher_payment_receipt_view.xml @@ -128,8 +128,8 @@ - - + + @@ -208,8 +208,8 @@ - - + + @@ -362,8 +362,8 @@ - - + +