diff options
| author | qdp-odoo <qdp@odoo.com> | 2016-07-08 16:57:06 +0200 |
|---|---|---|
| committer | qdp-odoo <qdp@odoo.com> | 2016-07-08 17:03:25 +0200 |
| commit | 68f0b8fe4e184e8088c6475d0b9e157f43eb684b (patch) | |
| tree | db9243dbb1e6f5e55b05f378c261ae8816fb625d /addons | |
| parent | 6a3cf82130f3eeee1ba7284cc416522d825e45eb (diff) | |
[FIX] account: bank reconciliation was auto-reconciling undistincly debit lines on bank accounts with negative amounts and/or credit lines with positive amounts where only one field (debit/credit) should be checked if the amount is positive/negative.
Diffstat (limited to 'addons')
| -rw-r--r-- | addons/account/models/account_bank_statement.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/addons/account/models/account_bank_statement.py b/addons/account/models/account_bank_statement.py index f6d88bc3b36..b351c53ef71 100644 --- a/addons/account/models/account_bank_statement.py +++ b/addons/account/models/account_bank_statement.py @@ -576,10 +576,11 @@ class AccountBankStatementLine(models.Model): domain = [(f, '>', 0), (f, '<', amount)] elif comparator == '=': if f == 'amount_residual': + liquidity_field = amount > 0 and 'debit' or 'credit' domain = [ '|', (f, '=', float_round(amount, precision_digits=p)), '&', ('account_id.internal_type', '=', 'liquidity'), - '|', ('debit', '=', amount), ('credit', '=', amount), + (liquidity_field, '=', amount), ] else: domain = [ |
