mirror of
https://github.com/Ladebeze66/odoo_toolkit.git
synced 2025-12-17 06:57:47 +01:00
J5-8
This commit is contained in:
parent
c0aa4cfa42
commit
eaba620782
Binary file not shown.
155
exported_tickets/ticket_10908_raw.json
Normal file
155
exported_tickets/ticket_10908_raw.json
Normal file
@ -0,0 +1,155 @@
|
|||||||
|
[
|
||||||
|
{
|
||||||
|
"id": 10908,
|
||||||
|
"active": true,
|
||||||
|
"name": "TR: MAJ BRGlab",
|
||||||
|
"description": "<p><br></p>",
|
||||||
|
"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 <Olivier.ANTONI@egis-group.com>",
|
||||||
|
"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"
|
||||||
|
}
|
||||||
|
]
|
||||||
154
exported_tickets/ticket_10972_raw.json
Normal file
154
exported_tickets/ticket_10972_raw.json
Normal file
@ -0,0 +1,154 @@
|
|||||||
|
[
|
||||||
|
{
|
||||||
|
"id": 10972,
|
||||||
|
"active": true,
|
||||||
|
"name": "problème FTP ajout de norme",
|
||||||
|
"description": "<p><br></p>",
|
||||||
|
"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 <labo@copat84.com>",
|
||||||
|
"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"
|
||||||
|
}
|
||||||
|
]
|
||||||
3
exported_tickets/ticket_T10929_raw.json
Normal file
3
exported_tickets/ticket_T10929_raw.json
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
[
|
||||||
|
10908
|
||||||
|
]
|
||||||
3
exported_tickets/ticket_T10993_raw.json
Normal file
3
exported_tickets/ticket_T10993_raw.json
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
[
|
||||||
|
10972
|
||||||
|
]
|
||||||
@ -45,10 +45,15 @@ class TicketManager:
|
|||||||
|
|
||||||
def extract_invalid_field(self, error_message):
|
def extract_invalid_field(self, error_message):
|
||||||
"""Extrait le nom du champ invalide depuis un message d'erreur RPC"""
|
"""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)
|
match = re.search(r"la colonne ([\w.]+) n'existe pas", error_message)
|
||||||
if match:
|
if match:
|
||||||
|
print(f"Champ détecté comme invalide : {match.group(1)}") #debug
|
||||||
return match.group(1) #Retourne le champ détecté
|
return match.group(1) #Retourne le champ détecté
|
||||||
|
print("Aucun champ invalide détecté") #debug
|
||||||
return None
|
return None
|
||||||
|
|
||||||
def get_model_fields(self, model_name):
|
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"""
|
"""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'])
|
fields_info = self._safe_execute(model_name, 'fields_get', [], ['name', 'type'])
|
||||||
@ -57,7 +62,7 @@ class TicketManager:
|
|||||||
return []
|
return []
|
||||||
|
|
||||||
#On filtre les champs qui ne sont pas exploitables
|
#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]
|
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
|
return valid_fields #Retourne la liste des champs exploitables
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user