parent
272a958d20
commit
e8db1b8918
|
|
@ -4,13 +4,17 @@
|
|||
<option name="autoReloadType" value="SELECTIVE" />
|
||||
</component>
|
||||
<component name="ChangeListManager">
|
||||
<list default="true" id="c6d0259a-16e1-410d-91a1-830590ee2a08" name="Changes" comment="26/04/26 - 19h">
|
||||
<list default="true" id="c6d0259a-16e1-410d-91a1-830590ee2a08" name="Changes" comment="27/04/26 - 19h">
|
||||
<change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" 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$/Session_Formation_Sequence.py" beforeDir="false" afterPath="$PROJECT_DIR$/Session_Formation_Sequence.py" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/groupe_inscrit_mgt.py" beforeDir="false" afterPath="$PROJECT_DIR$/groupe_inscrit_mgt.py" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/main.py" beforeDir="false" afterPath="$PROJECT_DIR$/main.py" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/notes_apprenant_mgt.py" beforeDir="false" afterPath="$PROJECT_DIR$/notes_apprenant_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$/partner_invoice.py" beforeDir="false" afterPath="$PROJECT_DIR$/partner_invoice.py" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/ressources_materiels.py" beforeDir="false" afterPath="$PROJECT_DIR$/ressources_materiels.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" />
|
||||
|
|
@ -454,7 +458,7 @@
|
|||
<option name="project" value="LOCAL" />
|
||||
<updated>1747251650255</updated>
|
||||
</task>
|
||||
<option name="localTasksCounter" value="568" />
|
||||
<option name="localTasksCounter" value="569" />
|
||||
<servers />
|
||||
</component>
|
||||
<component name="Vcs.Log.Tabs.Properties">
|
||||
|
|
@ -496,7 +500,6 @@
|
|||
</option>
|
||||
</component>
|
||||
<component name="VcsManagerConfiguration">
|
||||
<MESSAGE value="28/02/26 - 23h" />
|
||||
<MESSAGE value="01/03/26 - 13h30" />
|
||||
<MESSAGE value="07/03/26 - 16h" />
|
||||
<MESSAGE value="08/03/26 - 20h" />
|
||||
|
|
@ -521,6 +524,7 @@
|
|||
<MESSAGE value="21/04/2026 - 21h30" />
|
||||
<MESSAGE value="24/04/26 - 19h" />
|
||||
<MESSAGE value="26/04/26 - 19h" />
|
||||
<option name="LAST_COMMIT_MESSAGE" value="26/04/26 - 19h" />
|
||||
<MESSAGE value="27/04/26 - 19h" />
|
||||
<option name="LAST_COMMIT_MESSAGE" value="27/04/26 - 19h" />
|
||||
</component>
|
||||
</project>
|
||||
6707
Log/log_file.log
6707
Log/log_file.log
File diff suppressed because one or more lines are too long
|
|
@ -14975,6 +14975,15 @@ def Invoice_Splited_Partner_From_Session_By_Inscription_Id( diction):
|
|||
"""
|
||||
|
||||
prix_inscription_str = "0"
|
||||
print(" ## qryy = ", {'session_id': str(diction['session_id']),
|
||||
'status': '1',
|
||||
'_id': ObjectId(str(diction['inscription_id'])),
|
||||
'partner_owner_recid': str(my_partner['recid']),
|
||||
"invoice_split": {'$ne': ''},
|
||||
'invoice_split': {'$exists': True},
|
||||
"invoiced": {'$ne': '1'},})
|
||||
|
||||
|
||||
local_inscription_data = MYSY_GV.dbname['inscription'].find_one({'session_id': str(diction['session_id']),
|
||||
'status': '1',
|
||||
'_id': ObjectId(str(diction['inscription_id'])),
|
||||
|
|
@ -14985,8 +14994,8 @@ def Invoice_Splited_Partner_From_Session_By_Inscription_Id( diction):
|
|||
|
||||
})
|
||||
|
||||
if ("price" in local_inscription_data[0].keys()):
|
||||
prix_inscription_str = local_inscription_data[0]['price']
|
||||
if ("price" in local_inscription_data.keys()):
|
||||
prix_inscription_str = local_inscription_data['price']
|
||||
else:
|
||||
prix_inscription_str = str(prix_session)
|
||||
|
||||
|
|
|
|||
|
|
@ -1633,6 +1633,9 @@ def Update_Session_Sequence(diction):
|
|||
|
||||
update_data['tab_grp_apprenant_ids'] = tab_grp_apprenant_ids
|
||||
|
||||
elif( "tab_grp_apprenant_ids" in diction.keys() and diction['tab_grp_apprenant_ids'] == ""):
|
||||
update_data['tab_grp_apprenant_ids'] = []
|
||||
|
||||
if ("mode_animation" in diction.keys()):
|
||||
update_data['mode_animation'] = str(diction['mode_animation'])
|
||||
|
||||
|
|
@ -1682,7 +1685,9 @@ def Update_Session_Sequence(diction):
|
|||
str(inspect.stack()[0][3]) + " L'identifiant de la ligne de planification de unité d'enseignement est invalide ")
|
||||
return False, " L'identifiant de la ligne de planification de unité d'enseignement est invalide "
|
||||
|
||||
|
||||
if ("ue_id" in diction.keys() and diction['ue_id'] == ""):
|
||||
update_data['ue_id'] = ""
|
||||
update_data['ue_planif_line_id'] = ""
|
||||
|
||||
update_data['session_id'] = str(diction['session_id'])
|
||||
update_data['sequence_start'] = date_debut_seq
|
||||
|
|
@ -1693,10 +1698,6 @@ def Update_Session_Sequence(diction):
|
|||
update_data['update_date'] = str(datetime.now())
|
||||
update_data['update_by'] = str(my_partner['_id'])
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
update = MYSY_GV.dbname['session_formation_sequence'].update_one({'_id': ObjectId(str(diction['_id'])),
|
||||
'valide': '1', 'locked': '0',
|
||||
'partner_owner_recid': str(my_partner['recid'])},
|
||||
|
|
@ -1759,6 +1760,93 @@ def Update_Session_Sequence(diction):
|
|||
return False, " Impossible de mettre à jour la séquence "
|
||||
|
||||
|
||||
"""
|
||||
Cette fonction permet de dupliquer une sequence avec tout son contenue
|
||||
"""
|
||||
|
||||
|
||||
def Duplique_Session_Sequence(diction):
|
||||
try:
|
||||
diction = mycommon.strip_dictionary(diction)
|
||||
|
||||
"""
|
||||
Verification des input acceptés
|
||||
"""
|
||||
field_list = ['token', '_id', ]
|
||||
|
||||
incom_keys = diction.keys()
|
||||
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é")
|
||||
return False, " Les informations fournies sont incorrectes"
|
||||
|
||||
"""
|
||||
Verification des champs obligatoires
|
||||
"""
|
||||
field_list_obligatoire = ['token', '_id', ]
|
||||
|
||||
for val in field_list_obligatoire:
|
||||
if val not in diction:
|
||||
mycommon.myprint(
|
||||
str(inspect.stack()[0][
|
||||
3]) + " - La valeur '" + val + "' n'est pas presente dans la liste des arguments ")
|
||||
return False, " Les informations fournies sont incorrectes"
|
||||
|
||||
"""
|
||||
Verification de l'identité et autorisation de l'entité qui
|
||||
appelle cette API
|
||||
"""
|
||||
token = ""
|
||||
if ("token" in diction.keys()):
|
||||
if diction['token']:
|
||||
token = diction['token']
|
||||
|
||||
local_status, my_partner = mycommon.Check_Connexion_And_Return_Partner_Data(diction)
|
||||
if (local_status is not True):
|
||||
return local_status, my_partner
|
||||
|
||||
# Verification de l'existence d'une sequence à mettre à jour
|
||||
is_existe_valide_session_sequence_id = MYSY_GV.dbname["session_formation_sequence"].count_documents(
|
||||
{'_id': ObjectId(str(diction['_id'])),
|
||||
'partner_owner_recid': str(my_partner['recid']),
|
||||
'valide': '1',
|
||||
'locked': '0'})
|
||||
|
||||
if (is_existe_valide_session_sequence_id != 1):
|
||||
mycommon.myprint(
|
||||
str(inspect.stack()[0][3]) + " - L'identifiant de la séquence n'est pas valide ")
|
||||
return False, " L'identifiant de la séquence n'est pas valide "
|
||||
|
||||
sequence_data = MYSY_GV.dbname["session_formation_sequence"].find_one(
|
||||
{'_id': ObjectId(str(diction['_id'])),
|
||||
'partner_owner_recid': str(my_partner['recid']),
|
||||
'valide': '1',
|
||||
'locked': '0'})
|
||||
|
||||
|
||||
del sequence_data['_id']
|
||||
|
||||
if( "update_date" in sequence_data.keys()):
|
||||
del sequence_data['update_date']
|
||||
|
||||
if ("update_by" in sequence_data.keys()):
|
||||
del sequence_data['update_by']
|
||||
|
||||
|
||||
sequence_data['creation_date'] = str(datetime.now())
|
||||
sequence_data['creation_by'] = str(my_partner['_id'])
|
||||
|
||||
create = MYSY_GV.dbname['session_formation_sequence'].insert_one(sequence_data)
|
||||
|
||||
return True, " La séquence a été correctement dupliquée"
|
||||
|
||||
except Exception as e:
|
||||
exc_type, exc_obj, exc_tb = sys.exc_info()
|
||||
mycommon.myprint(str(inspect.stack()[0][3]) + " -" + str(e) + " - Line : " + str(exc_tb.tb_lineno))
|
||||
return False, " Impossible de dupliquer la séquence "
|
||||
|
||||
|
||||
"""
|
||||
Cette fonction permet de recuperer le nombre de sequence de formation
|
||||
d'une session
|
||||
|
|
@ -1898,6 +1986,55 @@ def Get_Session_Sequence_List(diction):
|
|||
if ("unite_enseignement_planif_id" not in user.keys()):
|
||||
user['unite_enseignement_planif_id'] = ""
|
||||
|
||||
|
||||
"""
|
||||
Recuperer les ressource associées (materiel et humaine)
|
||||
"""
|
||||
tab_ressource_humaine = []
|
||||
tab_ressource_materiel = []
|
||||
|
||||
|
||||
for local_affectation in MYSY_GV.dbname['session_formation_sequence_affectation'].find({'sequence_session_id':str(New_retVal['_id']),
|
||||
'partner_owner_recid':str(my_partner['recid'])}):
|
||||
|
||||
related_target_collection_id_nom = ""
|
||||
related_target_collection_object = ""
|
||||
|
||||
# Si l'affectation a un 'related_target_collection_id', alors cela veut dire qu'il faut aller chercheer
|
||||
# la cible de cette affection.
|
||||
if ("related_target_collection_id" in local_affectation.keys() and "related_target_collection" in local_affectation.keys()):
|
||||
if (local_affectation["related_target_collection_id"] and local_affectation["related_target_collection"]):
|
||||
|
||||
# Si l'affectation concerne une ressource_humaine
|
||||
if (local_affectation["related_target_collection"] == "ressource_humaine"):
|
||||
affectation_target_data = MYSY_GV.dbname[local_affectation["related_target_collection"]].find_one(
|
||||
{"_id": ObjectId(str(local_affectation["related_target_collection_id"])),
|
||||
'partner_recid': str(my_partner['recid']),
|
||||
'valide': '1', 'locked': "0"})
|
||||
|
||||
if (affectation_target_data is not None):
|
||||
related_target_collection_id_nom = affectation_target_data["nom"] + " " + \
|
||||
affectation_target_data["prenom"]
|
||||
related_target_collection_object = "Ressource Humaine"
|
||||
|
||||
tab_ressource_humaine.append(related_target_collection_id_nom)
|
||||
|
||||
elif (local_affectation["related_target_collection"] == "ressource_materielle"):
|
||||
# Si l'affectation concerne une ressource_materielle
|
||||
affectation_target_data = MYSY_GV.dbname[local_affectation["related_target_collection"]].find_one(
|
||||
{"_id": ObjectId(str(local_affectation["related_target_collection_id"])),
|
||||
'partner_recid': str(my_partner['recid']),
|
||||
'valide': '1'})
|
||||
|
||||
if (affectation_target_data is not None):
|
||||
related_target_collection_id_nom = affectation_target_data["nom"]
|
||||
related_target_collection_object = "Ressource Materielle"
|
||||
tab_ressource_materiel.append(related_target_collection_id_nom)
|
||||
|
||||
|
||||
user['tab_ressource_humaine'] = tab_ressource_humaine
|
||||
user['tab_ressource_materiel'] = tab_ressource_materiel
|
||||
|
||||
RetObject.append(mycommon.JSONEncoder().encode(user))
|
||||
|
||||
return True, RetObject, nb_sequence
|
||||
|
|
@ -3221,6 +3358,7 @@ def Get_List_Sequence_Ressource_Affectation(diction):
|
|||
related_target_collection_id_nom = ""
|
||||
related_target_collection_object = ""
|
||||
|
||||
|
||||
# Si l'affectation a un 'related_target_collection_id', alors cela veut dire qu'il faut aller chercheer
|
||||
# la cible de cette affection.
|
||||
if( "related_target_collection_id" in retval.keys() and "related_target_collection" in retval.keys()):
|
||||
|
|
|
|||
|
|
@ -1068,52 +1068,54 @@ def Get_Given_Groupe_Membres(diction):
|
|||
'valide':'1',
|
||||
'locked':'0',
|
||||
'partner_owner_recid':str(my_partner['recid'])}):
|
||||
user = retval
|
||||
user['id'] = str(val_tmp)
|
||||
val_tmp = val_tmp + 1
|
||||
|
||||
local_new_dict = {}
|
||||
local_new_dict['token'] = diction['token']
|
||||
local_new_dict['inscrit_id'] = retval['inscription_id']
|
||||
if( MYSY_GV.dbname['inscription'].count_documents({'_id':ObjectId(str(retval['inscription_id'])), 'partner_owner_recid':str(my_partner['recid'])}) == 1 ):
|
||||
user = retval
|
||||
user['id'] = str(val_tmp)
|
||||
val_tmp = val_tmp + 1
|
||||
|
||||
local_new_dict = {}
|
||||
local_new_dict['token'] = diction['token']
|
||||
local_new_dict['inscrit_id'] = retval['inscription_id']
|
||||
|
||||
|
||||
if( "delegue_level" not in user.keys()):
|
||||
user['delegue_level'] = ""
|
||||
if( "delegue_level" not in user.keys()):
|
||||
user['delegue_level'] = ""
|
||||
|
||||
local_inscrit_data_status, local_inscrit_data_retval = mycommon.Get_Inscrit_And_Apprenant_Data(
|
||||
local_new_dict)
|
||||
if (local_inscrit_data_status is False):
|
||||
return local_inscrit_data_status, local_inscrit_data_retval
|
||||
local_inscrit_data_status, local_inscrit_data_retval = mycommon.Get_Inscrit_And_Apprenant_Data(
|
||||
local_new_dict)
|
||||
if (local_inscrit_data_status is False):
|
||||
return local_inscrit_data_status, local_inscrit_data_retval
|
||||
|
||||
nom = ""
|
||||
prenom = ""
|
||||
email = ""
|
||||
nom = ""
|
||||
prenom = ""
|
||||
email = ""
|
||||
|
||||
|
||||
|
||||
if ("inscrit_data" in local_inscrit_data_retval.keys()):
|
||||
user['inscrit_data'] = local_inscrit_data_retval['inscrit_data']
|
||||
if ("inscrit_data" in local_inscrit_data_retval.keys()):
|
||||
user['inscrit_data'] = local_inscrit_data_retval['inscrit_data']
|
||||
|
||||
nom = local_inscrit_data_retval['inscrit_data']['nom']
|
||||
prenom = local_inscrit_data_retval['inscrit_data']['prenom']
|
||||
email = local_inscrit_data_retval['inscrit_data']['email']
|
||||
nom = local_inscrit_data_retval['inscrit_data']['nom']
|
||||
prenom = local_inscrit_data_retval['inscrit_data']['prenom']
|
||||
email = local_inscrit_data_retval['inscrit_data']['email']
|
||||
|
||||
|
||||
if ("apprenant_data" in local_inscrit_data_retval.keys()):
|
||||
user['apprenant_data'] = local_inscrit_data_retval['apprenant_data']
|
||||
if ("apprenant_data" in local_inscrit_data_retval.keys()):
|
||||
user['apprenant_data'] = local_inscrit_data_retval['apprenant_data']
|
||||
|
||||
# Si on a un dossier apprenant, alors on écrase les variables ci-dessous
|
||||
nom = local_inscrit_data_retval['apprenant_data']['nom']
|
||||
prenom = local_inscrit_data_retval['apprenant_data']['prenom']
|
||||
email = local_inscrit_data_retval['apprenant_data']['email']
|
||||
# Si on a un dossier apprenant, alors on écrase les variables ci-dessous
|
||||
nom = local_inscrit_data_retval['apprenant_data']['nom']
|
||||
prenom = local_inscrit_data_retval['apprenant_data']['prenom']
|
||||
email = local_inscrit_data_retval['apprenant_data']['email']
|
||||
|
||||
|
||||
user['nom'] = nom
|
||||
user['prenom'] = prenom
|
||||
user['email'] = email
|
||||
user['nom'] = nom
|
||||
user['prenom'] = prenom
|
||||
user['email'] = email
|
||||
|
||||
|
||||
RetObject.append(mycommon.JSONEncoder().encode(user))
|
||||
RetObject.append(mycommon.JSONEncoder().encode(user))
|
||||
|
||||
return True, RetObject
|
||||
|
||||
|
|
|
|||
15
main.py
15
main.py
|
|
@ -8298,6 +8298,21 @@ def Update_Session_Sequence():
|
|||
|
||||
|
||||
|
||||
"""
|
||||
API qui permet de dupliquer une sequence à une session de formation
|
||||
"""
|
||||
@app.route('/myclass/api/Duplique_Session_Sequence/', methods=['POST','GET'])
|
||||
@crossdomain(origin='*')
|
||||
def Duplique_Session_Sequence():
|
||||
# On recupere le corps (payload) de la requete
|
||||
payload = mycommon.strip_dictionary (request.form.to_dict())
|
||||
print(" ### Duplique_Session_Sequence payload = ",payload)
|
||||
status, retval = Session_Formation_Sequence.Duplique_Session_Sequence(payload)
|
||||
return jsonify(status=status, message=retval)
|
||||
|
||||
|
||||
|
||||
|
||||
"""
|
||||
API qui recupere la liste des séquences d'une session de formation
|
||||
"""
|
||||
|
|
|
|||
|
|
@ -50,7 +50,7 @@ def Add_Evaluation_Type(diction):
|
|||
"""
|
||||
Verification des input acceptés
|
||||
"""
|
||||
field_list = ['token', 'nom', 'description', 'base_authorized_type_evaluation_id']
|
||||
field_list = ['token', 'nom', 'description', 'base_authorized_type_evaluation_id', 'code_couleur']
|
||||
|
||||
incom_keys = diction.keys()
|
||||
for val in incom_keys:
|
||||
|
|
@ -87,11 +87,6 @@ def Add_Evaluation_Type(diction):
|
|||
Verifier la validité de base_authorized_type_evaluation_id
|
||||
"""
|
||||
|
||||
print("### ", {'_id': ObjectId(str(diction['base_authorized_type_evaluation_id'])),
|
||||
'valide': '1',
|
||||
'locked': '0',
|
||||
'partner_owner_recid': 'default'})
|
||||
|
||||
is_valide_base_authorized_type_evaluation_id = MYSY_GV.dbname[
|
||||
'base_authorized_type_evaluation'].count_documents(
|
||||
{'_id': ObjectId(str(diction['base_authorized_type_evaluation_id'])),
|
||||
|
|
@ -139,6 +134,9 @@ def Add_Evaluation_Type(diction):
|
|||
new_data['update_by'] = str(my_partner['_id'])
|
||||
new_data['partner_owner_recid'] = str(my_partner['recid'])
|
||||
|
||||
if("code_couleur" not in new_data.keys() or new_data['code_couleur'] == ""):
|
||||
new_data['code_couleur'] = "#bed3f2"
|
||||
|
||||
inserted_id = MYSY_GV.dbname['type_evaluation'].insert_one(new_data).inserted_id
|
||||
if (not inserted_id):
|
||||
mycommon.myprint(
|
||||
|
|
@ -165,7 +163,7 @@ def Update_Evaluation_Type(diction):
|
|||
"""
|
||||
Verification des input acceptés
|
||||
"""
|
||||
field_list = ['token', '_id', 'code', 'nom', 'description', 'base_authorized_type_evaluation_code']
|
||||
field_list = ['token', '_id', 'code', 'nom', 'description', 'base_authorized_type_evaluation_code', 'code_couleur']
|
||||
|
||||
incom_keys = diction.keys()
|
||||
for val in incom_keys:
|
||||
|
|
@ -247,8 +245,6 @@ def Update_Evaluation_Type(diction):
|
|||
data_cle['valide'] = "1"
|
||||
data_cle['locked'] = "0"
|
||||
|
||||
print(" ## data_cle === ", data_cle)
|
||||
print(" ## new_data === ", new_data)
|
||||
|
||||
result = MYSY_GV.dbname['type_evaluation'].find_one_and_update(
|
||||
data_cle,
|
||||
|
|
@ -418,6 +414,11 @@ def Get_List_Type_Evaluation(diction):
|
|||
base_authorized_type_evaluation_code = base_authorized_type_evaluation_data['code']
|
||||
|
||||
user['code'] = base_authorized_type_evaluation_code
|
||||
|
||||
if ("code_couleur" not in user.keys() or user['code_couleur'] == ""):
|
||||
user['code_couleur'] = "#bed3f2"
|
||||
|
||||
|
||||
user['id'] = str(val_tmp)
|
||||
val_tmp = val_tmp + 1
|
||||
|
||||
|
|
@ -490,6 +491,10 @@ def Get_Given_Type_Evaluation(diction):
|
|||
for retval in MYSY_GV.dbname['type_evaluation'].find(data_cle):
|
||||
user = retval
|
||||
user['id'] = str(val_tmp)
|
||||
|
||||
if ("code_couleur" not in user.keys() or user['code_couleur'] == ""):
|
||||
user['code_couleur'] = "#bed3f2"
|
||||
|
||||
val_tmp = val_tmp + 1
|
||||
RetObject.append(mycommon.JSONEncoder().encode(user))
|
||||
|
||||
|
|
|
|||
|
|
@ -1650,7 +1650,8 @@ def Get_Partner_List_Partner_Client_with_filter_Like(diction):
|
|||
"""
|
||||
field_list = ['token', 'raison_sociale', 'nom', 'email',
|
||||
'is_client', 'is_financeur', 'is_fournisseur',
|
||||
'archive']
|
||||
'archive', 'groupe_client', 'type_client', 'typologie',
|
||||
'categorie']
|
||||
|
||||
incom_keys = diction.keys()
|
||||
for val in incom_keys:
|
||||
|
|
@ -1720,6 +1721,30 @@ def Get_Partner_List_Partner_Client_with_filter_Like(diction):
|
|||
qry_gle = {}
|
||||
|
||||
|
||||
filt_groupe_client_id = {}
|
||||
if ("groupe_client" in diction.keys()):
|
||||
filt_groupe_client_id = {'partner_groupe_client_id': str(diction['groupe_client'])}
|
||||
|
||||
filt_type_client_id = {}
|
||||
if ("type_client" in diction.keys()):
|
||||
filt_type_client_id = {'client_type_id': str(diction['type_client'])}
|
||||
|
||||
filt_categorie = {}
|
||||
if ("categorie" in diction.keys() and diction['categorie'] in ['0', '1', '2'] ):
|
||||
filt_categorie = {'is_company': str(diction['categorie'])}
|
||||
|
||||
filt_typologie = {}
|
||||
if ("typologie" in diction.keys() and diction['typologie'] in ['financeur', 'fournisseur', 'client']):
|
||||
if (diction['typologie'] == "client"):
|
||||
filt_typologie = {'is_client': '1'}
|
||||
|
||||
if (diction['typologie'] == "financeur"):
|
||||
filt_typologie = {'is_financeur': '1'}
|
||||
|
||||
if (diction['typologie'] == "fournisseur"):
|
||||
filt_typologie = {'is_fournisseur': '1'}
|
||||
|
||||
|
||||
|
||||
filt_client_is_client = {}
|
||||
if ("is_client" in diction.keys()):
|
||||
|
|
@ -1737,7 +1762,8 @@ def Get_Partner_List_Partner_Client_with_filter_Like(diction):
|
|||
filt_class_partner_recid = {'partner_owner_recid': str(my_partner['recid'])}
|
||||
|
||||
qry = {'$and': [filt_archive, qry_gle, filt_client_is_client,
|
||||
filt_client_is_financeur,filt_client_is_fournisseur, {'partner_owner_recid': str(my_partner['recid'])}
|
||||
filt_client_is_financeur,filt_client_is_fournisseur, {'partner_owner_recid': str(my_partner['recid'])}, filt_groupe_client_id,
|
||||
filt_categorie, filt_typologie, filt_type_client_id
|
||||
]
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -3654,9 +3654,9 @@ def GerneratePDF_Partner_Invoice(diction):
|
|||
user['duration_concat'] = str(retval['myclass_collection'][0]['duration']) + " ?"
|
||||
|
||||
"""
|
||||
Il s'agit d'un formation, vu qu'on a un lien avec la collection "myclass", on force alors le 'order_line_type_article'
|
||||
a 'formation'
|
||||
"""
|
||||
Il s'agit d'un formation, vu qu'on a un lien avec la collection "myclass", on force alors le 'order_line_type_article'
|
||||
a 'formation'
|
||||
"""
|
||||
user['order_line_type_article'] = "formation"
|
||||
|
||||
"""
|
||||
|
|
|
|||
|
|
@ -8471,3 +8471,4 @@ def get_FI_base_authorized_type_evaluation(diction=None):
|
|||
print(str(inspect.stack()[0][3]) + " -" + str(e) + " - ERRORRRR AT Line : " + str(exc_tb.tb_lineno))
|
||||
return False, " Impossible de récupérer la liste des type d'évaluation autorisés"
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue