[FIX] base: restart server when installing module from apps

When a new module is installed, its controllers and static files should
be available. A restart is required to do so.
This commit is contained in:
Christophe Simonis 2016-11-14 12:52:22 +01:00
parent fa544c9da0
commit 51561d3ac8
1 changed files with 1 additions and 1 deletions

View File

@ -725,7 +725,7 @@ class module(osv.osv):
to_install_ids = self.search(cr, uid, [('name', 'in', urls.keys()), ('state', '=', 'uninstalled')], context=context)
post_install_action = self.button_immediate_install(cr, uid, to_install_ids, context=context)
if already_installed:
if already_installed or to_install_ids:
# in this case, force server restart to reload python code...
cr.commit()
openerp.service.server.restart()