diff --git a/__pycache__/ticket_manager.cpython-312.pyc b/__pycache__/ticket_manager.cpython-312.pyc
index cc91af0..bcaa58d 100644
Binary files a/__pycache__/ticket_manager.cpython-312.pyc and b/__pycache__/ticket_manager.cpython-312.pyc differ
diff --git a/exported_tickets/ticket_10908_raw.json b/exported_tickets/ticket_10908_raw.json
new file mode 100644
index 0000000..136f654
--- /dev/null
+++ b/exported_tickets/ticket_10908_raw.json
@@ -0,0 +1,155 @@
+[
+ {
+ "id": 10908,
+ "active": true,
+ "name": "TR: MAJ BRGlab",
+ "description": "
",
+ "sequence": 0,
+ "stage_id": [
+ 5,
+ "En attente de résolution"
+ ],
+ "kanban_state": "normal",
+ "create_date": "2025-02-20 09:37:13",
+ "write_date": "2025-03-18 08:03:21",
+ "date_start": "2025-02-20 09:37:16",
+ "date_end": false,
+ "date_assign": "2025-02-20 13:13:32",
+ "date_deadline": false,
+ "date_last_stage_update": "2025-02-21 15:17:55",
+ "project_id": [
+ 3,
+ "Demandes"
+ ],
+ "notes": false,
+ "planned_hours": 0.0,
+ "user_id": [
+ 32,
+ "Romuald GRUSON"
+ ],
+ "partner_id": [
+ 5654,
+ "EGIS SA, Olivier ANTONI"
+ ],
+ "company_id": [
+ 1,
+ "CBAO S.A.R.L."
+ ],
+ "color": 0,
+ "displayed_image_id": false,
+ "parent_id": false,
+ "child_ids": [],
+ "email_from": "ANTONI Olivier ",
+ "email_cc": "",
+ "working_hours_open": 2.379627116111111,
+ "working_hours_close": 0.0,
+ "working_days_open": 0.09915112983796297,
+ "working_days_close": 0.0,
+ "website_message_ids": [
+ 225765,
+ 225755,
+ 225633,
+ 225612
+ ],
+ "remaining_hours": 0.0,
+ "effective_hours": 0.0,
+ "total_hours_spent": 0.0,
+ "progress": 0.0,
+ "subtask_effective_hours": 0.0,
+ "timesheet_ids": [],
+ "priority": "0",
+ "code": "T10929",
+ "milestone_id": false,
+ "sale_line_id": false,
+ "sale_order_id": false,
+ "billable_type": "no",
+ "activity_ids": [],
+ "message_follower_ids": [
+ 88384,
+ 88385,
+ 88404,
+ 88405
+ ],
+ "message_ids": [
+ 227288,
+ 225765,
+ 225756,
+ 225755,
+ 225636,
+ 225635,
+ 225634,
+ 225633,
+ 225614,
+ 225613,
+ 225612,
+ 225611
+ ],
+ "message_main_attachment_id": [
+ 143360,
+ "Outlook-nppfhufh"
+ ],
+ "failed_message_ids": [],
+ "rating_ids": [],
+ "rating_last_value": 0.0,
+ "access_token": "3307e367-64be-4943-9682-db68a0a1efbd",
+ "create_uid": [
+ 1,
+ "OdooBot"
+ ],
+ "write_uid": [
+ 32,
+ "Romuald GRUSON"
+ ],
+ "x_CBAO_windows_maj_ID": false,
+ "x_CBAO_version_signalement": false,
+ "x_CBAO_version_correction": false,
+ "x_CBAO_DateCorrection": false,
+ "x_CBAO_Scoring_Facilite": 0,
+ "x_CBAO_Scoring_Importance": 0,
+ "x_CBAO_Scoring_Urgence": 0,
+ "x_CBAO_Scoring_Incidence": 0,
+ "x_CBAO_Scoring_Resultat": 0,
+ "x_CBAO_InformationsSup": false,
+ "kanban_state_label": "En cours",
+ "subtask_planned_hours": 0.0,
+ "manager_id": [
+ 22,
+ "Fabien LAFAY"
+ ],
+ "user_email": "romuald@mail.cbao.fr",
+ "attachment_ids": [],
+ "legend_blocked": "Bloquéé",
+ "legend_done": "Planifiée",
+ "legend_normal": "En cours",
+ "subtask_project_id": [
+ 3,
+ "Demandes"
+ ],
+ "subtask_count": 0,
+ "analytic_account_active": true,
+ "allow_timesheets": true,
+ "use_milestones": false,
+ "show_time_control": "start",
+ "is_project_map_empty": true,
+ "activity_state": false,
+ "activity_user_id": false,
+ "activity_type_id": false,
+ "activity_date_deadline": false,
+ "activity_summary": false,
+ "message_is_follower": false,
+ "message_unread": false,
+ "message_unread_counter": 0,
+ "message_needaction": false,
+ "message_needaction_counter": 0,
+ "message_has_error": false,
+ "message_has_error_counter": 0,
+ "message_attachment_count": 17,
+ "rating_last_feedback": false,
+ "rating_last_image": false,
+ "rating_count": 0,
+ "access_url": "/my/task/10908",
+ "access_warning": "",
+ "display_name": "[T10929] TR: MAJ BRGlab",
+ "__last_update": "2025-03-18 08:03:21"
+ }
+]
\ No newline at end of file
diff --git a/exported_tickets/ticket_10972_raw.json b/exported_tickets/ticket_10972_raw.json
new file mode 100644
index 0000000..7ad0852
--- /dev/null
+++ b/exported_tickets/ticket_10972_raw.json
@@ -0,0 +1,154 @@
+[
+ {
+ "id": 10972,
+ "active": true,
+ "name": "problème FTP ajout de norme",
+ "description": "
",
+ "sequence": 4,
+ "stage_id": [
+ 32,
+ "En attente d'infos / retours"
+ ],
+ "kanban_state": "normal",
+ "create_date": "2025-03-03 10:37:10",
+ "write_date": "2025-03-04 13:59:33",
+ "date_start": "2025-03-03 10:37:11",
+ "date_end": false,
+ "date_assign": "2025-03-03 10:43:30",
+ "date_deadline": "2025-03-19",
+ "date_last_stage_update": "2025-03-04 13:59:33",
+ "project_id": [
+ 3,
+ "Demandes"
+ ],
+ "notes": false,
+ "planned_hours": 0.0,
+ "user_id": [
+ 32,
+ "Romuald GRUSON"
+ ],
+ "partner_id": [
+ 29845,
+ "COPAT SAS, LABO"
+ ],
+ "company_id": [
+ 1,
+ "CBAO S.A.R.L."
+ ],
+ "color": 0,
+ "displayed_image_id": false,
+ "parent_id": false,
+ "child_ids": [],
+ "email_from": "LABO ",
+ "email_cc": "",
+ "working_hours_open": 0.1055228725,
+ "working_hours_close": 0.0,
+ "working_days_open": 0.004396786354166667,
+ "working_days_close": 0.0,
+ "website_message_ids": [
+ 226706,
+ 226523,
+ 226494,
+ 226481
+ ],
+ "remaining_hours": 0.0,
+ "effective_hours": 0.0,
+ "total_hours_spent": 0.0,
+ "progress": 0.0,
+ "subtask_effective_hours": 0.0,
+ "timesheet_ids": [],
+ "priority": "0",
+ "code": "T10993",
+ "milestone_id": false,
+ "sale_line_id": false,
+ "sale_order_id": false,
+ "billable_type": "no",
+ "activity_ids": [],
+ "message_follower_ids": [
+ 88919,
+ 88927,
+ 88928
+ ],
+ "message_ids": [
+ 226708,
+ 226707,
+ 226706,
+ 226527,
+ 226523,
+ 226497,
+ 226496,
+ 226495,
+ 226494,
+ 226482,
+ 226481,
+ 226480
+ ],
+ "message_main_attachment_id": [
+ 143929,
+ "image001.jpg"
+ ],
+ "failed_message_ids": [],
+ "rating_ids": [],
+ "rating_last_value": 0.0,
+ "access_token": "c60bd01e-847d-49be-820e-8a4f3898698e",
+ "create_uid": [
+ 1,
+ "OdooBot"
+ ],
+ "write_uid": [
+ 32,
+ "Romuald GRUSON"
+ ],
+ "x_CBAO_windows_maj_ID": false,
+ "x_CBAO_version_signalement": false,
+ "x_CBAO_version_correction": false,
+ "x_CBAO_DateCorrection": false,
+ "x_CBAO_Scoring_Facilite": 0,
+ "x_CBAO_Scoring_Importance": 0,
+ "x_CBAO_Scoring_Urgence": 0,
+ "x_CBAO_Scoring_Incidence": 0,
+ "x_CBAO_Scoring_Resultat": 0,
+ "x_CBAO_InformationsSup": false,
+ "kanban_state_label": "En cours",
+ "subtask_planned_hours": 0.0,
+ "manager_id": [
+ 22,
+ "Fabien LAFAY"
+ ],
+ "user_email": "romuald@mail.cbao.fr",
+ "attachment_ids": [],
+ "legend_blocked": "Bloqué",
+ "legend_done": "Prêt pour la prochaine étape",
+ "legend_normal": "En cours",
+ "subtask_project_id": [
+ 3,
+ "Demandes"
+ ],
+ "subtask_count": 0,
+ "analytic_account_active": true,
+ "allow_timesheets": true,
+ "use_milestones": false,
+ "show_time_control": "start",
+ "is_project_map_empty": true,
+ "activity_state": false,
+ "activity_user_id": false,
+ "activity_type_id": false,
+ "activity_date_deadline": false,
+ "activity_summary": false,
+ "message_is_follower": false,
+ "message_unread": false,
+ "message_unread_counter": 0,
+ "message_needaction": false,
+ "message_needaction_counter": 0,
+ "message_has_error": false,
+ "message_has_error_counter": 0,
+ "message_attachment_count": 3,
+ "rating_last_feedback": false,
+ "rating_last_image": false,
+ "rating_count": 0,
+ "access_url": "/my/task/10972",
+ "access_warning": "",
+ "display_name": "[T10993] problème FTP ajout de norme",
+ "__last_update": "2025-03-04 13:59:33"
+ }
+]
\ No newline at end of file
diff --git a/exported_tickets/ticket_T10929_raw.json b/exported_tickets/ticket_T10929_raw.json
new file mode 100644
index 0000000..1ba3ba8
--- /dev/null
+++ b/exported_tickets/ticket_T10929_raw.json
@@ -0,0 +1,3 @@
+[
+ 10908
+]
\ No newline at end of file
diff --git a/exported_tickets/ticket_T10993_raw.json b/exported_tickets/ticket_T10993_raw.json
new file mode 100644
index 0000000..5b7d8e1
--- /dev/null
+++ b/exported_tickets/ticket_T10993_raw.json
@@ -0,0 +1,3 @@
+[
+ 10972
+]
\ No newline at end of file
diff --git a/ticket_manager.py b/ticket_manager.py
index 49b30bf..f776fe7 100644
--- a/ticket_manager.py
+++ b/ticket_manager.py
@@ -45,10 +45,15 @@ class TicketManager:
def extract_invalid_field(self, error_message):
"""Extrait le nom du champ invalide depuis un message d'erreur RPC"""
+ print(f"Analyse du message d'erreur : {error_message}") #debug
+
match = re.search(r"la colonne ([\w.]+) n'existe pas", error_message)
if match:
+ print(f"Champ détecté comme invalide : {match.group(1)}") #debug
return match.group(1) #Retourne le champ détecté
+ print("Aucun champ invalide détecté") #debug
return None
+
def get_model_fields(self, model_name):
"""Récupére tous les champs disponibles pour un modèle donné, en filtrant ceux qui ne sont pas exploitables"""
fields_info = self._safe_execute(model_name, 'fields_get', [], ['name', 'type'])
@@ -57,7 +62,7 @@ class TicketManager:
return []
#On filtre les champs qui ne sont pas exploitables
- invalid_types = []
+ invalid_types = ['many2many']
valid_fields = [field for field, info in fields_info.items() if info.get("type") not in invalid_types]
return valid_fields #Retourne la liste des champs exploitables