21/05/2024 - 21h
parent
78561a690f
commit
6f2d7e311a
|
@ -1,11 +1,12 @@
|
|||
<?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/05/2024 - 14h00">
|
||||
<list default="true" id="c6d0259a-16e1-410d-91a1-830590ee2a08" name="Changes" comment="20/05/2024 - 22h00">
|
||||
<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$/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_client.py" beforeDir="false" afterPath="$PROJECT_DIR$/partner_client.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" />
|
||||
</list>
|
||||
<option name="SHOW_DIALOG" value="false" />
|
||||
<option name="HIGHLIGHT_CONFLICTS" value="true" />
|
||||
|
@ -75,13 +76,6 @@
|
|||
<option name="presentableId" value="Default" />
|
||||
<updated>1680804787304</updated>
|
||||
</task>
|
||||
<task id="LOCAL-00259" summary="07/04/2024 - 13h19">
|
||||
<created>1712487406647</created>
|
||||
<option name="number" value="00259" />
|
||||
<option name="presentableId" value="LOCAL-00259" />
|
||||
<option name="project" value="LOCAL" />
|
||||
<updated>1712487406648</updated>
|
||||
</task>
|
||||
<task id="LOCAL-00260" summary="07/04/2024 - 19h19">
|
||||
<created>1712509552892</created>
|
||||
<option name="number" value="00260" />
|
||||
|
@ -418,7 +412,14 @@
|
|||
<option name="project" value="LOCAL" />
|
||||
<updated>1716206194944</updated>
|
||||
</task>
|
||||
<option name="localTasksCounter" value="308" />
|
||||
<task id="LOCAL-00308" summary="20/05/2024 - 22h00">
|
||||
<created>1716233337268</created>
|
||||
<option name="number" value="00308" />
|
||||
<option name="presentableId" value="LOCAL-00308" />
|
||||
<option name="project" value="LOCAL" />
|
||||
<updated>1716233337269</updated>
|
||||
</task>
|
||||
<option name="localTasksCounter" value="309" />
|
||||
<servers />
|
||||
</component>
|
||||
<component name="Vcs.Log.Tabs.Properties">
|
||||
|
@ -460,7 +461,6 @@
|
|||
</option>
|
||||
</component>
|
||||
<component name="VcsManagerConfiguration">
|
||||
<MESSAGE value="sss" />
|
||||
<MESSAGE value="vvvv" />
|
||||
<MESSAGE value="04/05/2024 - 20h30" />
|
||||
<MESSAGE value="05/05/2024 - 13h30" />
|
||||
|
@ -485,6 +485,7 @@
|
|||
<MESSAGE value="18/05/2024 - 22h30" />
|
||||
<MESSAGE value="19/05/2024 - 22h15" />
|
||||
<MESSAGE value="20/05/2024 - 14h00" />
|
||||
<option name="LAST_COMMIT_MESSAGE" value="20/05/2024 - 14h00" />
|
||||
<MESSAGE value="20/05/2024 - 22h00" />
|
||||
<option name="LAST_COMMIT_MESSAGE" value="20/05/2024 - 22h00" />
|
||||
</component>
|
||||
</project>
|
2157
Log/log_file.log
2157
Log/log_file.log
File diff suppressed because it is too large
Load Diff
|
@ -733,7 +733,8 @@ def Add_Partner_Prospect(diction):
|
|||
|
||||
|
||||
"""
|
||||
Mise à jour contact d'un client de partner
|
||||
Mise à jour contact d'un client de partner -- oselette.
|
||||
les contacts sont gérés dans la collection "contact"
|
||||
"""
|
||||
def Update_Partner_Client_Contact(diction):
|
||||
try:
|
||||
|
@ -819,9 +820,10 @@ def Update_Partner_Client_Contact(diction):
|
|||
data_update["address.$[elem].telephone"] = telephone
|
||||
|
||||
|
||||
print(" #### data_update = ", data_update)
|
||||
"""print(" #### data_update = ", data_update)
|
||||
print(" #### partner_recid = ", str(partner_recid))
|
||||
print(" #### elem.recid = ", str(partner_client_contact_recid))
|
||||
"""
|
||||
|
||||
result = MYSY_GV.dbname['partner_client'].update_one(
|
||||
{'partner_recid':str(partner_recid)},
|
||||
|
@ -1779,6 +1781,7 @@ Avant il faut verifier :
|
|||
1 - pas de stagiaire associé
|
||||
2 - Pas de devis associé
|
||||
3 - Pas de commande associé
|
||||
4 - Pas de contact associé
|
||||
"""
|
||||
def Delete_Given_Partner_Client(diction):
|
||||
try:
|
||||
|
@ -1855,6 +1858,12 @@ def Delete_Given_Partner_Client(diction):
|
|||
return False, " - Le client a " + str(
|
||||
is_devis_cmd_Count) + " commande(s) ou devis valide(s). Suppression annulée"
|
||||
|
||||
# Supression à contact
|
||||
MYSY_GV.dbname['contact'].delete_one(
|
||||
{'related_collection':'partner_client',
|
||||
'related_collection_recid':str(diction['_id']),
|
||||
'partner_recid': str(my_partner['recid'])}
|
||||
)
|
||||
|
||||
|
||||
# Supression à faire
|
||||
|
|
|
@ -21,6 +21,7 @@ from bson import ObjectId
|
|||
import re
|
||||
from datetime import datetime, date, timedelta
|
||||
|
||||
import Contact
|
||||
import E_Sign_Document
|
||||
import Inscription_mgt
|
||||
import partner_client
|
||||
|
@ -6956,7 +6957,7 @@ def Create_Automatic_Quotation(diction):
|
|||
|
||||
|
||||
if( str(client_connu) != "1"):
|
||||
## Le clien test inconnu, il faut créer le client
|
||||
## Le client est inconnu, il faut créer le client
|
||||
new_client_diction = {}
|
||||
new_client_diction['token'] = my_partner['token']
|
||||
|
||||
|
@ -6965,6 +6966,7 @@ def Create_Automatic_Quotation(diction):
|
|||
new_client_diction['email'] = valide_lead_website_data['email_requester']
|
||||
new_client_diction['telephone'] = valide_lead_website_data['telephone_requester']
|
||||
new_client_diction['siret'] = valide_lead_website_data['siret']
|
||||
new_client_diction['is_company'] = "1"
|
||||
|
||||
local_prospect_status, local_prospect_retval = partner_client.Add_Partner_Prospect(new_client_diction)
|
||||
|
||||
|
@ -6975,6 +6977,30 @@ def Create_Automatic_Quotation(diction):
|
|||
{'partner_recid': str(valide_lead_website_data['partner_owner_recid']),
|
||||
'siret': str(valide_lead_website_data['siret'])})
|
||||
|
||||
"""
|
||||
Apres la creation du client, on ajoute un contact de communication
|
||||
par defaut
|
||||
"""
|
||||
prospect_contact_data = {}
|
||||
prospect_contact_data['related_collection'] = "partner_client"
|
||||
prospect_contact_data['related_collection_owner_id'] = str(is_client_exist_data['_id'])
|
||||
prospect_contact_data['email'] = str(valide_lead_website_data['email_requester'])
|
||||
prospect_contact_data['nom'] = str(valide_lead_website_data['nom_requester'])
|
||||
prospect_contact_data['civilite'] = "neutre"
|
||||
prospect_contact_data['telephone'] = str(valide_lead_website_data['telephone_requester'])
|
||||
prospect_contact_data['include_com'] = "1"
|
||||
prospect_contact_data['fonction'] = ""
|
||||
prospect_contact_data['token'] = str(my_partner['token'])
|
||||
|
||||
|
||||
#print(" ### prospect_contact_data data = ", prospect_contact_data)
|
||||
retval_status_add_contact, retval_retval_add_contact = Contact.Add_Contact(prospect_contact_data)
|
||||
|
||||
if( retval_status_add_contact is False ):
|
||||
return retval_status_add_contact, retval_retval_add_contact
|
||||
|
||||
#print(" ### retval_retval_add_contact = ", retval_retval_add_contact)
|
||||
|
||||
todays_date = str(date.today().strftime("%d/%m/%Y"))
|
||||
expirate_date = datetime.today() + timedelta(days=90)
|
||||
expirate_date = str(expirate_date.strftime("%d/%m/%Y"))
|
||||
|
@ -6989,6 +7015,9 @@ def Create_Automatic_Quotation(diction):
|
|||
new_quotation_header['order_header_date_expiration'] = expirate_date
|
||||
new_quotation_header['order_header_type'] = "devis"
|
||||
new_quotation_header['order_header_status'] = "0"
|
||||
new_quotation_header['order_header_email_client'] = str(valide_lead_website_data['email_requester'])
|
||||
|
||||
|
||||
new_quotation_header['order_lines'] = []
|
||||
|
||||
"""
|
||||
|
|
|
@ -1449,7 +1449,7 @@ def partner_login(diction):
|
|||
"""
|
||||
return_data['user_access_right'] = []
|
||||
qry = {'valide':'1', 'locked':'0','partner_owner_recid':str(partner_recid),'user_id':str(ressource_humaine_id)}
|
||||
print(" #### partner_login user_access_right qry = ", qry)
|
||||
#print(" #### partner_login user_access_right qry = ", qry)
|
||||
|
||||
for retval in MYSY_GV.dbname['user_access_right'].find(qry).sort([("_id", pymongo.DESCENDING), ]):
|
||||
local_access_right = {}
|
||||
|
|
Loading…
Reference in New Issue