[FIX]Refixed the issue of filter, removed unnecessary variables and just put the filter on current chaining process.
bzr revid: msh@tinyerp.com-20120608103842-igqr6t9bxbdvd7i7
This commit is contained in:
commit
6ae3c8dbaf
|
@ -1221,7 +1221,8 @@ openerp.web.search.ExtendedSearchProposition = openerp.web.OldWidget.extend(/**
|
|||
init: function (parent, fields) {
|
||||
this._super(parent);
|
||||
this.fields = _(fields).chain()
|
||||
.map(function(val, key) { return _.extend({}, val, {'name': key}); })
|
||||
.filter(function(field){return typeof field.store === 'undefined' || field.store || field.fnct_search})
|
||||
.map(function(val, key) {return _.extend({}, val, {'name': key}); })
|
||||
.sortBy(function(field) {return field.string;})
|
||||
.value();
|
||||
this.attrs = {_: _, fields: this.fields, selected: null};
|
||||
|
|
|
@ -1442,8 +1442,7 @@
|
|||
<div t-att-id="widget.element_id">
|
||||
<select class="searchview_extended_prop_field">
|
||||
<t t-foreach="widget.attrs.fields" t-as="field">
|
||||
<option t-if="typeof field.store === 'undefined' || field.store || field.fnct_search"
|
||||
t-att="{'selected': field === widget.attrs.selected ? 'selected' : null}"
|
||||
<option t-att="{'selected': field === widget.attrs.selected ? 'selected' : null}"
|
||||
t-att-value="field.name">
|
||||
<t t-esc="field.string"/>
|
||||
</option>
|
||||
|
|
Loading…
Reference in New Issue