[FIX] web: only show in 'Advanced Search', fields that are actually searcheable and avoid duplicate 'ID' field
bzr revid: xal@openerp.com-20131218113547-myl7eihvw5vbzkaa
This commit is contained in:
parent
bf324b417c
commit
9491755b8b
|
@ -1848,9 +1848,14 @@ instance.web.search.Advanced = instance.web.search.Input.extend({
|
|||
new instance.web.Model(this.view.model).call('fields_get', {
|
||||
context: this.view.dataset.context
|
||||
}).done(function(data) {
|
||||
self.fields = _.extend({
|
||||
self.fields = {
|
||||
id: { string: 'ID', type: 'id' }
|
||||
}, data);
|
||||
};
|
||||
_.each(data, function(field_def, field_name) {
|
||||
if (field_def.selectable !== false && field_name != 'id') {
|
||||
self.fields[field_name] = field_def;
|
||||
}
|
||||
});
|
||||
})).done(function () {
|
||||
self.append_proposition();
|
||||
});
|
||||
|
|
Loading…
Reference in New Issue