diff options
| author | Adrian Torres <atorresj@hotmail.be> | 2017-10-09 09:35:59 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2017-10-09 09:35:59 +0200 |
| commit | e0b6eb3e6289de4f69b48b7bfe1f36c955f7dfd6 (patch) | |
| tree | a0a525edbadcd2b936c243ccddccd111a511b141 /odoo/modules/loading.py | |
| parent | 35993ba07d51669e963671f2287c8a578858cb67 (diff) | |
[FIX] loading: Don't add None to installed apps (#19850)
Previous to this rev., sometimes None could be added
to the list of _init_modules in the registry, this would
then be problematic in ir_http since a sorted would be
performed on this list, which works in py2 but in py3
None and string can't be compared implicitly.
Diffstat (limited to 'odoo/modules/loading.py')
| -rw-r--r-- | odoo/modules/loading.py | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/odoo/modules/loading.py b/odoo/modules/loading.py index b56377bcf3e..d8ee12c1690 100644 --- a/odoo/modules/loading.py +++ b/odoo/modules/loading.py @@ -166,7 +166,8 @@ def load_module_graph(cr, graph, status=None, perform_checks=True, skip_modules= overwrite = odoo.tools.config["overwrite_existing_translations"] module.with_context(overwrite=overwrite)._update_translations() - registry._init_modules.add(package.name) + if package.name is not None: + registry._init_modules.add(package.name) if new_install: post_init = package.info.get('post_init_hook') @@ -201,7 +202,8 @@ def load_module_graph(cr, graph, status=None, perform_checks=True, skip_modules= if hasattr(package, kind): delattr(package, kind) - registry._init_modules.add(package.name) + if package.name is not None: + registry._init_modules.add(package.name) cr.commit() _logger.log(25, "%s modules loaded in %.2fs, %s queries", len(graph), time.time() - t0, odoo.sql_db.sql_counter - t0_sql) |
