[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:
parent
0cddf87a77
commit
ddd2a3e97c
|
@ -836,9 +836,9 @@ class account_move_line(osv.osv):
|
||||||
ret_line['credit_currency'] = actual_credit
|
ret_line['credit_currency'] = actual_credit
|
||||||
ret_line['debit_currency'] = actual_debit
|
ret_line['debit_currency'] = actual_debit
|
||||||
if target_currency == company_currency:
|
if target_currency == company_currency:
|
||||||
actual_debit = debit
|
actual_debit = debit > 0 and amount or 0.0
|
||||||
actual_credit = credit
|
actual_credit = credit > 0 and amount or 0.0
|
||||||
total_amount = debit or credit
|
total_amount = abs(debit - credit)
|
||||||
else:
|
else:
|
||||||
ctx = context.copy()
|
ctx = context.copy()
|
||||||
ctx.update({'date': line.date})
|
ctx.update({'date': line.date})
|
||||||
|
|
Loading…
Reference in New Issue