[FIX] web: 558efacead not working for modals.

The above revision, which was already a patch for rev. a8f94a59cd, did not work properly for modals, like the use template many2one field of the mail.compose.message wizard.

We therefore append the ui-menu selection nearer to the input field.

$el.parent().parent() looks odd, but the goal is to append this selection ui just after the parent of the field, but as jquery ui autocomplete only accepts appendTo (and not after()), we append it to the parent of the field parent.

This fix has been verified for
 * many2one fields in classic form view (with or without sheets)
 * many2one fields in editable list view (embedded in form view or not-
 * many2one fields in wizard modals
 * many2one fields of the bank statement reconciliation widget
This commit is contained in:
Denis Ledoux 2014-12-10 21:35:49 +01:00
parent 1bac2692e8
commit e1cde4d038
1 changed files with 1 additions and 4 deletions

View File

@ -3736,10 +3736,7 @@ instance.web.form.FieldMany2One = instance.web.form.AbstractField.extend(instanc
minLength: 0,
delay: 250,
});
var appendTo = this.$input.parents('.oe_view_manager_body');
if (appendTo.length === 0){
appendTo = self.view.ViewManager.$el;
}
var appendTo = this.$el.parent().parent();
this.$input.autocomplete({
appendTo: appendTo
});