[FIX] http: load routes from all installed modules
When a module uninstallation fails, its views and templates are still present in the database, and its routes should still be loaded. Otherwise random inconsistencies and errors may occur when rendering the modules' templates.
This commit is contained in:
@@ -193,7 +193,11 @@ class ir_http(osv.AbstractModel):
|
||||
_logger.info("Generating routing map")
|
||||
cr = request.cr
|
||||
m = request.registry.get('ir.module.module')
|
||||
ids = m.search(cr, openerp.SUPERUSER_ID, [('state', '=', 'installed'), ('name', '!=', 'web')], context=request.context)
|
||||
ids = m.search(
|
||||
cr, openerp.SUPERUSER_ID,
|
||||
[('state', 'in', ('installed', 'to remove', 'to upgrade')),
|
||||
('name', '!=', 'web')],
|
||||
context=request.context)
|
||||
installed = set(x['name'] for x in m.read(cr, 1, ids, ['name'], context=request.context))
|
||||
if openerp.tools.config['test_enable']:
|
||||
installed.add(openerp.modules.module.current_test)
|
||||
|
||||
Reference in New Issue
Block a user