23/04/2024 - 14h06
parent
21d17d11d6
commit
7e16b18f09
|
@ -1,12 +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="sss">
|
||||
<list default="true" id="c6d0259a-16e1-410d-91a1-830590ee2a08" name="Changes" comment="22/04/2024 - 17h30">
|
||||
<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$/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$/attached_file_mgt.py" beforeDir="false" afterPath="$PROJECT_DIR$/attached_file_mgt.py" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/partner_order.py" beforeDir="false" afterPath="$PROJECT_DIR$/partner_order.py" afterDir="false" />
|
||||
</list>
|
||||
|
@ -78,13 +77,6 @@
|
|||
<option name="presentableId" value="Default" />
|
||||
<updated>1680804787304</updated>
|
||||
</task>
|
||||
<task id="LOCAL-00226" summary="24/02/2024 - 22h30">
|
||||
<created>1708808985842</created>
|
||||
<option name="number" value="00226" />
|
||||
<option name="presentableId" value="LOCAL-00226" />
|
||||
<option name="project" value="LOCAL" />
|
||||
<updated>1708808985842</updated>
|
||||
</task>
|
||||
<task id="LOCAL-00227" summary="25/02/2024 - 22h30">
|
||||
<created>1708898791231</created>
|
||||
<option name="number" value="00227" />
|
||||
|
@ -421,7 +413,14 @@
|
|||
<option name="project" value="LOCAL" />
|
||||
<updated>1713719597944</updated>
|
||||
</task>
|
||||
<option name="localTasksCounter" value="275" />
|
||||
<task id="LOCAL-00275" summary="22/04/2024 - 17h30">
|
||||
<created>1713799833124</created>
|
||||
<option name="number" value="00275" />
|
||||
<option name="presentableId" value="LOCAL-00275" />
|
||||
<option name="project" value="LOCAL" />
|
||||
<updated>1713799833126</updated>
|
||||
</task>
|
||||
<option name="localTasksCounter" value="276" />
|
||||
<servers />
|
||||
</component>
|
||||
<component name="Vcs.Log.Tabs.Properties">
|
||||
|
@ -463,7 +462,6 @@
|
|||
</option>
|
||||
</component>
|
||||
<component name="VcsManagerConfiguration">
|
||||
<MESSAGE value="25/03/2024 - 18h30" />
|
||||
<MESSAGE value="26/03/2024 - 21h30" />
|
||||
<MESSAGE value="fff" />
|
||||
<MESSAGE value="01/04/24 - 23h30" />
|
||||
|
@ -488,6 +486,7 @@
|
|||
<MESSAGE value="20/04/2024 - 13h" />
|
||||
<MESSAGE value="20/04/2024 - 20h44" />
|
||||
<MESSAGE value="sss" />
|
||||
<option name="LAST_COMMIT_MESSAGE" value="sss" />
|
||||
<MESSAGE value="22/04/2024 - 17h30" />
|
||||
<option name="LAST_COMMIT_MESSAGE" value="22/04/2024 - 17h30" />
|
||||
</component>
|
||||
</project>
|
|
@ -109,7 +109,7 @@ def Create_E_Document(diction):
|
|||
Verification des input acceptés
|
||||
"""
|
||||
field_list = ['token', 'file_name', 'related_collection', 'related_collection_id',
|
||||
'email_destinataire', 'source_document', 'type']
|
||||
'email_destinataire', 'source_document', 'type', 'file_cononical_name']
|
||||
|
||||
incom_keys = diction.keys()
|
||||
for val in incom_keys:
|
||||
|
@ -187,6 +187,16 @@ def Create_E_Document(diction):
|
|||
else:
|
||||
new_diction['type'] = ""
|
||||
|
||||
if ("file_cononical_name" in diction.keys() and diction['file_cononical_name']):
|
||||
new_diction['file_cononical_name'] = str(diction['file_cononical_name'])
|
||||
else:
|
||||
todays_date = str(datetime.today().strftime("%d/%m/%Y"))
|
||||
ts = datetime.now().timestamp()
|
||||
ts = str(ts).replace(".", "").replace(",", "")[-2:]
|
||||
|
||||
cononic_name = "No_Name_" + str(todays_date) + "_" + str(ts)
|
||||
|
||||
new_diction['file_cononical_name'] = cononic_name
|
||||
|
||||
val = MYSY_GV.dbname['e_document_signe'].insert_one(new_diction)
|
||||
|
||||
|
@ -1034,13 +1044,15 @@ def Create_E_Signature_For_E_Document(file_img=None, Folder=None, diction=None):
|
|||
Recuperer les données du client associé à la quotation
|
||||
"""
|
||||
quotation_client_data = None
|
||||
if(e_document_date_2['related_collection'] == "quotation" ):
|
||||
reference_document = ""
|
||||
type_document = ""
|
||||
if(e_document_date_2['type'] == "quotation" ):
|
||||
qry = {'partner_owner_recid':local_partner_owner_recid,
|
||||
'_id':ObjectId(str(e_document_date_2['related_collection_id'])),
|
||||
'valide':'1',
|
||||
'locked':'0'}
|
||||
|
||||
print(" ### qry = ", qry)
|
||||
|
||||
quotation_data = MYSY_GV.dbname['partner_order_header'].find_one({'partner_owner_recid':local_partner_owner_recid,
|
||||
'_id':ObjectId(str(e_document_date_2['related_collection_id'])),
|
||||
'valide':'1',
|
||||
|
@ -1051,12 +1063,14 @@ def Create_E_Signature_For_E_Document(file_img=None, Folder=None, diction=None):
|
|||
str(inspect.stack()[0][3]) + " L'identifiant du devis n'est pas valide ")
|
||||
return False, " L'identifiant du devis n'est pas valide "
|
||||
|
||||
reference_document = quotation_data['order_header_ref_interne']
|
||||
type_document = "Devis"
|
||||
|
||||
qry2 = {'partner_recid': local_partner_owner_recid,
|
||||
'_id': ObjectId(str(quotation_data['order_header_client_id'])),
|
||||
'valide': '1',
|
||||
'locked': '0'}
|
||||
|
||||
print(" ### qry2 = ", qry2)
|
||||
|
||||
quotation_client_data = None
|
||||
quotation_client_data = MYSY_GV.dbname['partner_client'].find_one(
|
||||
|
@ -1081,17 +1095,17 @@ def Create_E_Signature_For_E_Document(file_img=None, Folder=None, diction=None):
|
|||
|
||||
|
||||
ts = datetime.now().timestamp()
|
||||
ts = str(ts).replace(".", "").replace(",", "")[-3:]
|
||||
ts = str(ts).replace(".", "").replace(",", "")[-2:]
|
||||
|
||||
todays_date = str(datetime.today().strftime("%d%m%Y"))
|
||||
|
||||
new_file = {}
|
||||
new_file['token'] = temp_admin_account['token']
|
||||
|
||||
if (str(e_docment_type).strip() != ""):
|
||||
new_file['file_business_object'] = "e_"+str(e_docment_type)+"_signe_" + str(todays_date)
|
||||
if (type_document == "Devis" and reference_document):
|
||||
new_file['file_business_object'] = "e_"+str(type_document)+"_"+str(reference_document)+"_signe_" + str(todays_date)+"_"+str(ts)
|
||||
else:
|
||||
new_file['file_business_object'] = "e_Document_signe_" + str(todays_date)
|
||||
new_file['file_business_object'] = "e_Document_signe_" + str(todays_date)+"_"+str(ts)
|
||||
|
||||
new_file['file_name'] = str(orig_file_name)
|
||||
new_file['status'] = "1"
|
||||
|
|
|
@ -8078,8 +8078,8 @@ def Sent_Convention_Stagiaire_By_Email(tab_files, Folder, diction):
|
|||
sourceHtml = contenu_doc_Template.render(params=body["params"])
|
||||
|
||||
new_model_courrier_with_code_tag = str(
|
||||
sourceHtml) + " <p style='width: 300px; text-align: right;'> Signature Client <br/> <img style='height:250px; width:250px;' src='{{ params.mysy_manual_signature_img }}'> </p> <br/> " \
|
||||
" <p style='width: 300px; text-align: center;'> <img style='height:150px; width:150px;' src='{{ params.mysy_qrcode_securite }}'> </p> "
|
||||
sourceHtml) + " <p style='width: 300px; text-align: right;'> Signature Client <br/> <img style='height:150px; width:150px' src='{{ params.mysy_manual_signature_img }}'> </p> <br/> " \
|
||||
" <p style='width: 300px; text-align: center;'> <img style='height:150px; width:150px;' src='{{ params.mysy_qrcode_securite }}'> </p> "
|
||||
|
||||
todays_date = str(date.today().strftime("%d/%m/%Y"))
|
||||
ts = datetime.now().timestamp()
|
||||
|
@ -8135,6 +8135,18 @@ def Sent_Convention_Stagiaire_By_Email(tab_files, Folder, diction):
|
|||
|
||||
new_e_document_diction['related_collection'] = "inscription"
|
||||
new_e_document_diction['related_collection_id'] = str(inscription_data['_id'])
|
||||
|
||||
|
||||
todays_date = str(date.today().strftime("%d/%m/%Y"))
|
||||
ts = datetime.now().timestamp()
|
||||
ts = str(ts).replace(".", "").replace(",", "")[-2:]
|
||||
|
||||
cononic_name = "Convention_" + str(todays_date) + "_" + str(ts)
|
||||
new_e_document_diction['file_cononical_name'] = cononic_name
|
||||
new_e_document_diction['type'] = "convention"
|
||||
|
||||
|
||||
|
||||
local_status_e_doc, local_retval_e_doc = E_Sign_Document.Create_E_Document(new_e_document_diction)
|
||||
|
||||
if (local_status_e_doc is False):
|
||||
|
@ -9918,9 +9930,9 @@ def Sent_Convention_Stagiaire_By_Email_By_Partner_client(tab_files_name_full_pat
|
|||
|
||||
sourceHtml = contenu_doc_Template.render(params=body["params"])
|
||||
|
||||
new_model_courrier_with_code_tag = str(sourceHtml) + " <p style='width: 300px; text-align: right;'> Signature Client <br/> <img style='height:250px; width:250px;' src='{{ params.mysy_manual_signature_img }}'> </p> <br/> " \
|
||||
" <p style='width: 300px; text-align: center;'> <img style='height:150px; width:150px;' src='{{ params.mysy_qrcode_securite }}'> </p> "
|
||||
|
||||
new_model_courrier_with_code_tag = str(sourceHtml) + " <p style='width: 300px; text-align: right;'> Signature Client <br/> <img style='height:150px; width:150px' src='{{ params.mysy_manual_signature_img }}'> </p> <br/> " \
|
||||
" <p style='width: 300px; text-align: center;'> <img style='height:150px; width:150px;' src='{{ params.mysy_qrcode_securite }}'> </p> "
|
||||
|
||||
|
||||
|
||||
todays_date = str(date.today().strftime("%d/%m/%Y"))
|
||||
|
@ -9977,6 +9989,15 @@ def Sent_Convention_Stagiaire_By_Email_By_Partner_client(tab_files_name_full_pat
|
|||
|
||||
new_e_document_diction['related_collection'] = "partner_client"
|
||||
new_e_document_diction['related_collection_id'] = str(client_data['_id'])
|
||||
|
||||
todays_date = str(date.today().strftime("%d/%m/%Y"))
|
||||
ts = datetime.now().timestamp()
|
||||
ts = str(ts).replace(".", "").replace(",", "")[-2:]
|
||||
|
||||
cononic_name = "Convention_" + str(todays_date) + "_" + str(ts)
|
||||
new_e_document_diction['file_cononical_name'] = cononic_name
|
||||
new_e_document_diction['type'] = "convention"
|
||||
|
||||
local_status_e_doc, local_retval_e_doc = E_Sign_Document.Create_E_Document(new_e_document_diction)
|
||||
|
||||
if(local_status_e_doc is False ):
|
||||
|
|
3098
Log/log_file.log
3098
Log/log_file.log
File diff suppressed because one or more lines are too long
|
@ -535,11 +535,15 @@ def Get_List_object_owner_collection_Stored_Files(diction):
|
|||
if ("full_path" in retval.keys()):
|
||||
ret_file['full_path'] = retval['full_path']
|
||||
|
||||
if ("file_cononical_name" in retval.keys()):
|
||||
ret_file['file_cononical_name'] = retval['file_cononical_name']
|
||||
else:
|
||||
ret_file['file_cononical_name'] = "Anonyme"
|
||||
|
||||
RetObject.append(mycommon.JSONEncoder().encode(ret_file))
|
||||
nb_val = nb_val + 1
|
||||
|
||||
print(" ### Get_List_object_owner_collection_Stored_Files = ", RetObject)
|
||||
#print(" ### Get_List_object_owner_collection_Stored_Files = ", RetObject)
|
||||
return True, RetObject
|
||||
|
||||
|
||||
|
|
|
@ -5055,8 +5055,8 @@ def Send_Partner_Order_By_Email(diction):
|
|||
sujetHtml = str(Order_header_data['order_header_type']) + " : "+ str(Order_header_data['order_header_ref_interne'])
|
||||
|
||||
new_model_courrier_with_code_tag = str(
|
||||
sourceHtml) + " <p style='width: 300px; text-align: right;'> Signature Client <br/> <img style='height:250px; width:250px;' src='{{ params.mysy_manual_signature_img }}'> </p> <br/> " \
|
||||
" <p style='width: 300px; text-align: center;'> <img style='height:150px; width:150px;' src='{{ params.mysy_qrcode_securite }}'> </p> "
|
||||
sourceHtml) + " <p style='width: 300px; text-align: right;'> Signature Client <br/> <img style='height:150px; width:150px' src='{{ params.mysy_manual_signature_img }}'> </p> <br/> " \
|
||||
" <p style='width: 300px; text-align: center;'> <img style='height:150px; width:150px;' src='{{ params.mysy_qrcode_securite }}'> </p> "
|
||||
|
||||
todays_date = str(date.today().strftime("%d_%m_%Y"))
|
||||
ts = datetime.now().timestamp()
|
||||
|
@ -5253,6 +5253,13 @@ def Send_Partner_Order_By_Email(diction):
|
|||
new_e_document_diction['related_collection'] = "quotation"
|
||||
new_e_document_diction['related_collection_id'] = str(diction['order_id'])
|
||||
|
||||
|
||||
|
||||
if( "order_header_ref_interne" in Order_header_data.keys() ):
|
||||
new_e_document_diction['file_cononical_name'] = str(Order_header_data['order_header_ref_interne'])
|
||||
else:
|
||||
new_e_document_diction['file_cononical_name'] = ""
|
||||
|
||||
local_status_e_doc, local_retval_e_doc = E_Sign_Document.Create_E_Document(new_e_document_diction)
|
||||
|
||||
if (local_status_e_doc is False):
|
||||
|
@ -5290,7 +5297,7 @@ def Send_Partner_Order_By_Email(diction):
|
|||
{'$set': updata_data})
|
||||
|
||||
|
||||
return True, " Le document a été envoyé par email à :'"+str(client_main_mail_tmp)+"' "
|
||||
return True, " Le document a été envoyé par email à : '"+str(client_main_mail_tmp)+"' "
|
||||
|
||||
except Exception as e:
|
||||
exc_type, exc_obj, exc_tb = sys.exc_info()
|
||||
|
@ -5830,7 +5837,7 @@ def Insert_Quotation_To_Session(diction):
|
|||
sourceHtml = local_file_retaval_SourceHtml
|
||||
|
||||
new_model_courrier_with_code_tag = str(
|
||||
sourceHtml) + " <p style='width: 300px; text-align: right;'> Signature Client <br/> <img style='height:250px; width:250px;' src='{{ params.mysy_manual_signature_img }}'> </p> <br/> " \
|
||||
sourceHtml) + " <p style='width: 300px; text-align: right;'> Signature Client <br/> <img style='height:150px; width:150px' src='{{ params.mysy_manual_signature_img }}'> </p> <br/> " \
|
||||
" <p style='width: 300px; text-align: center;'> <img style='height:150px; width:150px;' src='{{ params.mysy_qrcode_securite }}'> </p> "
|
||||
|
||||
|
||||
|
@ -6160,10 +6167,9 @@ def Insert_Quotation_To_Session_From_Partner_Owner_Recid(diction):
|
|||
sourceHtml = local_file_retaval_SourceHtml
|
||||
|
||||
new_model_courrier_with_code_tag = str(
|
||||
sourceHtml) + " <p style='width: 300px; text-align: right;'> Signature Client <br/> <img style='height:250px; width:250px;' src='{{ params.mysy_manual_signature_img }}'> </p> <br/> " \
|
||||
sourceHtml) + " <p style='width: 300px; text-align: right;'> Signature Client <br/> <img style='height:150px; width:150px' src='{{ params.mysy_manual_signature_img }}'> </p> <br/> " \
|
||||
" <p style='width: 300px; text-align: center;'> <img style='height:150px; width:150px;' src='{{ params.mysy_qrcode_securite }}'> </p> "
|
||||
|
||||
|
||||
if (is_partner_digital_signature == "1"):
|
||||
|
||||
print("is_valide_qotation_data = ", is_valide_qotation_data)
|
||||
|
|
Loading…
Reference in New Issue