[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:
Xavier Morel 2012-04-06 16:05:20 +02:00
parent eac3ebb87e
commit 4b2e41c665
1 changed files with 1 additions and 1 deletions

View File

@ -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();