mirror of
https://github.com/Ladebeze66/projetcbaollm.git
synced 2025-12-16 14:37:49 +01:00
41 lines
1.3 KiB
Python
41 lines
1.3 KiB
Python
from menu_handlers import (
|
|
handle_search_by_code,
|
|
handle_ticket_display_field,
|
|
handle_ticket_export,
|
|
handle_field_ticket_classification,
|
|
handle_common_values_analysis,
|
|
handle_search_by_relational_fields,
|
|
handle_project_tickets_by_stage,
|
|
handle_list_models,
|
|
handle_list_model_fields,
|
|
handle_export_model_fields_to_json
|
|
)
|
|
|
|
def display_main_menu():
|
|
"""Affiche le menu principal de l'application"""
|
|
print("\n==== GESTIONNAIRE DE TICKETS ODOO ====")
|
|
print("1. Afficher la liste des modèles")
|
|
print("2. Afficher les champs d'un modèle")
|
|
print("3. Exporter les informations des champs d'un modèle en JSON")
|
|
print("4. Exporter les tickets d'un projet par étape")
|
|
print("5. Quitter")
|
|
return input("\nChoisissez une option (1-5): ")
|
|
|
|
def run_menu():
|
|
"""Exécute la boucle du menu principal"""
|
|
while True:
|
|
choice = display_main_menu()
|
|
|
|
if choice == '1':
|
|
handle_list_models()
|
|
elif choice == '2':
|
|
handle_list_model_fields()
|
|
elif choice == '3':
|
|
handle_export_model_fields_to_json()
|
|
elif choice == '4':
|
|
handle_project_tickets_by_stage()
|
|
elif choice == '5':
|
|
print("Au revoir!")
|
|
break
|
|
else:
|
|
print("Option invalide. Veuillez choisir entre 1 et 5.") |