28/10/2023 - 16h
parent
dc22633d75
commit
e527e2df5d
|
@ -1,10 +1,15 @@
|
|||
<?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="23/10/2023 - 13h">
|
||||
<list default="true" id="c6d0259a-16e1-410d-91a1-830590ee2a08" name="Changes" comment="23/10/2023 - 16h">
|
||||
<change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" 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$/Session_Formation.py" beforeDir="false" afterPath="$PROJECT_DIR$/Session_Formation.py" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/base_specific_fields.py" beforeDir="false" afterPath="$PROJECT_DIR$/base_specific_fields.py" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/class_mgt.py" beforeDir="false" afterPath="$PROJECT_DIR$/class_mgt.py" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/partner_client.py" beforeDir="false" afterPath="$PROJECT_DIR$/partner_client.py" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/prj_common.py" beforeDir="false" afterPath="$PROJECT_DIR$/prj_common.py" afterDir="false" />
|
||||
</list>
|
||||
<option name="SHOW_DIALOG" value="false" />
|
||||
<option name="HIGHLIGHT_CONFLICTS" value="true" />
|
||||
|
@ -74,13 +79,6 @@
|
|||
<option name="presentableId" value="Default" />
|
||||
<updated>1680804787304</updated>
|
||||
</task>
|
||||
<task id="LOCAL-00088" summary="28/08/23 - 20h30">
|
||||
<created>1693250192837</created>
|
||||
<option name="number" value="00088" />
|
||||
<option name="presentableId" value="LOCAL-00088" />
|
||||
<option name="project" value="LOCAL" />
|
||||
<updated>1693250192838</updated>
|
||||
</task>
|
||||
<task id="LOCAL-00089" summary="28/08/23 - 19h30">
|
||||
<created>1693331416912</created>
|
||||
<option name="number" value="00089" />
|
||||
|
@ -417,7 +415,14 @@
|
|||
<option name="project" value="LOCAL" />
|
||||
<updated>1698059598790</updated>
|
||||
</task>
|
||||
<option name="localTasksCounter" value="137" />
|
||||
<task id="LOCAL-00137" summary="23/10/2023 - 16h">
|
||||
<created>1698067991140</created>
|
||||
<option name="number" value="00137" />
|
||||
<option name="presentableId" value="LOCAL-00137" />
|
||||
<option name="project" value="LOCAL" />
|
||||
<updated>1698067991141</updated>
|
||||
</task>
|
||||
<option name="localTasksCounter" value="138" />
|
||||
<servers />
|
||||
</component>
|
||||
<component name="Vcs.Log.Tabs.Properties">
|
||||
|
@ -432,7 +437,6 @@
|
|||
</option>
|
||||
</component>
|
||||
<component name="VcsManagerConfiguration">
|
||||
<MESSAGE value="25/09/2023 - 12h40" />
|
||||
<MESSAGE value="25/09/2023 - 16h40" />
|
||||
<MESSAGE value="26/09/23 - 19h" />
|
||||
<MESSAGE value="26/09/23 - 23h" />
|
||||
|
@ -457,6 +461,7 @@
|
|||
<MESSAGE value="22/10/2023 - 18h00" />
|
||||
<MESSAGE value="22/10/2023 - 22h" />
|
||||
<MESSAGE value="23/10/2023 - 13h" />
|
||||
<option name="LAST_COMMIT_MESSAGE" value="23/10/2023 - 13h" />
|
||||
<MESSAGE value="23/10/2023 - 16h" />
|
||||
<option name="LAST_COMMIT_MESSAGE" value="23/10/2023 - 16h" />
|
||||
</component>
|
||||
</project>
|
|
@ -116,6 +116,7 @@ def AddStagiairetoClass(diction):
|
|||
|
||||
"""
|
||||
new_price = "-1" # 0 ==> par defaut
|
||||
session_partner_owner_recid = ""
|
||||
for tmp_val in MYSY_GV.dbname['session_formation'].find({"_id":ObjectId(str(session_id)), 'valide':'1' }):
|
||||
mydata['date_du'] = tmp_val['date_debut']
|
||||
mydata['date_au'] = tmp_val['date_fin']
|
||||
|
@ -126,6 +127,9 @@ def AddStagiairetoClass(diction):
|
|||
new_price = tmp_val['prix_session']
|
||||
mydata['price'] = tmp_val['prix_session']
|
||||
|
||||
if( "partner_owner_recid" in tmp_val.keys() ):
|
||||
session_partner_owner_recid = tmp_val['partner_owner_recid']
|
||||
|
||||
|
||||
|
||||
if ("nom" in diction.keys()):
|
||||
|
@ -237,6 +241,26 @@ def AddStagiairetoClass(diction):
|
|||
mydata['price'] = '0'
|
||||
|
||||
|
||||
"""
|
||||
Update du 22/10/2023 - Gestion des champs spécifiques ajoutés par le partenaire
|
||||
"""
|
||||
|
||||
# Recuperation des champs spécifiques se trouvant dans le dictionnaire. ils commencent tous par 'my_'
|
||||
for val in diction.keys():
|
||||
if (val.startswith('my_')):
|
||||
if (MYSY_GV.dbname['base_specific_fields'].count_documents(
|
||||
{'partner_owner_recid': str(session_partner_owner_recid),
|
||||
'related_collection': 'inscription',
|
||||
'field_name': str(val),
|
||||
'valide': '1',
|
||||
'locked': '0'}) != 1):
|
||||
mycommon.myprint(str(
|
||||
inspect.stack()[0][3]) + " Le champ '" + val + "' n'est pas autorisé ")
|
||||
return False, " Les informations fournies sont incorrectes"
|
||||
|
||||
mydata[str(val)] = diction[str(val)]
|
||||
|
||||
|
||||
#print(" #### mydata = " + str(mydata))
|
||||
|
||||
coll_inscription = MYSY_GV.dbname['inscription']
|
||||
|
@ -537,6 +561,21 @@ def UpdateStagiairetoClass(diction):
|
|||
"""
|
||||
mydata['class_internal_url'] = str(local_tmp_session_data['class_internal_url']).strip()
|
||||
|
||||
# Recuperation des champs spécifiques se trouvant dans le dictionnaire. ils commencent tous par 'my_'
|
||||
for val in diction.keys():
|
||||
if (val.startswith('my_')):
|
||||
if (MYSY_GV.dbname['base_specific_fields'].count_documents(
|
||||
{'partner_owner_recid': str(partner_recid),
|
||||
'related_collection': 'inscription',
|
||||
'field_name': str(val),
|
||||
'valide': '1',
|
||||
'locked': '0'}) != 1):
|
||||
mycommon.myprint(str(
|
||||
inspect.stack()[0][3]) + " Le champ '" + val + "' n'est pas autorisé ")
|
||||
return False, " Les informations fournies sont incorrectes"
|
||||
|
||||
mydata[str(val)] = diction[str(val)]
|
||||
|
||||
"""
|
||||
Pour gerer la date de validation, differemment d'une simple mise à jour,
|
||||
on récupérer le status actuellement en base, on verifie si le nouveau status != de status en base.
|
||||
|
@ -545,7 +584,7 @@ def UpdateStagiairetoClass(diction):
|
|||
"""
|
||||
coll_inscription = MYSY_GV.dbname['inscription']
|
||||
|
||||
print(" #### query_key = ", query_key)
|
||||
#print(" #### query_key = ", query_key)
|
||||
local_retval = coll_inscription.find_one(query_key)
|
||||
|
||||
|
||||
|
|
1647
Log/log_file.log
1647
Log/log_file.log
File diff suppressed because it is too large
Load Diff
|
@ -49,7 +49,7 @@ def Add_Update_SessionFormation(diction):
|
|||
for val in incom_keys:
|
||||
if val not in field_list and val.startswith('my_') is False:
|
||||
mycommon.myprint(str(inspect.stack()[0][
|
||||
3]) + " - Le champ '" + val + "' n'est pas autorisé, Creation partenaire annulée")
|
||||
3]) + " - Le champ '" + val + "' n'est pas autorisé.")
|
||||
return False, " Toutes les informations fournies ne sont pas valables"
|
||||
|
||||
"""
|
||||
|
@ -205,6 +205,25 @@ def Add_Update_SessionFormation(diction):
|
|||
if ("contenu_ftion" in diction.keys()):
|
||||
mydata['contenu_ftion'] = diction['contenu_ftion']
|
||||
|
||||
"""
|
||||
Update du 22/10/2023 - Gestion des champs spécifiques ajoutés par le partenaire
|
||||
"""
|
||||
|
||||
# Recuperation des champs spécifiques se trouvant dans le dictionnaire. ils commencent tous par 'my_'
|
||||
for val in diction.keys():
|
||||
if (val.startswith('my_')):
|
||||
if (MYSY_GV.dbname['base_specific_fields'].count_documents(
|
||||
{'partner_owner_recid': str(partner_recid),
|
||||
'related_collection': 'session_formation',
|
||||
'field_name': str(val),
|
||||
'valide': '1',
|
||||
'locked': '0'}) != 1):
|
||||
mycommon.myprint(str(
|
||||
inspect.stack()[0][3]) + " Le champ '" + val + "' n'est pas autorisé ")
|
||||
return False, " Les informations fournies sont incorrectes"
|
||||
|
||||
mydata[str(val)] = diction[str(val)]
|
||||
|
||||
|
||||
mydata['date_update'] = str(datetime.now())
|
||||
mydata['valide'] = "1"
|
||||
|
|
|
@ -160,8 +160,8 @@ def Add_specific_field(diction):
|
|||
if(str(field_name_val_saisie).isalnum() is False ):
|
||||
mycommon.myprint(
|
||||
str(inspect.stack()[0][3]) + " - La valeur '" + str(
|
||||
field_name) + "' n'est pas alphanumérique ")
|
||||
return False, " La valeur '" + str(field_name) + "' n'est pas alphanumérique ",
|
||||
field_name_val_saisie) + "' n'est pas alphanumérique ")
|
||||
return False, " La valeur '" + str(field_name_val_saisie) + "' n'est pas alphanumérique ",
|
||||
|
||||
|
||||
data['field_name'] = field_name
|
||||
|
@ -609,7 +609,7 @@ def Get_Partner_Object_Specific_Valide_Displayed_Fields(diction):
|
|||
"""
|
||||
Verification des champs obligatoires
|
||||
"""
|
||||
field_list_obligatoire = ['token', ]
|
||||
field_list_obligatoire = ['token', 'object_name']
|
||||
for val in field_list_obligatoire:
|
||||
if val not in diction:
|
||||
mycommon.myprint(
|
||||
|
@ -631,6 +631,7 @@ def Get_Partner_Object_Specific_Valide_Displayed_Fields(diction):
|
|||
|
||||
data_cle = {}
|
||||
data_cle['partner_owner_recid'] = str(my_partner['recid'])
|
||||
data_cle['related_collection'] = str(diction['object_name'])
|
||||
data_cle['valide'] = "1"
|
||||
data_cle['locked'] = "0"
|
||||
|
||||
|
@ -751,7 +752,7 @@ def get_list_specific_field_partner_with_filter(diction):
|
|||
"""
|
||||
Verification des champs obligatoires
|
||||
"""
|
||||
field_list_obligatoire = ['token',]
|
||||
field_list_obligatoire = ['token']
|
||||
for val in field_list_obligatoire:
|
||||
if val not in diction:
|
||||
mycommon.myprint(
|
||||
|
|
39
class_mgt.py
39
class_mgt.py
|
@ -431,6 +431,25 @@ def add_class(diction):
|
|||
|
||||
mydata['zone_diffusion'] = {'country':tab_country, 'city':tab_city}
|
||||
|
||||
"""
|
||||
Update du 22/10/2023 - Gestion des champs spécifiques ajoutés par le partenaire
|
||||
"""
|
||||
|
||||
# Recuperation des champs spécifiques se trouvant dans le dictionnaire. ils commencent tous par 'my_'
|
||||
for val in diction.keys():
|
||||
if (val.startswith('my_')):
|
||||
if (MYSY_GV.dbname['base_specific_fields'].count_documents(
|
||||
{'partner_owner_recid': str(user_recid),
|
||||
'related_collection': 'myclass',
|
||||
'field_name': str(val),
|
||||
'valide': '1',
|
||||
'locked': '0'}) != 1):
|
||||
mycommon.myprint(str(
|
||||
inspect.stack()[0][3]) + " Le champ '" + val + "' n'est pas autorisé ")
|
||||
return False, " Les informations fournies sont incorrectes"
|
||||
|
||||
mydata[str(val)] = diction[str(val)]
|
||||
|
||||
|
||||
mydata['valide'] = '1'
|
||||
mydata['locked'] = '0'
|
||||
|
@ -682,8 +701,8 @@ def update_class(diction):
|
|||
|
||||
if ("description" in diction.keys()):
|
||||
mydata['description'] = diction['description']
|
||||
print(" #### ",mycommon.cleanhtml(diction['description']))
|
||||
print(" ### len =", len(mycommon.cleanhtml(diction['description'])))
|
||||
#print(" #### ",mycommon.cleanhtml(diction['description']))
|
||||
#print(" ### len =", len(mycommon.cleanhtml(diction['description'])))
|
||||
|
||||
if (len(mycommon.cleanhtml(diction['description'])) > MYSY_GV.CLASS_ZONE_DESCRIP_LIMIT):
|
||||
mycommon.myprint(
|
||||
|
@ -948,6 +967,22 @@ def update_class(diction):
|
|||
'''
|
||||
mydata['date_update'] = str(datetime.now())
|
||||
|
||||
# Recuperation des champs spécifiques se trouvant dans le dictionnaire. ils commencent tous par 'my_'
|
||||
for val in diction.keys():
|
||||
if (val.startswith('my_')):
|
||||
if (MYSY_GV.dbname['base_specific_fields'].count_documents(
|
||||
{'partner_owner_recid': str(partner_recid),
|
||||
'related_collection': 'myclass',
|
||||
'field_name': str(val),
|
||||
'valide': '1',
|
||||
'locked': '0'}) != 1):
|
||||
mycommon.myprint(str(
|
||||
inspect.stack()[0][3]) + " Le champ '" + val + "' n'est pas autorisé ")
|
||||
return False, " Les informations fournies sont incorrectes"
|
||||
|
||||
mydata[str(val)] = diction[str(val)]
|
||||
|
||||
|
||||
# A supprimer apres (a reflechir .... me tate)
|
||||
mydata['freeacces'] = '1'
|
||||
mydata['isalaune'] = '1'
|
||||
|
|
|
@ -776,7 +776,7 @@ def Get_Partner_List_Partner_Client(diction):
|
|||
data_cle['valide'] = "1"
|
||||
data_cle['locked'] = "0"
|
||||
|
||||
print(" ### Get_Partner_List_Partner_Client data_cle = ", data_cle)
|
||||
#print(" ### Get_Partner_List_Partner_Client data_cle = ", data_cle)
|
||||
RetObject = []
|
||||
val_tmp = 1
|
||||
|
||||
|
|
|
@ -3013,6 +3013,11 @@ def GetAttendeeDetail_perSession(diction):
|
|||
local_opco = local_Insc_retval['opco']
|
||||
my_retrun_dict['opco'] = local_opco
|
||||
|
||||
# Recuperation des champs spécifiques se trouvant dans le dictionnaire. ils commencent tous par 'my_'
|
||||
for val in local_Insc_retval.keys():
|
||||
if (val.startswith('my_')):
|
||||
my_retrun_dict[str(val)] = local_Insc_retval[str(val)]
|
||||
|
||||
local_class_internal_url = ""
|
||||
if ("class_internal_url" in local_Insc_retval.keys()):
|
||||
local_class_internal_url = local_Insc_retval['class_internal_url']
|
||||
|
|
Loading…
Reference in New Issue