diff --git a/addons/account/account_bank_statement.py b/addons/account/account_bank_statement.py index 0a6b14e1e57..3bc589eb929 100644 --- a/addons/account/account_bank_statement.py +++ b/addons/account/account_bank_statement.py @@ -590,6 +590,8 @@ class account_bank_statement_line(osv.osv): if excluded_ids: domain.append(('id', 'not in', excluded_ids)) if filter_str: + if not st_line.partner_id: + domain += [ '|', ('partner_id.name', 'ilike', filter_str)] domain += ['|', ('move_id.name', 'ilike', filter_str), ('move_id.ref', 'ilike', filter_str)] line_ids = mv_line_pool.search(cr, uid, domain, offset=offset, limit=limit, order="date_maturity asc, id asc", context=context) return self.make_counter_part_lines(cr, uid, st_line, line_ids, count=count, context=context) diff --git a/addons/account/static/src/js/account_widgets.js b/addons/account/static/src/js/account_widgets.js index 2519c011b7a..8f5786e978f 100644 --- a/addons/account/static/src/js/account_widgets.js +++ b/addons/account/static/src/js/account_widgets.js @@ -789,6 +789,9 @@ openerp.account = function (instance) { line.q_amount = (line.debit !== 0 ? "- "+line.q_debit : "") + (line.credit !== 0 ? line.q_credit : ""); line.q_popover = QWeb.render("bank_statement_reconciliation_move_line_details", {line: line}); line.q_label = line.name; + if (line.has_no_partner){ + line.q_label = line.partner_name + ': ' +line.q_label; + } // WARNING : pretty much of a ugly hack // The value of account_move.ref is either the move's communication or it's name without the slashes @@ -1039,7 +1042,7 @@ openerp.account = function (instance) { var slice_start = self.get("pager_index") * self.max_move_lines_displayed; var slice_end = (self.get("pager_index")+1) * self.max_move_lines_displayed; _( _.filter(self.mv_lines_deselected, function(o){ - return o.name.indexOf(self.filter) !== -1 || (o.ref && o.ref.indexOf(self.filter) !== -1) + return o.q_label.indexOf(self.filter) !== -1 || (o.ref && o.ref.indexOf(self.filter) !== -1) }) .slice(slice_start, slice_end)).each(function(line){ var $line = $(QWeb.render("bank_statement_reconciliation_move_line", {line: line, selected: false})); diff --git a/addons/account/static/src/xml/account_bank_statement_reconciliation.xml b/addons/account/static/src/xml/account_bank_statement_reconciliation.xml index b14cc93e0a5..b5a8492545d 100644 --- a/addons/account/static/src/xml/account_bank_statement_reconciliation.xml +++ b/addons/account/static/src/xml/account_bank_statement_reconciliation.xml @@ -128,7 +128,7 @@