From 34ce3e36e18fe3250afe89be2aac212baa8adeaf Mon Sep 17 00:00:00 2001 From: Emanuel Cino Date: Tue, 18 Aug 2015 09:34:54 +0200 Subject: [PATCH] [FIX] account: reconciliation domain MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit During reconciliation wizard, the wizard tries to find the best match with exisiting unreconciled lines. When more than one line could be reconciled with the bank statement line, the oldest line was not selected. e.g. - statemement line: 10€ - invoice 1: 10€ - invoice 2: 10€ - invoice 3: 5€ The statement line was reconciled with the 5€ invoice instead of the first one. This was due to the domain not matching when the exact same amount was found. Sign CLA for compassionCH Closes #8767 --- addons/account/account_bank_statement.py | 4 ++-- doc/cla/corporate/compassionCH.md | 16 ++++++++++++++++ 2 files changed, 18 insertions(+), 2 deletions(-) create mode 100644 doc/cla/corporate/compassionCH.md diff --git a/addons/account/account_bank_statement.py b/addons/account/account_bank_statement.py index 6bd6f76dab0..c193eb48a03 100644 --- a/addons/account/account_bank_statement.py +++ b/addons/account/account_bank_statement.py @@ -590,9 +590,9 @@ class account_bank_statement_line(osv.osv): else: domain += [('account_id.type', '=', 'payable')] if amount_field == 'amount_currency' and amount < 0: - domain += [(amount_field, '<', 0), (amount_field, '>', (sign * amount))] + domain += [(amount_field, '<', 0), (amount_field, '>=', (sign * amount))] else: - domain += [(amount_field, '>', 0), (amount_field, '<', (sign * amount))] + domain += [(amount_field, '>', 0), (amount_field, '<=', (sign * amount))] mv_lines = self.get_move_lines_for_reconciliation(cr, uid, st_line, excluded_ids=excluded_ids, limit=5, additional_domain=domain, context=context) ret = [] total = 0 diff --git a/doc/cla/corporate/compassionCH.md b/doc/cla/corporate/compassionCH.md new file mode 100644 index 00000000000..4f2ca78203f --- /dev/null +++ b/doc/cla/corporate/compassionCH.md @@ -0,0 +1,16 @@ +Switzerland, 2015-08-18 + +Compassion Switzerland agrees to the terms of the Odoo Corporate Contributor License +Agreement v1.0. + +I declare that I am authorized and able to make this agreement and sign this +declaration. + +Signed, + +Emanuel Cino ecino@compassion.ch https://github.com/CompassionCH + + +List of contributors: + +Emanuel Cino ecino@compassion.ch https://github.com/ecino