From 1213de3ff5828ff4e6967d3d63c5309f1adbf922 Mon Sep 17 00:00:00 2001 From: Goffin Simon Date: Tue, 2 Aug 2016 14:29:57 +0200 Subject: [PATCH] [FIX] account: get_reconciliation_proposition The bank statement reconciliation widget should look for the name of the account.move if the ref is not found. Backport of 11f8e8d opw:683741 --- addons/account/account_bank_statement.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/addons/account/account_bank_statement.py b/addons/account/account_bank_statement.py index 849326d1068..56b30800e65 100644 --- a/addons/account/account_bank_statement.py +++ b/addons/account/account_bank_statement.py @@ -556,6 +556,13 @@ class account_bank_statement_line(osv.osv): self.write(cr, uid, st_line.id, {'partner_id': mv_line['partner_id']}, context=context) mv_line['has_no_partner'] = False return [mv_line] + elif len(match_id) == 0: + move = self.pool['account.move'].search(cr, uid, [('name', '=', st_line.ref)], limit=1, context=context) + if move: + domain = [('move_id', '=', move[0])] + match_recs = self.get_move_lines_for_reconciliation(cr, uid, st_line, excluded_ids=excluded_ids, limit=2, additional_domain=domain) + if match_recs and len(match_recs) == 1: + return match_recs # How to compare statement line amount and move lines amount precision_digits = self.pool.get('decimal.precision').precision_get(cr, uid, 'Account')