diff options
| author | Goffin Simon <sig@odoo.com> | 2015-09-23 21:21:49 +0200 |
|---|---|---|
| committer | Goffin Simon <sig@odoo.com> | 2015-09-24 12:54:49 +0200 |
| commit | ddd2a3e97c4c7dea1273a1b97f55b0d1ce3dbdef (patch) | |
| tree | 3376e822155a71052508fdc3216c6b2b61f4fb52 | |
| parent | 0cddf87a77f3c7b4216d9badbe700d8306342241 (diff) | |
[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
| -rw-r--r-- | addons/account/account_move_line.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/addons/account/account_move_line.py b/addons/account/account_move_line.py index cd744fce26d..b5ee20e2a9f 100644 --- a/addons/account/account_move_line.py +++ b/addons/account/account_move_line.py @@ -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}) |
