Deinstallation von vvow_einweisungen bei Installation

This commit is contained in:
Matthias Lotz 2025-04-07 15:23:48 +02:00
parent c0b64c6238
commit 8ccfebb399

View File

@ -22,5 +22,14 @@ def run_migration(cr, registry):
try:
env['res.partner'].migrate_machine_access_from_old_fields()
_logger.info("[OWS] Automatische Felder-Migration für Maschinenfreigaben in res.partner.")
except Exception as e:
_logger.error(f"[OWS] Fehler bei automatischer Felder-Migration: {e}")
try:
module = env['ir.module.module'].search([('name', '=', 'vvow_einweisungen')], limit=1)
if module and module.state != 'uninstalled':
_logger.info("[OWS] Deinstalliere altes Modul vvow_einweisungen...")
module.button_immediate_uninstall()
except Exception as e:
_logger.error(f"[OWS] Fehler bei deinstallieren von vvow_einweisungen: {e}")