From bc07877f642a68abd57c78c1fc541abfd9ea9bcc Mon Sep 17 00:00:00 2001 From: "Quentin (OpenERP)" Date: Wed, 23 Nov 2011 17:48:34 +0100 Subject: [PATCH] [FIX] account_voucher: fixed onchange_payment_rate_currency bzr revid: qdp-launchpad@openerp.com-20111123164834-m4tjfjtxpp8j2iew --- addons/account_voucher/account_voucher.py | 4 +--- .../account_voucher/voucher_payment_receipt_view.xml | 12 ++++++------ 2 files changed, 7 insertions(+), 9 deletions(-) diff --git a/addons/account_voucher/account_voucher.py b/addons/account_voucher/account_voucher.py index e47038de03b..b759387b590 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 17216ed5f21..4b6817d77ef 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 @@ - - + +