From 1c0f0dd43cfc6d07bf29530aca420fa7ace622b1 Mon Sep 17 00:00:00 2001 From: Julien Legros Date: Tue, 23 Jun 2015 17:01:45 +0200 Subject: [PATCH] [FIX] account: multi currency reconciliation When invoicing in currency A and being paid in currency B, the exchange rate between those currencies might differ between the invoice date and the payment date. When reconciling, invoiced amounts should be converted using the invoice date exchange rate. opw-640248 --- addons/account/account_move_line.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/addons/account/account_move_line.py b/addons/account/account_move_line.py index 9aad75ae2fd..4d070ed963e 100644 --- a/addons/account/account_move_line.py +++ b/addons/account/account_move_line.py @@ -840,8 +840,7 @@ class account_move_line(osv.osv): total_amount = debit or credit else: ctx = context.copy() - if target_date: - ctx.update({'date': target_date}) + ctx.update({'date': line.date}) total_amount = currency_obj.compute(cr, uid, line_currency.id, target_currency.id, total_amount, context=ctx) actual_debit = currency_obj.compute(cr, uid, line_currency.id, target_currency.id, actual_debit, context=ctx) actual_credit = currency_obj.compute(cr, uid, line_currency.id, target_currency.id, actual_credit, context=ctx)