[FIX] start selection of first field in advanced search
Picking very first field of the sequence is completely broken as it might very well be non-searchable, and not even displayed in the options list. Changed to simply call changed() at the end of the initialization code, this goes through all the supposedly correct code pathways without having to duplicate fields filtering (which is also done while rendering the view) bzr revid: xmo@openerp.com-20120406140520-rvol79gmf4yv97tx
This commit is contained in:
parent
eac3ebb87e
commit
4b2e41c665
|
@ -1370,7 +1370,6 @@ openerp.web.search.ExtendedSearchProposition = openerp.web.OldWidget.extend(/**
|
|||
this.value = null;
|
||||
},
|
||||
start: function () {
|
||||
this.select_field(this.fields.length > 0 ? this.fields[0] : null);
|
||||
var _this = this;
|
||||
this.$element.find(".searchview_extended_prop_field").change(function() {
|
||||
_this.changed();
|
||||
|
@ -1378,6 +1377,7 @@ openerp.web.search.ExtendedSearchProposition = openerp.web.OldWidget.extend(/**
|
|||
this.$element.find('.searchview_extended_delete_prop').click(function () {
|
||||
_this.destroy();
|
||||
});
|
||||
this.changed();
|
||||
},
|
||||
changed: function() {
|
||||
var nval = this.$element.find(".searchview_extended_prop_field").val();
|
||||
|
|
Loading…
Reference in New Issue