summaryrefslogtreecommitdiff
path: root/addons/web/static/src
diff options
context:
space:
mode:
authorXavier Morel <xmo@openerp.com>2012-04-06 16:05:20 +0200
committerXavier Morel <xmo@openerp.com>2012-04-06 16:05:20 +0200
commit4b2e41c665b42e5a7ed84f80728f9925406e12c9 (patch)
treed2391c55b7c130c187f7adb7ff85135b527bd203 /addons/web/static/src
parenteac3ebb87e4459e7a89e6f91748af1f60cc0838c (diff)
[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
Diffstat (limited to 'addons/web/static/src')
-rw-r--r--addons/web/static/src/js/search.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/addons/web/static/src/js/search.js b/addons/web/static/src/js/search.js
index 1bf1bf912e6..dc22f98ad5a 100644
--- a/addons/web/static/src/js/search.js
+++ b/addons/web/static/src/js/search.js
@@ -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();