From f8c261c76a98972590fa2a6293e3934f6e9c51ad Mon Sep 17 00:00:00 2001 From: qdp-odoo Date: Tue, 24 Nov 2015 10:22:16 +0100 Subject: [PATCH] [FIX] account: when a payment is processed in the bank interface, it will complete the partner automatically if a single invoice is found with the same reference. As expected for a structured communication for example. Fixes opw 653452 --- addons/account/account_bank_statement.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/addons/account/account_bank_statement.py b/addons/account/account_bank_statement.py index c193eb48a03..c85f48a83f1 100644 --- a/addons/account/account_bank_statement.py +++ b/addons/account/account_bank_statement.py @@ -531,8 +531,9 @@ class account_bank_statement_line(osv.osv): ('reconcile_id', '=', False), ('state', '=', 'valid'), ('account_id.reconcile', '=', True), - ('id', 'not in', excluded_ids), - ('partner_id', 'in', (False, st_line.partner_id.id))] + ('id', 'not in', excluded_ids),] + if st_line.partner_id: + domain.append(('partner_id', '=', st_line.partner_id.id)) return domain def get_reconciliation_proposition(self, cr, uid, st_line, excluded_ids=None, context=None):