summaryrefslogtreecommitdiff
path: root/addons/web/static/src/js/framework
diff options
context:
space:
mode:
authorChristophe Simonis <chs@odoo.com>2018-05-02 13:52:12 +0200
committerChristophe Simonis <chs@odoo.com>2018-05-02 13:52:12 +0200
commit55ce6aff10b7b65650cfa114222333b86b4ef8d5 (patch)
tree86e819db011433b8e7287238cde21b8eb402f2e6 /addons/web/static/src/js/framework
parent0c40ba6c8b6a22fe132c16022919a0e433bb7832 (diff)
parent79bbd1dcb8c24d4be26807494d8d670faff9d7e3 (diff)
[MERGE] forward port branch 10.0 up to 79bbd1dcb8c
Diffstat (limited to 'addons/web/static/src/js/framework')
-rw-r--r--addons/web/static/src/js/framework/ajax.js8
1 files changed, 6 insertions, 2 deletions
diff --git a/addons/web/static/src/js/framework/ajax.js b/addons/web/static/src/js/framework/ajax.js
index dee6f4599b4..e74ae67dc04 100644
--- a/addons/web/static/src/js/framework/ajax.js
+++ b/addons/web/static/src/js/framework/ajax.js
@@ -252,8 +252,12 @@ function get_file(options) {
if (options.error) {
var body = this.contentDocument.body;
var nodes = body.children.length === 0 ? body.childNodes : body.children;
- var node = nodes[1] || nodes[0];
- options.error(JSON.parse(node.textContent));
+ options.error({
+ message: nodes.length > 1 ? nodes[1].textContent : '',
+ data: {
+ title: nodes.length > 0 ? nodes[0].textContent : '',
+ },
+ });
}
} finally {
complete();