From de58cf495064b67c6646fc413142c0a7f8abc20a Mon Sep 17 00:00:00 2001 From: Arthur Maniet <ama@odoo.com> Date: Wed, 17 Sep 2014 13:00:21 +0200 Subject: [PATCH] [FIX] account: bank statement reconciliation widget: when filtering move lines by string, for a statement line with no partner, do a or on varchar fields, not a and --- addons/account/account_bank_statement.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/addons/account/account_bank_statement.py b/addons/account/account_bank_statement.py index 86c02ca6c1f8..5cd3b37c1511 100644 --- a/addons/account/account_bank_statement.py +++ b/addons/account/account_bank_statement.py @@ -594,12 +594,14 @@ class account_bank_statement_line(osv.osv): ('account_id.type', '=', 'payable')] else: domain += [('account_id.reconcile', '=', True), ('account_id.type', '=', 'other')] - if str: - domain += [('partner_id.name', 'ilike', str)] if excluded_ids: domain.append(('id', 'not in', excluded_ids)) if str: domain += ['|', ('move_id.name', 'ilike', str), ('move_id.ref', 'ilike', str)] + if not st_line.partner_id.id: + domain.insert(-1, '|', ) + domain.append(('partner_id.name', 'ilike', str)) + # Get move lines line_ids = mv_line_pool.search(cr, uid, domain, offset=offset, limit=limit, order="date_maturity asc, id asc", context=context) -- GitLab