[FIX]account reconciliation widget: add account_code to filter
authorCedric Snauwaert <csn@openerp.com>
Mon, 23 Jun 2014 15:20:42 +0000 (17:20 +0200)
committerCedric Snauwaert <csn@openerp.com>
Mon, 23 Jun 2014 15:20:42 +0000 (17:20 +0200)
addons/account/static/src/js/account_widgets.js

index f78f7f5..c60bf41 100644 (file)
@@ -1283,7 +1283,8 @@ openerp.account = function (instance) {
             var self = this;
             var lines_to_show = [];
             _.each(self.propositions_lines, function(line){
-                if (self.getParent().excluded_move_lines_ids.indexOf(line.id) === -1 && line.q_label.toLowerCase().indexOf(self.filter.toLowerCase()) > -1) {
+                var filter = (line.q_label.toLowerCase().indexOf(self.filter.toLowerCase()) > -1 || line.account_code.toLowerCase().indexOf(self.filter.toLowerCase()) > -1);
+                if (self.getParent().excluded_move_lines_ids.indexOf(line.id) === -1 && filter) {
                     lines_to_show.push(line);
                 }
             });