[FIX] module loading: pre/post_init_hook execution
New installation was detected using the `installed_version` attribute (`latest_version` in `ir_module_module` table), but this field wasn't reset at module uninstallation (now fixed bycb29f9e
) avoiding execution of hooks. Same logic was applied for migration scripts at8ff7230
. Fixes #7708
This commit is contained in:
parent
a2fe8e18d6
commit
ecfaf213c4
|
@ -142,7 +142,7 @@ def load_module_graph(cr, graph, status=None, perform_checks=True, skip_modules=
|
|||
migrations.migrate_module(package, 'pre')
|
||||
load_openerp_module(package.name)
|
||||
|
||||
new_install = package.installed_version is None
|
||||
new_install = package.state == 'to install'
|
||||
if new_install:
|
||||
py_module = sys.modules['openerp.addons.%s' % (module_name,)]
|
||||
pre_init = package.info.get('pre_init_hook')
|
||||
|
|
Loading…
Reference in New Issue