diff options
| author | Aaron Bohy <aab@odoo.com> | 2015-07-23 10:42:01 +0200 |
|---|---|---|
| committer | Aaron Bohy <aab@odoo.com> | 2015-07-24 09:08:14 +0200 |
| commit | bfe82338800d5fb5c07813166f66be1aa017bfd1 (patch) | |
| tree | 39d94e7c9a606e62526f117772ae1b6d9f5a29ca /addons/web/static/src | |
| parent | 44c83299e31962790ac51f8f0f30ae76a24dcc00 (diff) | |
[FIX] web(_tests): FieldMany2One: autocomplete
Many2One fields were broken in views opened by default in edit mode, since rev.
a0ddaf8. The autocomplete widget was appended to the DOM at
'.oe_application > *:visible:last', but since the mentionned rev., the views
are rendered in fragments detached from the DOM, and once they are ready, the
old content is detached and the new one is attached instead. It means that by
appending the autocomplete widget within '.oe_application > *:visible:last',
it is detached from the DOM with the previous content, and Many2One fields can
thus not work.
This rev. simply removes the appendTo option of autocomplete, so that the
widget is directly appended to the body.
Also updates a tour's selector matching an autocomplete ul as it isn't inside
the .modal anymore.
Diffstat (limited to 'addons/web/static/src')
| -rw-r--r-- | addons/web/static/src/js/views/form_relational_widgets.js | 7 |
1 files changed, 0 insertions, 7 deletions
diff --git a/addons/web/static/src/js/views/form_relational_widgets.js b/addons/web/static/src/js/views/form_relational_widgets.js index 78224f4e9be..e8fb7fbba97 100644 --- a/addons/web/static/src/js/views/form_relational_widgets.js +++ b/addons/web/static/src/js/views/form_relational_widgets.js @@ -296,13 +296,6 @@ var FieldMany2One = common.AbstractField.extend(common.CompletionFieldMixin, com minLength: 0, delay: 200, }); - var appendTo = this.$input.parents('.oe-view-manager-content:visible, .modal-dialog:visible').last(); - if (appendTo.length === 0) { - appendTo = '.oe_application > *:visible:last'; - } - this.$input.autocomplete({ - appendTo: appendTo - }); // set position for list of suggestions box this.$input.autocomplete( "option", "position", { my : "left top", at: "left bottom" } ); this.$input.autocomplete("widget").openerpClass(); |
