[FIX] website: reset template

Create new env with current user instead of admin.
Avoid to show odoo bot as connected into the exceptions pages.
This commit is contained in:
Jeremy Kersten
2019-02-14 12:15:48 +01:00
parent ef03db9edd
commit 8eb1abf760
+1 -1
View File
@@ -225,7 +225,7 @@ class Http(models.AbstractModel):
cls._auth_method_public()
with registry(request.env.cr.dbname).cursor() as cr:
env = api.Environment(cr, SUPERUSER_ID, request.env.context)
env = api.Environment(cr, request.uid, request.env.context)
if code == 500:
logger.error("500 Internal Server Error:\n\n%s", values['traceback'])
View = env["ir.ui.view"]