diff --git a/__manifest__.py b/__manifest__.py index 7759e20..0309876 100644 --- a/__manifest__.py +++ b/__manifest__.py @@ -16,9 +16,6 @@ 'views/assets.xml', 'views/machine_product_training_views.xml', 'data/data.xml', - #'data/data_product_and_categories.xml', - #'data/machine_product_links.xml', - ], 'qweb': [ 'static/src/xml/ows_briefing_details.xml', @@ -34,4 +31,5 @@ ], }, 'post_init_hook': 'run_migration', + } diff --git a/data/ows.machine.product.xlsx b/data/ows.machine.product.xlsx deleted file mode 100644 index 7ab8acf..0000000 Binary files a/data/ows.machine.product.xlsx and /dev/null differ diff --git a/data/ows.machine.training.xlsx b/data/ows.machine.training.xlsx deleted file mode 100644 index 9c83cf7..0000000 Binary files a/data/ows.machine.training.xlsx and /dev/null differ diff --git a/data/data_product_and_categories.xml b/helper/data_product_and_categories.xml similarity index 100% rename from data/data_product_and_categories.xml rename to helper/data_product_and_categories.xml diff --git a/scripts/export.sh b/helper/export.sh similarity index 100% rename from scripts/export.sh rename to helper/export.sh diff --git a/scripts/export_categories.py b/helper/export_categories.py similarity index 100% rename from scripts/export_categories.py rename to helper/export_categories.py diff --git a/scripts/export_products.py b/helper/export_products.py similarity index 100% rename from scripts/export_products.py rename to helper/export_products.py diff --git a/scripts/export_products_and_categories.py b/helper/export_products_and_categories.py similarity index 100% rename from scripts/export_products_and_categories.py rename to helper/export_products_and_categories.py diff --git a/scripts/install.sh b/helper/install.sh similarity index 100% rename from scripts/install.sh rename to helper/install.sh diff --git a/data/machine_product_links.xml b/helper/machine_product_links.xml similarity index 100% rename from data/machine_product_links.xml rename to helper/machine_product_links.xml diff --git a/scripts/update.sh b/helper/update.sh similarity index 100% rename from scripts/update.sh rename to helper/update.sh diff --git a/scripts/uninstall_vvow_einweisungen.py b/scripts/uninstall_vvow_einweisungen.py deleted file mode 100644 index 0410d0e..0000000 --- a/scripts/uninstall_vvow_einweisungen.py +++ /dev/null @@ -1,43 +0,0 @@ -# scripts/uninstall_vvow_einweisungen.py -# Auszug aus der gitea action: -''' - - name: Uninstall vvow_einweisungen - run: | - docker exec hobbyhimmel_odoo_${{ env.CONTAINER_NAME_EXTENSION }} /bin/bash -c " - cd /home/odoo/custom_addons/open_workshop/scripts && \ - /opt/odoo/odoo/odoo-bin shell -d ${{ env.DB_NAME }} < uninstall_vvow_einweisungen.py" - docker restart hobbyhimmel_odoo_${{ env.CONTAINER_NAME_EXTENSION }} - -''' - - -from odoo import api, SUPERUSER_ID -from odoo.modules.registry import Registry - -modules_to_uninstall = [ - 'vvow_einweisungen' -] - -with api.Environment.manage(): - registry = Registry("hobbyhimmel") # wird beim odoo-bin shell überschrieben - with registry.cursor() as cr: - env = api.Environment(cr, SUPERUSER_ID, {}) - - # 🛠 Versuch, FK-Constraint manuell zu entfernen (vorheriger Fehlerursache) - try: - cr.execute(""" - ALTER TABLE res_partner DROP CONSTRAINT IF EXISTS res_partner_vvow_document_id_fkey - """) - print("✅ Foreign Key 'res_partner_vvow_document_id_fkey' erfolgreich (oder schon) entfernt.") - except Exception as e: - print(f"⚠️ Konnte FK nicht entfernen: {e}") - - for module_name in modules_to_uninstall: - module = env['ir.module.module'].search([('name', '=', module_name)], limit=1) - if module and module.state == 'installed': - print(f"📦 Deinstalliere Modul: {module_name}") - module.button_immediate_uninstall() - else: - print(f"ℹ️ Modul nicht gefunden oder nicht installiert: {module_name}") - - cr.commit() diff --git a/scripts/uninstall_vvow_pos.py b/scripts/uninstall_vvow_pos.py deleted file mode 100644 index 4bfe182..0000000 --- a/scripts/uninstall_vvow_pos.py +++ /dev/null @@ -1,35 +0,0 @@ -# scripts/uninstall_old_modules.py -# odoo-bin -d deine_datenbank -i open_workshop --load-script=scripts/uninstall_old_modules.py - -''' -- name: Uninstall old modules - run: | - odoo-bin -d hobbyhimmel --load-script=scripts/uninstall_old_modules.py - -- name: Install open_workshop - run: | - odoo-bin -d hobbyhimmel -u open_workshop -''' - - -from odoo import api, SUPERUSER_ID -from odoo.modules.registry import Registry - -modules_to_uninstall = [ - 'vvow_pos' -] - -with api.Environment.manage(): - registry = Registry("hobbyhimmel") # Wird beim Shell-Aufruf überschrieben - with registry.cursor() as cr: - env = api.Environment(cr, SUPERUSER_ID, {}) - - for module_name in modules_to_uninstall: - module = env['ir.module.module'].search([('name', '=', module_name)], limit=1) - if module and module.state == 'installed': - print(f"Uninstalling module: {module_name}") - module.button_immediate_uninstall() - else: - print(f"Module not found or not installed: {module_name}") - - cr.commit() \ No newline at end of file