From 7743760a4ffd0e91b8d146fe15f6509e9958c958 Mon Sep 17 00:00:00 2001 From: Xavier Morel Date: Tue, 7 May 2013 10:16:11 +0200 Subject: [PATCH] [FIX] case where Root's dispatcher finds a non-exposed method Using elif, if a method was found but not exposed (because internal/whatever) the controller's index method would be skipped during URL dispatch leading to a 404. Since matched method yields an early return, a simple if will work, and will *not* skip case where ``method and not method.exposed`` bzr revid: xmo@openerp.com-20130507081611-t2bfba2ai79xj1ew --- addons/web/http.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/web/http.py b/addons/web/http.py index e0bd34a1bd0..7e10ccc71cd 100644 --- a/addons/web/http.py +++ b/addons/web/http.py @@ -614,7 +614,7 @@ class Root(object): elif exposed == 'http': _logger.debug("Dispatch http to %s %s %s", ps, c, method_name) return lambda request: HttpRequest(request).dispatch(method) - elif method_name != "index": + if method_name != "index": method_name = "index" continue ps, _slash, method_name = ps.rpartition('/')