[FIX] search: add delay of 250us (was 0) on autocomplete fields in search bar and m2o fields.

This avoids making a search request for each keypressed

bzr revid: mat@openerp.com-20140120160147-q7lg4j93c836ec44
This commit is contained in:
Martin Trigaux 2014-01-20 17:01:47 +01:00
parent c3e31842e0
commit 263693e44e
2 changed files with 2 additions and 2 deletions

View File

@ -476,7 +476,7 @@ instance.web.SearchView = instance.web.Widget.extend(/** @lends instance.web.Sea
html: true,
autoFocus: true,
minLength: 1,
delay: 0,
delay: 250,
}).data('autocomplete');
// MonkeyPatch autocomplete instance

View File

@ -3277,7 +3277,7 @@ instance.web.form.FieldMany2One = instance.web.form.AbstractField.extend(instanc
// disabled to solve a bug, but may cause others
//close: anyoneLoosesFocus,
minLength: 0,
delay: 0
delay: 250
});
this.$input.autocomplete("widget").openerpClass();
// used to correct a bug when selecting an element by pushing 'enter' in an editable list