[MERGE] [FIX] many2manytags: make sure the selected tag is added to the field when searched (opw 606045)
bzr revid: mat@openerp.com-20140408082758-zb2acpbfv2r6xidg
This commit is contained in:
commit
506c08a9af
|
@ -4308,7 +4308,7 @@ instance.web.form.FieldMany2ManyTags = instance.web.form.AbstractField.extend(in
|
|||
if (data.id) {
|
||||
self.add_id(data.id);
|
||||
} else {
|
||||
ignore_blur = true;
|
||||
self.ignore_blur = true;
|
||||
data.action();
|
||||
}
|
||||
this.trigger('setSuggestions', {result : []});
|
||||
|
@ -4348,7 +4348,7 @@ instance.web.form.FieldMany2ManyTags = instance.web.form.AbstractField.extend(in
|
|||
if (this.get("effective_readonly"))
|
||||
return;
|
||||
var self = this;
|
||||
var ignore_blur = false;
|
||||
self.ignore_blur = false;
|
||||
self.$text = this.$("textarea");
|
||||
self.$text.textext(self.initialize_texttext()).bind('getSuggestions', function(e, data) {
|
||||
var _this = this;
|
||||
|
@ -4368,11 +4368,11 @@ instance.web.form.FieldMany2ManyTags = instance.web.form.AbstractField.extend(in
|
|||
self.$text
|
||||
.focusin(function () {
|
||||
self.trigger('focused');
|
||||
ignore_blur = false;
|
||||
self.ignore_blur = false;
|
||||
})
|
||||
.focusout(function() {
|
||||
self.$text.trigger("setInputData", "");
|
||||
if (!ignore_blur) {
|
||||
if (!self.ignore_blur) {
|
||||
self.trigger('blurred');
|
||||
}
|
||||
}).keydown(function(e) {
|
||||
|
@ -4450,6 +4450,10 @@ instance.web.form.FieldMany2ManyTags = instance.web.form.AbstractField.extend(in
|
|||
width: width,
|
||||
minHeight: height
|
||||
});
|
||||
},
|
||||
_search_create_popup: function() {
|
||||
self.ignore_blur = true;
|
||||
return instance.web.form.CompletionFieldMixin._search_create_popup.apply(this, arguments);
|
||||
},
|
||||
});
|
||||
|
||||
|
|
Loading…
Reference in New Issue