[FIX] OPW 606045 - view_form: add a m2m tag from search_create_popup doesn't add tag to field
bzr revid: acl@openerp.com-20140407154510-5vxckvf1vpsvl96e
This commit is contained in:
parent
de117cd8ec
commit
d62c9cea68
|
@ -4306,7 +4306,7 @@ instance.web.form.FieldMany2ManyTags = instance.web.form.AbstractField.extend(in
|
||||||
if (data.id) {
|
if (data.id) {
|
||||||
self.add_id(data.id);
|
self.add_id(data.id);
|
||||||
} else {
|
} else {
|
||||||
ignore_blur = true;
|
self.ignore_blur = true;
|
||||||
data.action();
|
data.action();
|
||||||
}
|
}
|
||||||
this.trigger('setSuggestions', {result : []});
|
this.trigger('setSuggestions', {result : []});
|
||||||
|
@ -4346,7 +4346,7 @@ instance.web.form.FieldMany2ManyTags = instance.web.form.AbstractField.extend(in
|
||||||
if (this.get("effective_readonly"))
|
if (this.get("effective_readonly"))
|
||||||
return;
|
return;
|
||||||
var self = this;
|
var self = this;
|
||||||
var ignore_blur = false;
|
self.ignore_blur = false;
|
||||||
self.$text = this.$("textarea");
|
self.$text = this.$("textarea");
|
||||||
self.$text.textext(self.initialize_texttext()).bind('getSuggestions', function(e, data) {
|
self.$text.textext(self.initialize_texttext()).bind('getSuggestions', function(e, data) {
|
||||||
var _this = this;
|
var _this = this;
|
||||||
|
@ -4366,11 +4366,11 @@ instance.web.form.FieldMany2ManyTags = instance.web.form.AbstractField.extend(in
|
||||||
self.$text
|
self.$text
|
||||||
.focusin(function () {
|
.focusin(function () {
|
||||||
self.trigger('focused');
|
self.trigger('focused');
|
||||||
ignore_blur = false;
|
self.ignore_blur = false;
|
||||||
})
|
})
|
||||||
.focusout(function() {
|
.focusout(function() {
|
||||||
self.$text.trigger("setInputData", "");
|
self.$text.trigger("setInputData", "");
|
||||||
if (!ignore_blur) {
|
if (!self.ignore_blur) {
|
||||||
self.trigger('blurred');
|
self.trigger('blurred');
|
||||||
}
|
}
|
||||||
}).keydown(function(e) {
|
}).keydown(function(e) {
|
||||||
|
@ -4448,6 +4448,10 @@ instance.web.form.FieldMany2ManyTags = instance.web.form.AbstractField.extend(in
|
||||||
width: width,
|
width: width,
|
||||||
minHeight: height
|
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