From: Xavier Morel Date: Thu, 23 Feb 2012 12:28:29 +0000 (+0100) Subject: [FIX] use an array for controller classes, so they are iterated in the correct order... X-Git-Tag: 7.0-server~3643^2~33 X-Git-Url: http://git.inspyration.org/?a=commitdiff_plain;h=f926427406a8fa6cd60af52476119bd1d49691dc;p=odoo%2Fodoo.git [FIX] use an array for controller classes, so they are iterated in the correct order (otherwise it might not be possible to override an extended controller) bzr revid: xmo@openerp.com-20120223122829-mtz2w120qq8rbjrx --- diff --git a/addons/web/common/http.py b/addons/web/common/http.py index 71a280f..26807f6 100644 --- a/addons/web/common/http.py +++ b/addons/web/common/http.py @@ -405,14 +405,14 @@ def session_context(request, storage_path, session_cookie='sessionid'): #---------------------------------------------------------- addons_module = {} addons_manifest = {} -controllers_class = {} +controllers_class = [] controllers_object = {} controllers_path = {} class ControllerType(type): def __init__(cls, name, bases, attrs): super(ControllerType, cls).__init__(name, bases, attrs) - controllers_class["%s.%s" % (cls.__module__, cls.__name__)] = cls + controllers_class.append(("%s.%s" % (cls.__module__, cls.__name__), cls)) class Controller(object): __metaclass__ = ControllerType @@ -526,7 +526,7 @@ class Root(object): addons_module[module] = m addons_manifest[module] = manifest statics['/%s/static' % module] = path_static - for k, v in controllers_class.items(): + for k, v in controllers_class: if k not in controllers_object: o = v() controllers_object[k] = o