From d7ddebed968e173ecff28fe9b85366da5f075fe5 Mon Sep 17 00:00:00 2001 From: Xavier Morel Date: Wed, 6 Jun 2012 14:31:15 +0200 Subject: [PATCH] [FIX] handling of get_selection in listview in case of non-selectable lists (e.g. editable o2ms?) OPW 572764 bzr revid: xmo@openerp.com-20120606123115-hilv8huw72di4ovi --- addons/web/static/src/js/view_list.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/addons/web/static/src/js/view_list.js b/addons/web/static/src/js/view_list.js index aa4d3963db1..6d613f3892d 100644 --- a/addons/web/static/src/js/view_list.js +++ b/addons/web/static/src/js/view_list.js @@ -971,11 +971,11 @@ openerp.web.ListView.List = openerp.web.Class.extend( /** @lends openerp.web.Lis * @returns {Object} object with the keys ``ids`` and ``records``, holding respectively the ids of all selected records and the records themselves. */ get_selection: function () { + var result = {ids: [], records: []}; if (!this.options.selectable) { - return []; + return result; } var records = this.records; - var result = {ids: [], records: []}; this.$current.find('th.oe-record-selector input:checked') .closest('tr').each(function () { var record = records.get($(this).data('id'));