From 65713a5dc9dba9c7350a920e4555efa88fe11fe6 Mon Sep 17 00:00:00 2001 From: "Quentin (OpenERP)" Date: Tue, 7 May 2013 15:05:20 +0200 Subject: [PATCH] [FIX] account_voucher: post accounting entry related to a currency rate difference in all cases bzr revid: qdp-launchpad@openerp.com-20130507130520-3zndk5mt7mlvv3i7 --- addons/account_voucher/account_voucher.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/account_voucher/account_voucher.py b/addons/account_voucher/account_voucher.py index 6c54437dc35..4b4639daeb6 100644 --- a/addons/account_voucher/account_voucher.py +++ b/addons/account_voucher/account_voucher.py @@ -1226,7 +1226,7 @@ class account_voucher(osv.osv): # if the rate is specified on the voucher, it will be used thanks to the special keys in the context # otherwise we use the rates of the system amount_currency = currency_obj.compute(cr, uid, company_currency, line.move_line_id.currency_id.id, move_line['debit']-move_line['credit'], context=ctx) - if line.amount == line.amount_unreconciled and line.move_line_id.currency_id.id == voucher_currency: + if line.amount == line.amount_unreconciled: sign = voucher.type in ('payment', 'purchase') and -1 or 1 foreign_currency_diff = sign * line.move_line_id.amount_residual_currency + amount_currency