[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
This commit is contained in:
Jeremy Kersten
2019-02-14 13:39:55 +00:00
parent 9434ee850f
commit 96dc825c8c
+4
View File
@@ -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