diff options
| author | Richard Mathot (OpenERP) <rim@openerp.com> | 2014-04-30 10:01:03 +0200 |
|---|---|---|
| committer | Richard Mathot (OpenERP) <rim@openerp.com> | 2014-04-30 10:01:03 +0200 |
| commit | 03cfbf0f469ef174b6b0c26e1830d5f2e97b987c (patch) | |
| tree | 51a97f3170d4e54c9a36136bac90ea7ca0fd52b7 /addons/web/static/src/js | |
| parent | 775e553d5a9b7abb1218bb36b22bad03221d3049 (diff) | |
| parent | adef80714d6f3a7cb5940cdefd21280a2a67bfe5 (diff) | |
[MERGE] from lp:openerp-web
bzr revid: rim@openerp.com-20140430080103-tc4a9ow7rwp3b5nk
Diffstat (limited to 'addons/web/static/src/js')
| -rw-r--r-- | addons/web/static/src/js/core.js | 13 | ||||
| -rw-r--r-- | addons/web/static/src/js/view_form.js | 2 |
2 files changed, 7 insertions, 8 deletions
diff --git a/addons/web/static/src/js/core.js b/addons/web/static/src/js/core.js index a4bcd1922de..74866112d99 100644 --- a/addons/web/static/src/js/core.js +++ b/addons/web/static/src/js/core.js @@ -460,14 +460,11 @@ instance.web.Session.include( /** @lends instance.web.Session# */{ .appendTo(document.body) .load(function () { try { - if (options.error) { - if (!this.contentDocument.body.childNodes[1]) { - options.error(this.contentDocument.body.childNodes); - } - else { - options.error(JSON.parse(this.contentDocument.body.childNodes[1].textContent)); - } - } + if (options.error) { + var body = this.contentDocument.body; + var node = body.childNodes[1] || body.childNodes[0]; + options.error(JSON.parse(node.textContent)); + } } finally { complete(); } diff --git a/addons/web/static/src/js/view_form.js b/addons/web/static/src/js/view_form.js index 1db4112d2a4..e14d60747ed 100644 --- a/addons/web/static/src/js/view_form.js +++ b/addons/web/static/src/js/view_form.js @@ -3624,6 +3624,8 @@ instance.web.form.FieldMany2One = instance.web.form.AbstractField.extend(instanc minLength: 0, delay: 250 }); + // set position for list of suggestions box + this.$input.autocomplete( "option", "position", { my : "left top", at: "left bottom" } ); this.$input.autocomplete("widget").openerpClass(); // used to correct a bug when selecting an element by pushing 'enter' in an editable list this.$input.keyup(function(e) { |
