From 206f7e79d0a839bc1d8d3fc1b7bfc36f464df039 Mon Sep 17 00:00:00 2001 From: Romain Derie Date: Thu, 1 Dec 2022 14:22:53 +0000 Subject: [PATCH] [FIX] website: prevent error to be raised instead of warning logging There is no method attribute, it was replaced by original_endpoint since httpocalypse at [1]. So entering this `if` condition will actually crash as the logger won't be able to find what it needs. [1]: https://github.com/odoo/odoo/commit/c3714eafbd07f7c7b98ff98bc604d76db4fe1c7b#diff-5f1b777eb0bc30f3f494ffe3e1522524cd0822f6c94c8644070a6db7c40b9c34L905 closes odoo/odoo#107629 X-original-commit: fd84ad8b262ddbee50b93481aa5c5ff11a4eb6f7 Signed-off-by: Julien Castiaux Signed-off-by: Romain Derie (rde) --- addons/website/models/website.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/website/models/website.py b/addons/website/models/website.py index fef75b83f61..41a6c485d60 100644 --- a/addons/website/models/website.py +++ b/addons/website/models/website.py @@ -1113,7 +1113,7 @@ class Website(models.Model): if 'sitemap' not in rule.endpoint.routing: logger.warning('No Sitemap value provided for controller %s (%s)' % - (rule.endpoint.method, ','.join(rule.endpoint.routing['routes']))) + (rule.endpoint.original_endpoint, ','.join(rule.endpoint.routing['routes']))) converters = rule._converters or {} if query_string and not converters and (query_string not in rule.build({}, append_unknown=False)[1]):