dp update modul1 modul2 modul3 ... ist jetzt moeglich
parent
4d9956f4a2
commit
cc1046a8e1
|
|
@ -20,7 +20,7 @@ def main():
|
||||||
print ' Setup-Schritte auf'
|
print ' Setup-Schritte auf'
|
||||||
print ' rollout Setzt Dokumentnummern, importiert Benutzer,'
|
print ' rollout Setzt Dokumentnummern, importiert Benutzer,'
|
||||||
print ' setzt dp_dmi auf noupdate, ...'
|
print ' setzt dp_dmi auf noupdate, ...'
|
||||||
print ' update module_name Modul updaten'
|
print ' update modul1 modul2 ... Module updaten'
|
||||||
print ' install module_name Modul installieren'
|
print ' install module_name Modul installieren'
|
||||||
print ' uninstall module_name Modul deinstallieren'
|
print ' uninstall module_name Modul deinstallieren'
|
||||||
print ' cancel_upgrade module_name Abbruch Modulinstallation'
|
print ' cancel_upgrade module_name Abbruch Modulinstallation'
|
||||||
|
|
@ -56,8 +56,9 @@ def main():
|
||||||
return
|
return
|
||||||
else:
|
else:
|
||||||
if len(argv) != 2:
|
if len(argv) != 2:
|
||||||
if len(argv) == 3 and argv[1] in ['update', 'install', 'uninstall', 'cancel_update', 'setup_part']:
|
if len(argv) == 3 and argv[1] in ['install', 'uninstall', 'cancel_update', 'setup_part']:
|
||||||
# 'update' requires additional param 'module_name'
|
pass
|
||||||
|
elif len(argv) >= 3 and argv[1] == 'update':
|
||||||
pass
|
pass
|
||||||
else:
|
else:
|
||||||
_usage()
|
_usage()
|
||||||
|
|
@ -145,7 +146,7 @@ def main():
|
||||||
]
|
]
|
||||||
|
|
||||||
if cmd == 'update':
|
if cmd == 'update':
|
||||||
instance.config.module_name = argv[2]
|
instance.config.module_name = argv[2:]
|
||||||
methods = [
|
methods = [
|
||||||
'login',
|
'login',
|
||||||
'update_module',
|
'update_module',
|
||||||
|
|
|
||||||
|
|
@ -471,10 +471,13 @@ class DatenpolFunctions():
|
||||||
def update_module(self):
|
def update_module(self):
|
||||||
"""Aktualisiere Modul"""
|
"""Aktualisiere Modul"""
|
||||||
|
|
||||||
module_name = self.config.module_name
|
module_names = self.config.module_name
|
||||||
mod_ids = self._execute('ir.module.module', 'search', [('name', '=', module_name), ('state', '=', 'installed')])
|
mod_ids = []
|
||||||
if not len(mod_ids) == 1:
|
for module_name in module_names:
|
||||||
raise Exception('Module "%s" not found or not installed.' % module_name)
|
mod_id = self._execute('ir.module.module', 'search', [('name', '=', module_name), ('state', '=', 'installed')])
|
||||||
|
if not len(mod_id) == 1:
|
||||||
|
raise Exception('Module "%s" not found or not installed.' % module_name)
|
||||||
|
mod_ids += mod_id
|
||||||
|
|
||||||
self._execute('ir.module.module', 'button_upgrade', mod_ids)
|
self._execute('ir.module.module', 'button_upgrade', mod_ids)
|
||||||
self._execute('base.module.upgrade', 'upgrade_module', [])
|
self._execute('base.module.upgrade', 'upgrade_module', [])
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue