[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
This commit is contained in:
Christophe Matthieu 2012-12-04 11:23:04 +01:00
parent 683f31e51b
commit b04a134a16
1 changed files with 8 additions and 0 deletions

View File

@ -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;