From 96dc825c8c233167a1062575c4b28a9848d6e833 Mon Sep 17 00:00:00 2001 From: Jeremy Kersten Date: Thu, 14 Feb 2019 13:39:54 +0000 Subject: [PATCH] [FIX] website: reset template fix retro compatibilty Old qweb template http_error_debug was wrong, but we never entry in the if. Now that we fixed to enter in the if, we need to make retrocompatible code to be able to display the QWebException from v9 with the old view from v8. odoo.exceptions.QWebException vs odoo.addons.base.models.qweb.QWebException closes odoo/odoo#31383 --- addons/website/models/ir_http.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/addons/website/models/ir_http.py b/addons/website/models/ir_http.py index 785d794e9ca..65136703c8a 100644 --- a/addons/website/models/ir_http.py +++ b/addons/website/models/ir_http.py @@ -208,6 +208,10 @@ class Http(models.AbstractModel): if isinstance(exception, QWebException): values.update(qweb_exception=exception) + + # retro compatibility to remove in 12.2 + exception.qweb = dict(message=exception.message, expression=exception.html) + if type(exception.error) == odoo.exceptions.AccessError: code = 403