Skip to content

Commit

Permalink
[IMP] modules: on module update or init always update module list
Browse files Browse the repository at this point in the history
Was only done when updating base.
The cost of scanning the addons path should small in comparison to the update
time itself.

Followup of #9133
Closes #9140
  • Loading branch information
dreispt authored and mart-e committed Sep 26, 2017
1 parent 2447c94 commit 53fe7ae
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions odoo/modules/loading.py
Expand Up @@ -294,9 +294,8 @@ def load_modules(db, force_demo=False, status=None, update_module=False):
if update_module:
env = api.Environment(cr, SUPERUSER_ID, {})
Module = env['ir.module.module']
if ('base' in tools.config['init']) or ('base' in tools.config['update']):
_logger.info('updating modules list')
Module.update_list()
_logger.info('updating modules list')
Module.update_list()

_check_module_names(cr, itertools.chain(tools.config['init'], tools.config['update']))

Expand Down

0 comments on commit 53fe7ae

Please sign in to comment.