From b3766768f9ad52c8faec2ddda92c859ced80f850 Mon Sep 17 00:00:00 2001 From: Christophe Simonis Date: Mon, 25 Feb 2019 15:09:00 +0100 Subject: [PATCH] [FIX] website: correctly extract failed node in QWeb exceptions handling --- addons/website/models/ir_http.py | 4 ++-- 1 file 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
if line: # If QWebException occurs in a child view, the parent view is raised