diff options
| author | Christophe Simonis <chs@odoo.com> | 2014-10-01 19:18:14 +0200 |
|---|---|---|
| committer | Christophe Simonis <chs@odoo.com> | 2014-10-01 19:18:14 +0200 |
| commit | 709c9868de7c4ac4985ed4e0055ae3e3e49742ad (patch) | |
| tree | e90227a947bddf47b3043fcbe8b99529a22aa7dd /addons/web/static/src/js/search.js | |
| parent | 85f26244a71a0b9a7faa283d6d24fdde6bae899a (diff) | |
| parent | e8831932464814ed5f9e3a0af33f98891a466417 (diff) | |
[MERGE] forward port of branch 8.0 up to e883193
Diffstat (limited to 'addons/web/static/src/js/search.js')
| -rw-r--r-- | addons/web/static/src/js/search.js | 5 |
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; |
