[FIX] account: prepare_move_lines_for_reconciliation_widget

In the case where target_currency == company_currency, the actual_debit or the
actual_credit must be equal to the amount_residual defined on the account.move.line
and expressed in the currency of the company. The actual_debit/actual_credit must
take into account the possible partial reconciliations and this is done by the
residual amount.

opw:648744
This commit is contained in:
Goffin Simon 2015-09-23 21:21:49 +02:00
parent 0cddf87a77
commit ddd2a3e97c
1 changed files with 3 additions and 3 deletions

View File

@ -836,9 +836,9 @@ class account_move_line(osv.osv):
ret_line['credit_currency'] = actual_credit
ret_line['debit_currency'] = actual_debit
if target_currency == company_currency:
actual_debit = debit
actual_credit = credit
total_amount = debit or credit
actual_debit = debit > 0 and amount or 0.0
actual_credit = credit > 0 and amount or 0.0
total_amount = abs(debit - credit)
else:
ctx = context.copy()
ctx.update({'date': line.date})