From 558efaceadf027a51a049c2df4c570ec590353ac Mon Sep 17 00:00:00 2001 From: Denis Ledoux Date: Wed, 10 Dec 2014 16:06:36 +0100 Subject: [PATCH] [FIX] web: retro compatible patch for a8f94a59cde1c4034b1a704014d1572598db833f 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 --- addons/web/static/src/js/view_form.js | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/addons/web/static/src/js/view_form.js b/addons/web/static/src/js/view_form.js index e6cae5df4a0..2c3b952d2ee 100644 --- a/addons/web/static/src/js/view_form.js +++ b/addons/web/static/src/js/view_form.js @@ -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" } );