[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
This commit is contained in:
Julien Legros 2015-06-23 17:01:45 +02:00
parent dc71dbb40e
commit 1c0f0dd43c
1 changed files with 1 additions and 2 deletions

View File

@ -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)