26/03/2026 - 12h

Signed-off-by: Cherif <cbalde@mysy-training.com>
master_Elyos_FI
Cherif 2026-03-26 12:25:14 +01:00
parent a144e70e43
commit fbc4b2356e
5 changed files with 1385 additions and 27 deletions

View File

@ -4,14 +4,11 @@
<option name="autoReloadType" value="SELECTIVE" />
</component>
<component name="ChangeListManager">
<list default="true" id="c6d0259a-16e1-410d-91a1-830590ee2a08" name="Changes" comment="23/03/2026 - 20h">
<list default="true" id="c6d0259a-16e1-410d-91a1-830590ee2a08" name="Changes" comment="26/03/2026 - 12h">
<change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/Dashbord_queries/session_tbd_qries.py" beforeDir="false" afterPath="$PROJECT_DIR$/Dashbord_queries/session_tbd_qries.py" afterDir="false" />
<change beforePath="$PROJECT_DIR$/Dashbord_queries/ressources_humaines_tbd_qries.py" beforeDir="false" afterPath="$PROJECT_DIR$/Dashbord_queries/ressources_humaines_tbd_qries.py" afterDir="false" />
<change beforePath="$PROJECT_DIR$/GlobalVariable.py" beforeDir="false" afterPath="$PROJECT_DIR$/GlobalVariable.py" afterDir="false" />
<change beforePath="$PROJECT_DIR$/Inscription_mgt.py" beforeDir="false" afterPath="$PROJECT_DIR$/Inscription_mgt.py" afterDir="false" />
<change beforePath="$PROJECT_DIR$/Log/log_file.log" beforeDir="false" afterPath="$PROJECT_DIR$/Log/log_file.log" afterDir="false" />
<change beforePath="$PROJECT_DIR$/base_class_calcul_note.py" beforeDir="false" afterPath="$PROJECT_DIR$/base_class_calcul_note.py" afterDir="false" />
<change beforePath="$PROJECT_DIR$/main.py" beforeDir="false" afterPath="$PROJECT_DIR$/main.py" afterDir="false" />
<change beforePath="$PROJECT_DIR$/ressources_humaines.py" beforeDir="false" afterPath="$PROJECT_DIR$/ressources_humaines.py" afterDir="false" />
</list>
<option name="SHOW_DIALOG" value="false" />
@ -456,7 +453,7 @@
<option name="project" value="LOCAL" />
<updated>1747251650255</updated>
</task>
<option name="localTasksCounter" value="554" />
<option name="localTasksCounter" value="555" />
<servers />
</component>
<component name="Vcs.Log.Tabs.Properties">
@ -498,8 +495,6 @@
</option>
</component>
<component name="VcsManagerConfiguration">
<MESSAGE value="09/02/2026" />
<MESSAGE value="10/02/26 - 20h" />
<MESSAGE value="12/02/26 - 10h" />
<MESSAGE value="12/02/26 - 10h30" />
<MESSAGE value="15/02/26 - 18h30" />
@ -523,6 +518,8 @@
<MESSAGE value="20/03/2026 - 9h" />
<MESSAGE value="20/03/2026 - 20h" />
<MESSAGE value="23/03/2026 - 20h" />
<option name="LAST_COMMIT_MESSAGE" value="23/03/2026 - 20h" />
<MESSAGE value="25/03/2026 - 20h" />
<MESSAGE value="26/03/2026 - 12h" />
<option name="LAST_COMMIT_MESSAGE" value="26/03/2026 - 12h" />
</component>
</project>

View File

@ -887,14 +887,45 @@ def Format_employee_contrat_agenda_events(tab_diction):
new_node = {}
new_node['rh_id'] = val['_id']
new_node['rh_partner_recid'] = val['partner_recid']
new_node['rh_civilite'] = val['civilite']
new_node['rh_nom'] = val['nom']
new_node['rh_prenom'] = val['prenom']
new_node['rh_email'] = val['email']
new_node['rh_telephone_mobile'] = val['telephone_mobile']
new_node['rh_ismanager'] = val['ismanager']
new_node['rh_fonction'] = val['fonction']
new_node['rh_telephone'] = val['telephone']
if( "civilite" in val.keys()):
new_node['rh_civilite'] = val['civilite']
else:
new_node['rh_civilite'] = "neutre"
if( "nom" in val.keys()):
new_node['rh_nom'] = val['nom']
else:
new_node['rh_nom'] = ""
if ("prenom" in val.keys()):
new_node['rh_prenom'] = val['prenom']
else:
new_node['rh_prenom'] = ""
if ("email" in val.keys()):
new_node['rh_email'] = val['email']
else:
new_node['rh_email'] = ""
if ("telephone_mobile" in val.keys()):
new_node['rh_telephone_mobile'] = val['telephone_mobile']
else:
new_node['rh_telephone_mobile'] = ""
if ("ismanager" in val.keys()):
new_node['rh_ismanager'] = val['ismanager']
else:
new_node['rh_ismanager'] = ""
if ("fonction" in val.keys()):
new_node['rh_fonction'] = val['fonction']
else:
new_node['rh_fonction'] = ""
if ("telephone" in val.keys()):
new_node['rh_telephone'] = val['telephone']
else:
new_node['rh_telephone'] = ""
if( "purchase_price_group_id" in val.keys() ):
new_node['rh_purchase_price_group_id'] = val['purchase_price_group_id']
@ -959,6 +990,60 @@ def Format_employee_contrat_agenda_events(tab_diction):
else:
new_node['rh_contrat_periodicite'] = ""
"""
26/03/26 : ajout des couts spécifiques (cout_animation, cout_preparation, etc)
"""
if ("cout_animation" in val['collection_ressource_humaine_contrat'].keys()):
new_node['rh_contrat_cout_animation'] = val['collection_ressource_humaine_contrat']['cout_animation']
else:
new_node['rh_contrat_cout_animation'] = ""
if ("cout_animation_periodicite" in val['collection_ressource_humaine_contrat'].keys()):
new_node['rh_contrat_cout_animation_periodicite'] = val['collection_ressource_humaine_contrat']['cout_animation_periodicite']
else:
new_node['rh_contrat_cout_animation_periodicite'] = ""
if ("cout_preparation" in val['collection_ressource_humaine_contrat'].keys()):
new_node['rh_contrat_cout_preparation'] = val['collection_ressource_humaine_contrat']['cout_preparation']
else:
new_node['rh_contrat_cout_preparation'] = ""
if ("cout_preparation_periodicite" in val['collection_ressource_humaine_contrat'].keys()):
new_node['rh_contrat_cout_preparation_periodicite'] = val['collection_ressource_humaine_contrat']['cout_preparation_periodicite']
else:
new_node['rh_contrat_cout_preparation_periodicite'] = ""
if ("cout_suivi_correction" in val['collection_ressource_humaine_contrat'].keys()):
new_node['rh_contrat_cout_suivi_correction'] = val['collection_ressource_humaine_contrat']['cout_suivi_correction']
else:
new_node['rh_contrat_cout_suivi_correction'] = ""
if ("cout_suivi_correction_periodicite" in val['collection_ressource_humaine_contrat'].keys()):
new_node['rh_contrat_cout_cout_suivi_correction_periodicite'] = val['collection_ressource_humaine_contrat']['cout_suivi_correction_periodicite']
else:
new_node['rh_contrat_cout_cout_suivi_correction_periodicite'] = ""
if ("cout_autre" in val['collection_ressource_humaine_contrat'].keys()):
new_node['rh_contrat_cout_autre'] = val['collection_ressource_humaine_contrat']['cout_autre']
else:
new_node['rh_contrat_cout_autre'] = ""
if ("cout_autre_periodicite" in val['collection_ressource_humaine_contrat'].keys()):
new_node['rh_contrat_cout_autre_periodicite'] = val['collection_ressource_humaine_contrat']['cout_autre_periodicite']
else:
new_node['rh_contrat_cout_autre_periodicite'] = ""
"""
end ajout des cout spécifiques
"""
if ("quantite" in val['collection_ressource_humaine_contrat'].keys()):
new_node['rh_contrat_quantite'] = val['collection_ressource_humaine_contrat']['quantite']
else:
@ -1041,16 +1126,91 @@ def Format_employee_contrat_agenda_events(tab_diction):
'rh_event_planning_event_duration_hour']
and "rh_contrat_cout" in new_node.keys() and new_node['rh_contrat_cout']):
if (str(new_node['rh_contrat_periodicite']) == "heure"):
"""
26/03/26 :
Pour le cout, on va aller chercher le cout correspondant au type d'event (ex : animation, préparation, etc)
"""
local_event_cost_by_type = "0"
local_event_periodicite_by_type = ""
if( "event_type" in event_data.keys() and event_data['event_type'] == "preparation"
and "cout_animation" in val['collection_ressource_humaine_contrat'].keys()
and "cout_animation_periodicite" in val['collection_ressource_humaine_contrat'].keys()):
local_event_cost_by_type = str(val['collection_ressource_humaine_contrat']['cout_animation'])
local_event_periodicite_by_type = str(val['collection_ressource_humaine_contrat']['cout_animation_periodicite'])
elif ("event_type" in event_data.keys() and event_data['event_type'] == "suivi"
and "cout_suivi_correction" in val['collection_ressource_humaine_contrat'].keys()
and "cout_suivi_correction_periodicite" in val['collection_ressource_humaine_contrat'].keys()):
local_event_cost_by_type = str(val['collection_ressource_humaine_contrat']['cout_suivi_correction'])
local_event_periodicite_by_type = str(
val['collection_ressource_humaine_contrat']['cout_suivi_correction_periodicite'])
elif ("event_type" in event_data.keys() and event_data['event_type'] == "eval"
and "cout_suivi_correction" in val['collection_ressource_humaine_contrat'].keys()
and "cout_suivi_correction_periodicite" in val['collection_ressource_humaine_contrat'].keys()):
local_event_cost_by_type = str(val['collection_ressource_humaine_contrat']['cout_suivi_correction'])
local_event_periodicite_by_type = str(
val['collection_ressource_humaine_contrat']['cout_suivi_correction_periodicite'])
elif ("event_type" in event_data.keys() and event_data['event_type'] == "planning"
and "cout_animation" in val['collection_ressource_humaine_contrat'].keys()
and "cout_animation_periodicite" in val[
'collection_ressource_humaine_contrat'].keys()):
local_event_cost_by_type = str(
val['collection_ressource_humaine_contrat']['cout_animation'])
local_event_periodicite_by_type = str(
val['collection_ressource_humaine_contrat']['cout_animation_periodicite'])
elif ("event_type" in event_data.keys() and event_data['event_type'] == "autre"
and "cout_autre" in val['collection_ressource_humaine_contrat'].keys()
and "cout_autre_periodicite" in val[
'collection_ressource_humaine_contrat'].keys()):
local_event_cost_by_type = str(
val['collection_ressource_humaine_contrat']['cout_autre'])
local_event_periodicite_by_type = str(
val['collection_ressource_humaine_contrat']['cout_autre_periodicite'])
elif ( "cout" in val['collection_ressource_humaine_contrat'].keys()
and "periodicite" in val['collection_ressource_humaine_contrat'].keys() ):
"""
Si on a pas de cout spécifique alors on va chercher le cout de base (cout & periodicite)
"""
local_event_cost_by_type = str(val['collection_ressource_humaine_contrat']['cout'])
local_event_periodicite_by_type = str(val['collection_ressource_humaine_contrat']['periodicite'])
new_node['rh_event_planning_event_unit_cost'] = str(local_event_cost_by_type)
new_node['rh_event_planning_event_unit_cost_periodicite'] = str(local_event_periodicite_by_type)
if (str(local_event_periodicite_by_type) == "heure"):
new_node['rh_event_planning_event_cost'] = str(
mycommon.tryFloat(new_node['rh_contrat_cout']) * mycommon.tryFloat(
mycommon.tryFloat(local_event_cost_by_type) * mycommon.tryFloat(
new_node['rh_event_planning_event_duration_hour']))
total_cost = total_cost + mycommon.tryFloat((str(new_node['rh_event_planning_event_cost'])))
elif (str(new_node['rh_contrat_periodicite']) == "fixe"):
new_node['rh_event_planning_event_cost'] = str((new_node['rh_contrat_cout']))
elif (str(local_event_periodicite_by_type) == "fixe"):
new_node['rh_event_planning_event_cost'] = str(local_event_cost_by_type)
total_cost = total_cost + mycommon.tryFloat((str(new_node['rh_event_planning_event_cost'])))
"""
print(" ============== ")
print(" ### event_data['event_type'] = ", str(event_data['event_type']))
print(" ### local_event_cost_by_type = ", local_event_cost_by_type)
print(" ### local_event_periodicite_by_type = ", local_event_periodicite_by_type)
print(" ### total_cost = ", total_cost)
"""
else:
new_node['rh_event_planning_event_cost'] = "Impossible a calculer"

View File

@ -820,6 +820,7 @@ Gestion des type d'evenement accepté dans un egend
- planning
- preparation,
- Suivi/Correction
- Evaluation (pour un début, on va mettre suivi, correction et evaluation dans le meme lot)
- etc
"""
AGENDA_EVENT_TYPE = ['absence', 'planning', 'autre', '', 'preparation', 'suivi', 'eval']

File diff suppressed because it is too large Load Diff

View File

@ -4263,7 +4263,7 @@ def Add_Employee_Contrat(diction):
field_list = ['token', 'rh_id', 'date_debut', 'date_fin', 'type_contrat',
'type_employe', 'cout', 'groupe_prix_achat_id', 'quantite', 'comment',
'periodicite', 'class_id', 'session_id', 'cout_animation', 'cout_animation_periodicite',
'cout_preparation', 'cout_preparation_periodicite', 'cout_suivi_correction', 'suivi_correction_periodicite',
'cout_preparation', 'cout_preparation_periodicite', 'cout_suivi_correction', 'cout_suivi_correction_periodicite',
'cout_autre', 'cout_autre_periodicite']
incom_keys = diction.keys()
@ -4510,7 +4510,7 @@ def Add_Employee_Contrat(diction):
inspect.stack()[0][3]) + " La périodicité du coût de préparation doit être : « », « fixe » ou « heure ». ")
return False, " La périodicité du coût de préparation doit être : « », « fixe » ou « heure ». "
if ("suivi_correction_periodicite" in diction.keys() and diction['suivi_correction_periodicite'] not in ['',
if ("cout_suivi_correction_periodicite" in diction.keys() and diction['cout_suivi_correction_periodicite'] not in ['',
'heure',
'fixe']):
mycommon.myprint(str(
@ -4587,7 +4587,7 @@ def Update_Employee_Contrat(diction):
field_list = ['token', '_id', 'rh_id', 'date_debut', 'date_fin', 'type_contrat',
'type_employe', 'cout', 'groupe_prix_achat_id', 'quantite', 'comment', 'periodicite',
'class_id', 'session_id', 'cout_animation', 'cout_animation_periodicite',
'cout_preparation', 'cout_preparation_periodicite', 'cout_suivi_correction', 'suivi_correction_periodicite',
'cout_preparation', 'cout_preparation_periodicite', 'cout_suivi_correction', 'cout_suivi_correction_periodicite',
'cout_autre', 'cout_autre_periodicite']
incom_keys = diction.keys()
@ -4713,7 +4713,7 @@ def Update_Employee_Contrat(diction):
3]) + " La périodicité du coût de préparation doit être : « », « fixe » ou « heure ». ")
return False, " La périodicité du coût de préparation doit être : « », « fixe » ou « heure ». "
if ("suivi_correction_periodicite" in diction.keys() and diction['suivi_correction_periodicite'] not in ['',
if ("cout_suivi_correction_periodicite" in diction.keys() and diction['cout_suivi_correction_periodicite'] not in ['',
'heure',
'fixe']):
mycommon.myprint(str(
@ -5191,8 +5191,8 @@ def Get_List_Employee_Contrat(diction):
if ("cout_preparation_periodicite" not in user.keys() ):
user['cout_preparation_periodicite'] = "heure"
if ("suivi_correction_periodicite" not in user.keys() ):
user['suivi_correction_periodicite'] = "heure"
if ("cout_suivi_correction_periodicite" not in user.keys() ):
user['cout_suivi_correction_periodicite'] = "heure"
if ("cout_autre_periodicite" not in user.keys() ):
user['cout_autre_periodicite'] = "heure"