08/09/2024 - 21terth

master
cherif 2024-09-09 19:17:34 +02:00
parent 0867158063
commit 761a953476
3 changed files with 2991 additions and 32 deletions

View File

@ -1,18 +1,10 @@
<?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="06/09/2024 - 22h">
<list default="true" id="c6d0259a-16e1-410d-91a1-830590ee2a08" name="Changes" comment="08/09/2024 - 21h">
<change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/Activite.py" beforeDir="false" afterPath="$PROJECT_DIR$/Activite.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$/crm_opportunite.py" beforeDir="false" afterPath="$PROJECT_DIR$/crm_opportunite.py" afterDir="false" />
<change beforePath="$PROJECT_DIR$/main.py" beforeDir="false" afterPath="$PROJECT_DIR$/main.py" afterDir="false" />
<change beforePath="$PROJECT_DIR$/note_evaluation_mgt.py" beforeDir="false" afterPath="$PROJECT_DIR$/note_evaluation_mgt.py" afterDir="false" />
<change beforePath="$PROJECT_DIR$/partner_order.py" beforeDir="false" afterPath="$PROJECT_DIR$/partner_order.py" afterDir="false" />
<change beforePath="$PROJECT_DIR$/partners.py" beforeDir="false" afterPath="$PROJECT_DIR$/partners.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" />
<change beforePath="$PROJECT_DIR$/class_mgt.py" beforeDir="false" afterPath="$PROJECT_DIR$/class_mgt.py" afterDir="false" />
</list>
<option name="SHOW_DIALOG" value="false" />
<option name="HIGHLIGHT_CONFLICTS" value="true" />
@ -82,13 +74,6 @@
<option name="presentableId" value="Default" />
<updated>1680804787304</updated>
</task>
<task id="LOCAL-00344" summary="wwssd">
<created>1720184777416</created>
<option name="number" value="00344" />
<option name="presentableId" value="LOCAL-00344" />
<option name="project" value="LOCAL" />
<updated>1720184777417</updated>
</task>
<task id="LOCAL-00345" summary="wwssdss">
<created>1720531095887</created>
<option name="number" value="00345" />
@ -425,7 +410,14 @@
<option name="project" value="LOCAL" />
<updated>1725652418354</updated>
</task>
<option name="localTasksCounter" value="393" />
<task id="LOCAL-00393" summary="08/09/2024 - 21h">
<created>1725823501100</created>
<option name="number" value="00393" />
<option name="presentableId" value="LOCAL-00393" />
<option name="project" value="LOCAL" />
<updated>1725823501100</updated>
</task>
<option name="localTasksCounter" value="394" />
<servers />
</component>
<component name="Vcs.Log.Tabs.Properties">
@ -467,7 +459,6 @@
</option>
</component>
<component name="VcsManagerConfiguration">
<MESSAGE value="10/08/2024 - 20h32s" />
<MESSAGE value="11/08/2024 - 12h32s" />
<MESSAGE value="11/08/2024 - 18h32s" />
<MESSAGE value="dd" />
@ -492,6 +483,7 @@
<MESSAGE value="04/09/2024 - 23h" />
<MESSAGE value="qsh" />
<MESSAGE value="06/09/2024 - 22h" />
<option name="LAST_COMMIT_MESSAGE" value="06/09/2024 - 22h" />
<MESSAGE value="08/09/2024 - 21h" />
<option name="LAST_COMMIT_MESSAGE" value="08/09/2024 - 21h" />
</component>
</project>

File diff suppressed because it is too large Load Diff

View File

@ -396,7 +396,7 @@ def add_class(diction):
is_valide_metier = MYSY_GV.dbname['class_metier'].count_documents(
{'_id': ObjectId(str(diction['metier'])),
'valide': '1',
'locked': '0'})
'locked': '0', 'partner_owner_recid':str(my_partner['recid'])})
if (is_valide_metier <= 0):
mycommon.myprint(
@ -505,7 +505,10 @@ def add_class(diction):
"""
is_valide_domaine = MYSY_GV.dbname['class_domaine'].count_documents({'_id':ObjectId(str(diction['domaine'])),
'valide':'1',
'locked':'0'})
'locked':'0',
'partner_owner_recid': str(
my_partner['recid'])
})
if( is_valide_domaine <= 0 ):
mycommon.myprint(
@ -531,7 +534,7 @@ def add_class(diction):
is_valide_categorie = MYSY_GV.dbname['class_categorie'].count_documents(
{'_id': ObjectId(str(diction['categorie'])),
'valide': '1',
'locked': '0'})
'locked': '0', 'partner_owner_recid':str(my_partner['recid'])})
if (is_valide_categorie <= 0):
mycommon.myprint(
@ -1024,7 +1027,7 @@ def update_class(diction):
is_valide_metier = MYSY_GV.dbname['class_metier'].count_documents(
{'_id': ObjectId(str(diction['metier'])),
'valide': '1',
'locked': '0'})
'locked': '0', 'partner_owner_recid':str(my_partner['recid'])})
if (is_valide_metier <= 0):
mycommon.myprint(
@ -1114,7 +1117,7 @@ def update_class(diction):
is_valide_domaine = MYSY_GV.dbname['class_domaine'].count_documents(
{'_id': ObjectId(str(diction['domaine'])),
'valide': '1',
'locked': '0'})
'locked': '0', 'partner_owner_recid':str(my_partner['recid'])})
if (is_valide_domaine <= 0):
mycommon.myprint(
@ -1134,7 +1137,7 @@ def update_class(diction):
is_valide_categorie = MYSY_GV.dbname['class_categorie'].count_documents(
{'_id': ObjectId(str(diction['categorie'])),
'valide': '1',
'locked': '0'})
'locked': '0', 'partner_owner_recid':str(my_partner['recid'])})
if (is_valide_categorie <= 0):
mycommon.myprint(
@ -3723,6 +3726,10 @@ def add_class_mass(file=None, Folder=None, diction=None):
if retval is False:
return "Err_Connexion", " La session de connexion n'est pas valide"
local_status, my_partner = mycommon.Check_Connexion_And_Return_Partner_Data({'token':str(my_token)})
if (local_status is not True):
return local_status, my_partner
status, saved_file = mycommon.Upload_Save_CSV_File(file, Folder)
if (status == False):
@ -3833,7 +3840,9 @@ def add_class_mass(file=None, Folder=None, diction=None):
domaine_data = MYSY_GV.dbname['class_domaine'].find_one(
{'code': str(df['domaine'].values[n]).strip(),
'valide': '1',
'locked': '0'})
'locked': '0',
'partner_owner_recid': str(my_partner['recid'])
})
if (domaine_data is None):
mycommon.myprint(
@ -3867,7 +3876,9 @@ def add_class_mass(file=None, Folder=None, diction=None):
categorie_data = MYSY_GV.dbname['class_categorie'].find_one(
{'code': str(df['domaine'].values[n]).strip(),
'valide': '1',
'locked': '0'})
'locked': '0',
'partner_owner_recid': str(my_partner['recid'])
})
if (categorie_data is None):
mycommon.myprint(
@ -3977,7 +3988,9 @@ def add_class_mass(file=None, Folder=None, diction=None):
metier_data = MYSY_GV.dbname['class_metier'].find_one(
{'code': str(df['metier'].values[n]).strip(),
'valide': '1',
'locked': '0'})
'locked': '0',
'partner_owner_recid': str(user_recid)
})
if (metier_data is None):
mycommon.myprint(
@ -4397,7 +4410,7 @@ def Controle_add_class_mass(saved_file=None, Folder=None, diction=None):
"""
#print(" domaine a tester = ", str(mydata['domaine']).strip())
count_domaine = MYSY_GV.dbname['class_domaine'].count_documents(
{'code': str(mydata['domaine']).strip(), 'valide': '1', 'locked': '0',
{'code': str(mydata['domaine']).strip(), 'valide': '1', 'locked': '0', 'partner_owner_recid':str(user_recid)
})
if (count_domaine <= 0):
mycommon.myprint(str(
@ -4428,7 +4441,7 @@ def Controle_add_class_mass(saved_file=None, Folder=None, diction=None):
if (str(df['categorie'].values[n])):
categorie = str(df['categorie'].values[n]).strip()
count_categorie = MYSY_GV.dbname['class_categorie'].count_documents(
{'code': str(mydata['categorie']).strip(), 'valide': '1', 'locked': '0',
{'code': str(mydata['categorie']).strip(), 'valide': '1', 'locked': '0', 'partner_owner_recid':str(user_recid)
})
if (count_categorie <= 0):
mycommon.myprint(str(
@ -4578,7 +4591,7 @@ def Controle_add_class_mass(saved_file=None, Folder=None, diction=None):
Verifier que le metier est bien dans la liste acceptée
"""
count_metier = MYSY_GV.dbname['class_metier'].count_documents(
{'code': str(metier).strip(), 'valide': '1', 'locked': '0'})
{'code': str(metier).strip(), 'valide': '1', 'locked': '0', 'partner_owner_recid':str(user_recid)})
if (count_metier <= 0):
mycommon.myprint(str(
inspect.stack()[0][3]) + " - Le metier '" + str(