summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorXavier Morel <xmo@openerp.com>2012-06-06 14:31:15 +0200
committerXavier Morel <xmo@openerp.com>2012-06-06 14:31:15 +0200
commitd7ddebed968e173ecff28fe9b85366da5f075fe5 (patch)
tree330dca20d2f3b38330d1a66da084e07bce70f61d
parent5b6aed9576e9a7c521ce10f53c5cc0c7847a4d58 (diff)
[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
-rw-r--r--addons/web/static/src/js/view_list.js4
1 files 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'));