summaryrefslogtreecommitdiff
path: root/addons/web/static/src/js/widgets/auto_complete.js
diff options
context:
space:
mode:
authorMartin Geubelle <mge@odoo.com>2019-02-26 15:18:54 +0000
committerMartin Geubelle <mge@odoo.com>2019-02-27 10:33:41 +0000
commit8316c2d21025b97a80caefb5351c794c1c87dc45 (patch)
tree6894aa7aebdf5cff60027f8d93a961aa9253789d /addons/web/static/src/js/widgets/auto_complete.js
parentf9d3b5b7dfe15fb53f14fa0a0ae91bbeded9939b (diff)
[FIX] web: correctly handle (no result) selection in search
In the recent control panel refactoring, selecting '(no result)' (when using the autocomplete on a many2one for example) was no correctly handled and was leading to a traceback. It is now correctly handled and the search bar is correctly re-rendered. Task 1936745 closes odoo/odoo#31438
Diffstat (limited to 'addons/web/static/src/js/widgets/auto_complete.js')
-rw-r--r--addons/web/static/src/js/widgets/auto_complete.js6
1 files changed, 2 insertions, 4 deletions
diff --git a/addons/web/static/src/js/widgets/auto_complete.js b/addons/web/static/src/js/widgets/auto_complete.js
index 6dd78f8f730..4da54cf8b5c 100644
--- a/addons/web/static/src/js/widgets/auto_complete.js
+++ b/addons/web/static/src/js/widgets/auto_complete.js
@@ -201,10 +201,8 @@ return Widget.extend({
this.current_result = $li.data('result');
},
select_item: function (ev) {
- if (this.current_result.facet) {
- this.select(ev, {item: {facet: this.current_result.facet}});
- this.close();
- }
+ this.select(ev, {item: {facet: this.current_result.facet}});
+ this.close();
},
show: function () {
this.$el.show();