diff options
| author | Christophe Simonis <chs@odoo.com> | 2019-02-25 15:09:00 +0100 |
|---|---|---|
| committer | Christophe Simonis <chs@odoo.com> | 2019-02-25 16:17:09 +0100 |
| commit | b3766768f9ad52c8faec2ddda92c859ced80f850 (patch) | |
| tree | 719668c263ae79158f6b2de525d4e2c1272cc604 | |
| parent | b13305fddccc94f231ef16d55457d4a9fc71820f (diff) | |
[FIX] website: correctly extract failed node in QWeb exceptions handling
| -rw-r--r-- | addons/website/models/ir_http.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/addons/website/models/ir_http.py b/addons/website/models/ir_http.py index 42a3580a18f..2be6c571a37 100644 --- a/addons/website/models/ir_http.py +++ b/addons/website/models/ir_http.py @@ -247,8 +247,8 @@ class Http(models.AbstractModel): exception_template = exception.name view = View._view_obj(exception_template) et = etree.fromstring(view.with_context(inherit_branding=False).read_combined(['arch'])['arch']) - node = et.find(exception.path.replace('/templates/t/', './')) - line = node is not None and etree.tostring(node, encoding='unicode') + node = et.xpath(exception.path) + line = node is not None and etree.tostring(node[0], encoding='unicode') # line = exception.html # FALSE -> contains branding <div t-att-data="request.browse('ok')"/> if line: # If QWebException occurs in a child view, the parent view is raised |
