From fe1541abebfc69309a83f87d2ab9b8f450cfd59f Mon Sep 17 00:00:00 2001 From: qsm-odoo Date: Mon, 6 Jul 2015 11:00:41 +0200 Subject: [PATCH] [FIX] web: many2manytags - empty value when selected The input value was not removed once the user added a tag --- addons/web/static/src/js/views/form_relational_widgets.js | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/addons/web/static/src/js/views/form_relational_widgets.js b/addons/web/static/src/js/views/form_relational_widgets.js index 5caf87f1819..4513b206f33 100644 --- a/addons/web/static/src/js/views/form_relational_widgets.js +++ b/addons/web/static/src/js/views/form_relational_widgets.js @@ -284,8 +284,8 @@ var FieldMany2One = common.AbstractField.extend(common.CompletionFieldMixin, com item.action(); // Cancel widget blurring, to avoid form blur event self.trigger('focused'); - return false; } + return false; }, focus: function(e, ui) { e.preventDefault(); @@ -1353,10 +1353,7 @@ var FieldMany2ManyTags = AbstractManyField.extend(common.CompletionFieldMixin, c var newValue = this.many2one.get('value'); if(newValue) { this.add_id(newValue); - var self = this; - setTimeout(function() { - self.many2one.$input.val(''); - }, 0); + this.many2one.set({'value': false}); } });