From f776f9f3dccb57ee20a6c1dcec1cc8bd3fa22ac6 Mon Sep 17 00:00:00 2001 From: Raphael Collet Date: Wed, 20 Sep 2017 14:50:23 +0200 Subject: [PATCH] [FIX] ir_http: routing map crashes after having run unittests If the server was launched with ``--test-enable``, `routing_map` tries to load the routing map of module `None`, which is the current module being tested... --- odoo/addons/base/ir/ir_http.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/odoo/addons/base/ir/ir_http.py b/odoo/addons/base/ir/ir_http.py index af9fde0b012..649d4fb3fd3 100644 --- a/odoo/addons/base/ir/ir_http.py +++ b/odoo/addons/base/ir/ir_http.py @@ -214,7 +214,7 @@ class IrHttp(models.AbstractModel): if not hasattr(cls, '_routing_map'): _logger.info("Generating routing map") installed = request.registry._init_modules - {'web'} - if tools.config['test_enable']: + if tools.config['test_enable'] and odoo.modules.module.current_test: installed.add(odoo.modules.module.current_test) mods = [''] + odoo.conf.server_wide_modules + sorted(installed) # Note : when routing map is generated, we put it on the class `cls`