[FIX] move filter added at xmo@openerp.com-20130122135139-s3ui9hb44xd7afba to after map
If the filter is executed first, the "iteratee" is transformed to an array (from an object) and the "key" is lost, replaced by the indices to the array (and thus the name of the fields end up as "0", "1", "2", ... instead of their actual logical names) bzr revid: xmo@openerp.com-20130123084422-tbl05l5j72sx528n
This commit is contained in:
parent
e355f5bb97
commit
e5ad5f8e10
|
@ -1789,8 +1789,8 @@ instance.web.search.ExtendedSearchProposition = instance.web.Widget.extend(/** @
|
|||
init: function (parent, fields) {
|
||||
this._super(parent);
|
||||
this.fields = _(fields).chain()
|
||||
.filter(function (field) { return !field.deprecated; })
|
||||
.map(function(val, key) { return _.extend({}, val, {'name': key}); })
|
||||
.filter(function (field) { return !field.deprecated; })
|
||||
.sortBy(function(field) {return field.string;})
|
||||
.value();
|
||||
this.attrs = {_: _, fields: this.fields, selected: null};
|
||||
|
|
Loading…
Reference in New Issue