summaryrefslogtreecommitdiff
path: root/addons/web/static/src/js/search.js
diff options
context:
space:
mode:
Diffstat (limited to 'addons/web/static/src/js/search.js')
-rw-r--r--addons/web/static/src/js/search.js5
1 files changed, 2 insertions, 3 deletions
diff --git a/addons/web/static/src/js/search.js b/addons/web/static/src/js/search.js
index 17458e1c185..f14b8c010f1 100644
--- a/addons/web/static/src/js/search.js
+++ b/addons/web/static/src/js/search.js
@@ -1636,8 +1636,7 @@ instance.web.search.ManyToOneField = instance.web.search.CharField.extend({
'contexts', [this.view.dataset.get_context()]);
return this.model.call('name_search', [], {
name: needle,
- args: instance.web.pyeval.eval(
- 'domains', this.attrs.domain ? [this.attrs.domain] : [], context),
+ args: (typeof this.attrs.domain === 'string') ? [] : this.attrs.domain,
limit: 8,
context: context
}).then(function (results) {
@@ -2367,7 +2366,7 @@ instance.web.search.AutoComplete = instance.web.Widget.extend({
switch (ev.which) {
case $.ui.keyCode.TAB:
case $.ui.keyCode.ENTER:
- if (self.get_search_string().length) {
+ if (self.current_result && self.get_search_string().length) {
self.select_item(ev);
}
break;