From b04a134a16e2559b594a536276928ef9cc6f56a4 Mon Sep 17 00:00:00 2001 From: Christophe Matthieu Date: Tue, 4 Dec 2012 11:23:04 +0100 Subject: [PATCH] [FIX] view_form: m2m_tags, when a user quick create a tag, select a tags in the list or blurred and click on the arrow, the last selection is persistant. Overwrite onSetInputData to reset suggestions if input is empty. bzr revid: chm@openerp.com-20121204102304-iru8pcjlca8zh5fj --- addons/web/static/src/js/view_form.js | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/addons/web/static/src/js/view_form.js b/addons/web/static/src/js/view_form.js index 21c3b3f43d9..5a573a1244e 100644 --- a/addons/web/static/src/js/view_form.js +++ b/addons/web/static/src/js/view_form.js @@ -3986,6 +3986,14 @@ instance.web.form.FieldMany2ManyTags = instance.web.form.AbstractField.extend(in return item.name; }, }, + core: { + onSetInputData: function(e, data) { + if (data == '') { + this._plugins.autocomplete._suggestions = null; + } + this.input().val(data); + }, + }, }, }).bind('getSuggestions', function(e, data) { var _this = this;