[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
This commit is contained in:
parent
5b6aed9576
commit
d7ddebed96
|
@ -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'));
|
||||
|
|
Loading…
Reference in New Issue