25/03/2024 - 20h30

master
cherif 2024-03-25 21:08:43 +01:00
parent 0d35d5c6e3
commit 85f0dda394
4 changed files with 2505 additions and 22 deletions

View File

@ -1,17 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ChangeListManager">
<list default="true" id="c6d0259a-16e1-410d-91a1-830590ee2a08" name="Changes" comment="20/03/2024 - 22h30dss">
<list default="true" id="c6d0259a-16e1-410d-91a1-830590ee2a08" name="Changes" comment="25/03/2024 - 18h30">
<change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/E_Sign_Document.py" beforeDir="false" afterPath="$PROJECT_DIR$/E_Sign_Document.py" afterDir="false" />
<change beforePath="$PROJECT_DIR$/GlobalVariable.py" beforeDir="false" afterPath="$PROJECT_DIR$/GlobalVariable.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$/attached_file_mgt.py" beforeDir="false" afterPath="$PROJECT_DIR$/attached_file_mgt.py" afterDir="false" />
<change beforePath="$PROJECT_DIR$/Session_Formation.py" beforeDir="false" afterPath="$PROJECT_DIR$/Session_Formation.py" afterDir="false" />
<change beforePath="$PROJECT_DIR$/class_mgt.py" beforeDir="false" afterPath="$PROJECT_DIR$/class_mgt.py" afterDir="false" />
<change beforePath="$PROJECT_DIR$/main.py" beforeDir="false" afterPath="$PROJECT_DIR$/main.py" afterDir="false" />
<change beforePath="$PROJECT_DIR$/partner_order.py" beforeDir="false" afterPath="$PROJECT_DIR$/partner_order.py" afterDir="false" />
<change beforePath="$PROJECT_DIR$/prj_common.py" beforeDir="false" afterPath="$PROJECT_DIR$/prj_common.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" />
<option name="HIGHLIGHT_CONFLICTS" value="true" />
@ -81,13 +75,6 @@
<option name="presentableId" value="Default" />
<updated>1680804787304</updated>
</task>
<task id="LOCAL-00200" summary="22/01/2024 -22h00">
<created>1705957023841</created>
<option name="number" value="00200" />
<option name="presentableId" value="LOCAL-00200" />
<option name="project" value="LOCAL" />
<updated>1705957023842</updated>
</task>
<task id="LOCAL-00201" summary="24/01/2024 -12h00">
<created>1706182967822</created>
<option name="number" value="00201" />
@ -424,7 +411,14 @@
<option name="project" value="LOCAL" />
<updated>1711149396483</updated>
</task>
<option name="localTasksCounter" value="249" />
<task id="LOCAL-00249" summary="25/03/2024 - 18h30">
<created>1711387309255</created>
<option name="number" value="00249" />
<option name="presentableId" value="LOCAL-00249" />
<option name="project" value="LOCAL" />
<updated>1711387309256</updated>
</task>
<option name="localTasksCounter" value="250" />
<servers />
</component>
<component name="Vcs.Log.Tabs.Properties">
@ -466,7 +460,6 @@
</option>
</component>
<component name="VcsManagerConfiguration">
<MESSAGE value="dd" />
<MESSAGE value="ddr" />
<MESSAGE value="23/02/2024 - 22h30" />
<MESSAGE value="24/02/2024 - 22h30" />
@ -491,6 +484,7 @@
<MESSAGE value="20/03/2024 - 22h30" />
<MESSAGE value="20/03/2024 - 22h30d" />
<MESSAGE value="20/03/2024 - 22h30dss" />
<option name="LAST_COMMIT_MESSAGE" value="20/03/2024 - 22h30dss" />
<MESSAGE value="25/03/2024 - 18h30" />
<option name="LAST_COMMIT_MESSAGE" value="25/03/2024 - 18h30" />
</component>
</project>

File diff suppressed because one or more lines are too long

View File

@ -7286,16 +7286,21 @@ def Prepare_and_Send_Facture_From_Session_By_Email(tab_files, Folder, diction):
"""
nb_inscription_facture = MYSY_GV.dbname['inscription'].count_documents(
{'partner_owner_recid': my_partner['recid'],
'session_id': diction['session_id'],
'invoiced': '1'})
nb_inscription_non_facture = MYSY_GV.dbname['inscription'].count_documents(
{'partner_owner_recid': my_partner['recid'],
'session_id': diction['session_id'],
'invoiced': {'$ne': '1'}})
nb_inscription_valide = MYSY_GV.dbname['inscription'].count_documents(
{'partner_owner_recid': my_partner['recid'],
'session_id': diction['session_id'],
'status': '1'})
invoiced_statut = "0"
if (nb_inscription_facture == nb_inscription_valide):
# toutes les inscription valides ont été facturée

View File

@ -57,7 +57,7 @@ def add_class(diction):
'internal_url', 'zone_diffusion', 'metier', 'published', 'img_url', 'objectif',
'programme', 'prerequis', 'note', 'cpf', 'certif', 'class_inscription_url', 'pourqui',
'support', 'img_banner_detail_class', 'source', 'lms_class_code', 'formateur_id',
'class_level', 'methode_pedagogique', 'condition_handicape']
'class_level', 'methode_pedagogique', 'condition_handicape', 'suivi_eval']
incom_keys = diction.keys()
for val in incom_keys:
@ -305,6 +305,21 @@ def add_class(diction):
mydata['condition_handicape'] = condition_handicape
suivi_eval = ""
if ("suivi_eval" in diction.keys()):
if diction['suivi_eval']:
suivi_eval = diction['suivi_eval']
if (len(mycommon.cleanhtml(diction['suivi_eval'])) > MYSY_GV.CLASS_ZONE_PROGRAM_LIMIT):
mycommon.myprint(
str(inspect.stack()[0][3]) + " : le champ 'suivi et evaluation' de La formation " + str(
mydata['external_code']) + " a plus de " + str(
MYSY_GV.CLASS_ZONE_PROGRAM_LIMIT) + " caractères")
return False, " le champ 'suivi et evaluation' de La formation " + str(
mydata['external_code']) + " a plus de " + str(MYSY_GV.CLASS_ZONE_PROGRAM_LIMIT) + " caractères"
mydata['suivi_eval'] = suivi_eval
prerequis = ""
@ -644,7 +659,8 @@ def update_class(diction):
'domaine', 'internal_code', 'internal_url','zone_diffusion', 'metier',
'published', 'img_url', 'objectif', 'programme', 'prerequis', 'note',
'cpf', 'certif', 'class_inscription_url','pourqui', 'support', 'img_banner_detail_class',
'duration_unit', 'source', 'lms_class_code', 'formateur_id', 'class_level','methode_pedagogique', 'condition_handicape']
'duration_unit', 'source', 'lms_class_code', 'formateur_id', 'class_level','methode_pedagogique',
'condition_handicape', 'suivi_eval']
incom_keys = diction.keys()
for val in incom_keys:
@ -798,6 +814,18 @@ def update_class(diction):
diction['external_code']) + " a plus de " + str(MYSY_GV.CLASS_ZONE_PROGRAM_LIMIT) + " caractères"
if ("suivi_eval" in diction.keys()):
mydata['suivi_eval'] = diction['suivi_eval']
if (len(mycommon.cleanhtml(diction['suivi_eval'])) > MYSY_GV.CLASS_ZONE_PROGRAM_LIMIT):
mycommon.myprint(
str(inspect.stack()[0][3]) + " : le champ 'suivi et evaluation' de La formation " + str(
diction['external_code']) + " a plus de " + str(
MYSY_GV.CLASS_ZONE_PROGRAM_LIMIT) + " caractères")
return False, " le champ 'suivi et evaluation' de La formation " + str(
diction['external_code']) + " a plus de " + str(MYSY_GV.CLASS_ZONE_PROGRAM_LIMIT) + " caractères"
if ("cpf" in diction.keys()):
mydata['cpf'] = diction['cpf']
@ -2162,6 +2190,16 @@ def get_class(diction):
retVal['condition_handicape'] = no_html[:MYSY_GV.MAX_CARACT_DETAIL] + " ..."
if ("suivi_eval" in retVal.keys()):
tmp_str = retVal['suivi_eval']
no_html = mycommon.cleanhtml( retVal['suivi_eval'])
text_size = text_size + len(str(no_html))
nb_pave_a_afficher = nb_pave_a_afficher + 1
if (len(no_html) > MYSY_GV.MAX_CARACT_DETAIL):
retVal['suivi_eval'] = no_html[:MYSY_GV.MAX_CARACT_DETAIL] + " ..."
if ("pedagogie" in retVal.keys()):
tmp_str = retVal['pedagogie']
@ -3101,7 +3139,7 @@ def add_class_mass(file=None, Folder=None, diction=None):
'mots_cle', 'zone_diffusion', 'metier', 'publie', 'img_url',
'objectif', 'programme', 'prerequis', 'formateur', 'note', 'cpf', 'certif',
'class_inscription_url', 'pourqui', 'support', 'img_banner_detail_class', 'formateur_email',
'methode_pedagogique', 'condition_handicape']
'methode_pedagogique', 'condition_handicape', 'suivi_eval']
total_rows = len(df)
@ -3318,6 +3356,15 @@ def add_class_mass(file=None, Folder=None, diction=None):
mydata['condition_handicape'] = condition_handicape
suivi_eval = ""
if ("suivi_eval" in df.keys()):
if (str(df['suivi_eval'].values[n])):
suivi_eval = str(df['suivi_eval'].values[n]).strip()
suivi_eval = mycommon.format_MySy_Text_Tag(suivi_eval)
mydata['condition_handicape'] = suivi_eval
prerequis = ""
if ("prerequis" in df.keys()):
if (str(df['prerequis'].values[n])):
@ -3545,7 +3592,8 @@ def Controle_add_class_mass(saved_file=None, Folder=None, diction=None):
'distantiel', 'presentiel', 'prix', 'domaine', 'url', 'duree', 'duree_unite', 'plus_produit',
'mots_cle', 'zone_diffusion', 'metier', 'publie', 'img_url',
'objectif', 'programme', 'prerequis', 'formateur', 'note', 'cpf', 'certif',
'class_inscription_url', 'pourqui', 'support', 'img_banner_detail_class', 'formateur_email' ,'methode_pedagogique', 'condition_handicape']
'class_inscription_url', 'pourqui', 'support', 'img_banner_detail_class', 'formateur_email' ,'methode_pedagogique',
'condition_handicape', 'suivi_eval']
total_rows = len(df)
@ -4025,6 +4073,13 @@ def get_class_by_metier(diction):
if (len(no_html) > MYSY_GV.MAX_CARACT):
retVal['condition_handicape'] = no_html[:MYSY_GV.MAX_CARACT] + " ..."
if ("suivi_eval" in retVal.keys()):
tmp_str = retVal['suivi_eval']
no_html = mycommon.cleanhtml(retVal['suivi_eval'])
if (len(no_html) > MYSY_GV.MAX_CARACT):
retVal['suivi_eval'] = no_html[:MYSY_GV.MAX_CARACT] + " ..."
if ("pedagogie" in retVal.keys()):
tmp_str = retVal['pedagogie']