master
cherif 2024-06-04 22:44:02 +02:00
parent c91b5b5b16
commit bd827f217d
4 changed files with 2974 additions and 18 deletions

View File

@ -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="01/06/2024 - 14h30">
<change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/GlobalVariable.py" beforeDir="false" afterPath="$PROJECT_DIR$/GlobalVariable.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$/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$/prj_common.py" beforeDir="false" afterPath="$PROJECT_DIR$/prj_common.py" afterDir="false" />
<change beforePath="$PROJECT_DIR$/partner_order.py" beforeDir="false" afterPath="$PROJECT_DIR$/partner_order.py" afterDir="false" />
</list>
<option name="SHOW_DIALOG" value="false" />
<option name="HIGHLIGHT_CONFLICTS" value="true" />
@ -76,13 +75,6 @@
<option name="presentableId" value="Default" />
<updated>1680804787304</updated>
</task>
<task id="LOCAL-00271" summary="19/04/2024 - 22h22">
<created>1713558162945</created>
<option name="number" value="00271" />
<option name="presentableId" value="LOCAL-00271" />
<option name="project" value="LOCAL" />
<updated>1713558162945</updated>
</task>
<task id="LOCAL-00272" summary="20/04/2024 - 13h">
<created>1713610715820</created>
<option name="number" value="00272" />
@ -419,7 +411,14 @@
<option name="project" value="LOCAL" />
<updated>1717159892368</updated>
</task>
<option name="localTasksCounter" value="320" />
<task id="LOCAL-00320" summary="01/06/2024 - 14h30">
<created>1717245781084</created>
<option name="number" value="00320" />
<option name="presentableId" value="LOCAL-00320" />
<option name="project" value="LOCAL" />
<updated>1717245781085</updated>
</task>
<option name="localTasksCounter" value="321" />
<servers />
</component>
<component name="Vcs.Log.Tabs.Properties">
@ -461,7 +460,6 @@
</option>
</component>
<component name="VcsManagerConfiguration">
<MESSAGE value="10/05/2024 - 18h30" />
<MESSAGE value="gdf" />
<MESSAGE value="dd" />
<MESSAGE value="ddsdfsd" />
@ -486,6 +484,7 @@
<MESSAGE value="qsdsqqsdsq" />
<MESSAGE value="sd" />
<MESSAGE value="sss" />
<option name="LAST_COMMIT_MESSAGE" value="sss" />
<MESSAGE value="01/06/2024 - 14h30" />
<option name="LAST_COMMIT_MESSAGE" value="01/06/2024 - 14h30" />
</component>
</project>

View File

@ -542,6 +542,7 @@ Gestion des commandes et devis des partenaires
PARTNER_ORDER_TYPE = ['devis', 'commande']
"""
Les Commandes :
En termes de process, un document de type commande peut avoir le statut de :
-1 => Annulé
0 => Brouillon

File diff suppressed because it is too large Load Diff

View File

@ -5800,17 +5800,19 @@ def Convert_Quotation_to_Order(diction):
##print(" ### New_Order_Line = ",New_Order_Line)
local_add_line_status, local_add_line_retval = Add_Update_Partner_Order_Line(New_Order_Line)
print(" Ligne = ", cpt_line)
#print(" Ligne = ", cpt_line)
cpt_line = cpt_line + 1
"""
Apres la convertion, on met à jour le devis pour dire qu'il a été gagné
Apres la convertion, on met à jour le devis (entete et lignes) pour dire qu'il a été gagné,
On met la ref de nouvelle commande dans le champs 'related_order_internal_ref' = new_created_order['order_header_ref_interne']
"""
data_update = {}
data_update['date_update'] = str(datetime.now())
data_update['update_by'] = str(my_partner['_id'])
data_update['order_header_status'] = "3"
data_update['related_order_internal_ref'] = new_created_order['order_header_ref_interne']
result = MYSY_GV.dbname['partner_order_header'].find_one_and_update(
@ -5829,9 +5831,10 @@ def Convert_Quotation_to_Order(diction):
data_update['date_update'] = str(datetime.now())
data_update['update_by'] = str(my_partner['_id'])
data_update['order_line_status'] = "3"
data_update['related_order_internal_ref'] = new_created_order['order_header_ref_interne']
result = MYSY_GV.dbname['partner_order_header'].update_many(
{'_id': ObjectId(str(diction['order_id'])),
result = MYSY_GV.dbname['partner_order_line'].update_many(
{'order_header_id': str(diction['order_id']),
'valide': '1', 'locked': '0',
'order_header_type': 'devis',
'partner_owner_recid': str(