[FIX] web: retro compatible patch for a8f94a59cd

Some views are not appended to the element oe_view_manager_body, such as client actions views.
For these cases, we append the element to the view manager element

Besides, we set the appendTo option of jquery ui autocomplete after a first initialization, because of a Jquery ui bug:
http://bugs.jqueryui.com/ticket/8858
This commit is contained in:
Denis Ledoux 2014-12-10 16:06:36 +01:00
parent 6dceae0de9
commit 558efacead
1 changed files with 7 additions and 1 deletions

View File

@ -3735,7 +3735,13 @@ instance.web.form.FieldMany2One = instance.web.form.AbstractField.extend(instanc
//close: anyoneLoosesFocus,
minLength: 0,
delay: 250,
appendTo: '.oe_view_manager_body'
});
var appendTo = this.$input.parents('.oe_view_manager_body');
if (appendTo.length === 0){
appendTo = self.view.ViewManager.$el;
}
this.$input.autocomplete({
appendTo: appendTo
});
// set position for list of suggestions box
this.$input.autocomplete( "option", "position", { my : "left top", at: "left bottom" } );