01/10/2023 - 23h

master
cherif 2023-10-01 22:25:26 +02:00
parent 1ed2cf1f99
commit 253ebda2fd
5 changed files with 1788 additions and 9 deletions

View File

@ -2,13 +2,10 @@
<project version="4">
<component name="ChangeListManager">
<list default="true" id="c6d0259a-16e1-410d-91a1-830590ee2a08" name="Changes" comment="30/09/2023 - 19h">
<change afterPath="$PROJECT_DIR$/partner_invoice.py" afterDir="false" />
<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_invoice.py" beforeDir="false" afterPath="$PROJECT_DIR$/partner_invoice.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" />

View File

@ -1835510,3 +1835510,159 @@ INFO:root:2023-10-01 17:14:28.503414 : Security check : IP adresse '127.0.0.1'
INFO:root:2023-10-01 17:14:28.506393 : Security check : IP adresse '127.0.0.1' connected
INFO:werkzeug:127.0.0.1 - - [01/Oct/2023 17:14:28] "POST /myclass/api/Get_Given_Partner_Order/ HTTP/1.1" 200 -
INFO:werkzeug:127.0.0.1 - - [01/Oct/2023 17:14:28] "POST /myclass/api/Get_Given_Partner_Order_Lines/ HTTP/1.1" 200 -
INFO:root:2023-10-01 22:15:47.081711 : ++++ ENVIRONNEMENT DEVELOPPEMENT ++++
INFO:root:2023-10-01 22:15:47.082831 : ++ DATABASE mongodb://localhost:27017/cherifdb_dev ++
INFO:root:2023-10-01 22:15:47.082831 : ++ DBNAME Database(MongoClient(host=['localhost:27017'], document_class=dict, tz_aware=False, connect=True), 'cherifdb_dev') ++
INFO:root:2023-10-01 22:15:47.082831 : ++ FLASK PORT 5001 ++
INFO:root:2023-10-01 22:15:47.082831 : ++ LMS_BAS_URL mysy-training.com/ ++
INFO:werkzeug:WARNING: This is a development server. Do not use it in a production deployment. Use a production WSGI server instead.
* Running on http://localhost:5001
INFO:werkzeug:Press CTRL+C to quit
INFO:werkzeug: * Restarting with stat
INFO:root:2023-10-01 22:15:59.501678 : ++++ ENVIRONNEMENT DEVELOPPEMENT ++++
INFO:root:2023-10-01 22:15:59.501678 : ++ DATABASE mongodb://localhost:27017/cherifdb_dev ++
INFO:root:2023-10-01 22:15:59.501678 : ++ DBNAME Database(MongoClient(host=['localhost:27017'], document_class=dict, tz_aware=False, connect=True), 'cherifdb_dev') ++
INFO:root:2023-10-01 22:15:59.501678 : ++ FLASK PORT 5001 ++
INFO:root:2023-10-01 22:15:59.501678 : ++ LMS_BAS_URL mysy-training.com/ ++
WARNING:werkzeug: * Debugger is active!
INFO:werkzeug: * Debugger PIN: 877-541-979
INFO:root:2023-10-01 22:15:59.716138 : Security check : IP adresse '127.0.0.1' connected
INFO:werkzeug:127.0.0.1 - - [01/Oct/2023 22:15:59] "POST /myclass/api/partner_login/ HTTP/1.1" 200 -
INFO:root:2023-10-01 22:15:59.982856 : Security check : IP adresse '127.0.0.1' connected
INFO:root:2023-10-01 22:15:59.987391 : Security check : IP adresse '127.0.0.1' connected
INFO:root:2023-10-01 22:15:59.988394 : Security check : IP adresse '127.0.0.1' connected
INFO:root:2023-10-01 22:15:59.997075 : Security check : IP adresse '127.0.0.1' connected
INFO:werkzeug:127.0.0.1 - - [01/Oct/2023 22:16:00] "POST /myclass/api/getRecodedImage/ HTTP/1.1" 200 -
INFO:werkzeug:127.0.0.1 - - [01/Oct/2023 22:16:00] "POST /myclass/api/LMS_Get_Partner_Data/ HTTP/1.1" 200 -
INFO:root:2023-10-01 22:16:00.017931 : Connexion du partner recid = dbdd36f3d86a73e2bfac7b3f10f062ce1e7c22f7da37de192a OK. Mise à jour du firstconnexion et/ou lastconnexion : OK
INFO:werkzeug:127.0.0.1 - - [01/Oct/2023 22:16:00] "POST /myclass/api/get_partner_account/ HTTP/1.1" 200 -
INFO:root:2023-10-01 22:16:00.101780 : Security check : IP adresse '127.0.0.1' connected
INFO:werkzeug:127.0.0.1 - - [01/Oct/2023 22:16:00] "POST /myclass/api/get_partner_class/ HTTP/1.1" 200 -
INFO:werkzeug:127.0.0.1 - - [01/Oct/2023 22:16:00] "POST /myclass/api/find_partner_class_like/ HTTP/1.1" 200 -
INFO:root:2023-10-01 22:19:21.462762 : Security check : IP adresse '127.0.0.1' connected
INFO:root:2023-10-01 22:19:21.469766 : Security check : IP adresse '127.0.0.1' connected
INFO:root:2023-10-01 22:19:21.474753 : Security check : IP adresse '127.0.0.1' connected
INFO:werkzeug:127.0.0.1 - - [01/Oct/2023 22:19:21] "POST /myclass/api/getRecodedImage/ HTTP/1.1" 200 -
INFO:werkzeug:127.0.0.1 - - [01/Oct/2023 22:19:21] "POST /myclass/api/LMS_Get_Partner_Data/ HTTP/1.1" 200 -
INFO:root:2023-10-01 22:19:21.488749 : Connexion du partner recid = dbdd36f3d86a73e2bfac7b3f10f062ce1e7c22f7da37de192a OK. Mise à jour du firstconnexion et/ou lastconnexion : OK
INFO:werkzeug:127.0.0.1 - - [01/Oct/2023 22:19:21] "POST /myclass/api/get_partner_account/ HTTP/1.1" 200 -
INFO:root:2023-10-01 22:19:21.661731 : Security check : IP adresse '127.0.0.1' connected
INFO:werkzeug:127.0.0.1 - - [01/Oct/2023 22:19:21] "POST /myclass/api/find_partner_class_like/ HTTP/1.1" 200 -
INFO:root:2023-10-01 22:19:58.096618 : Security check : IP adresse '127.0.0.1' connected
INFO:root:2023-10-01 22:19:58.102828 : Security check : IP adresse '127.0.0.1' connected
INFO:werkzeug:127.0.0.1 - - [01/Oct/2023 22:19:58] "POST /myclass/api/getRecodedImage/ HTTP/1.1" 200 -
INFO:root:2023-10-01 22:19:58.111763 : Security check : IP adresse '127.0.0.1' connected
INFO:root:2023-10-01 22:19:58.126408 : Connexion du partner recid = dbdd36f3d86a73e2bfac7b3f10f062ce1e7c22f7da37de192a OK. Mise à jour du firstconnexion et/ou lastconnexion : OK
INFO:werkzeug:127.0.0.1 - - [01/Oct/2023 22:19:58] "POST /myclass/api/LMS_Get_Partner_Data/ HTTP/1.1" 200 -
INFO:werkzeug:127.0.0.1 - - [01/Oct/2023 22:19:58] "POST /myclass/api/get_partner_account/ HTTP/1.1" 200 -
INFO:root:2023-10-01 22:20:12.651708 : Security check : IP adresse '127.0.0.1' connected
INFO:root:2023-10-01 22:20:12.656724 : Security check : IP adresse '127.0.0.1' connected
INFO:werkzeug:127.0.0.1 - - [01/Oct/2023 22:20:12] "POST /myclass/api/getRecodedImage/ HTTP/1.1" 200 -
INFO:root:2023-10-01 22:20:12.662424 : Security check : IP adresse '127.0.0.1' connected
INFO:root:2023-10-01 22:20:12.670935 : Connexion du partner recid = dbdd36f3d86a73e2bfac7b3f10f062ce1e7c22f7da37de192a OK. Mise à jour du firstconnexion et/ou lastconnexion : OK
INFO:werkzeug:127.0.0.1 - - [01/Oct/2023 22:20:12] "POST /myclass/api/get_partner_account/ HTTP/1.1" 200 -
INFO:werkzeug:127.0.0.1 - - [01/Oct/2023 22:20:12] "POST /myclass/api/LMS_Get_Partner_Data/ HTTP/1.1" 200 -
INFO:root:2023-10-01 22:20:12.805973 : Security check : IP adresse '127.0.0.1' connected
INFO:werkzeug:127.0.0.1 - - [01/Oct/2023 22:20:12] "POST /myclass/api/find_partner_class_like/ HTTP/1.1" 200 -
INFO:root:2023-10-01 22:21:52.887420 : Security check : IP adresse '127.0.0.1' connected
INFO:root:2023-10-01 22:21:52.895421 : Security check : IP adresse '127.0.0.1' connected
INFO:root:2023-10-01 22:21:52.902967 : Security check : IP adresse '127.0.0.1' connected
INFO:werkzeug:127.0.0.1 - - [01/Oct/2023 22:21:52] "POST /myclass/api/getRecodedImage/ HTTP/1.1" 200 -
INFO:werkzeug:127.0.0.1 - - [01/Oct/2023 22:21:52] "POST /myclass/api/LMS_Get_Partner_Data/ HTTP/1.1" 200 -
INFO:root:2023-10-01 22:21:52.920581 : Connexion du partner recid = dbdd36f3d86a73e2bfac7b3f10f062ce1e7c22f7da37de192a OK. Mise à jour du firstconnexion et/ou lastconnexion : OK
INFO:werkzeug:127.0.0.1 - - [01/Oct/2023 22:21:52] "POST /myclass/api/get_partner_account/ HTTP/1.1" 200 -
INFO:root:2023-10-01 22:21:53.124665 : Security check : IP adresse '127.0.0.1' connected
INFO:werkzeug:127.0.0.1 - - [01/Oct/2023 22:21:53] "POST /myclass/api/find_partner_class_like/ HTTP/1.1" 200 -
INFO:root:2023-10-01 22:21:57.848263 : Security check : IP adresse '127.0.0.1' connected
INFO:root:2023-10-01 22:21:57.856274 : Security check : IP adresse '127.0.0.1' connected
INFO:root:2023-10-01 22:21:57.865176 : Security check : IP adresse '127.0.0.1' connected
INFO:werkzeug:127.0.0.1 - - [01/Oct/2023 22:21:57] "POST /myclass/api/get_List_domaine_formation/ HTTP/1.1" 200 -
INFO:werkzeug:127.0.0.1 - - [01/Oct/2023 22:21:58] "POST /myclass/api/Get_Suggested_Fr_Cities/ HTTP/1.1" 200 -
INFO:werkzeug:127.0.0.1 - - [01/Oct/2023 22:21:58] "POST /myclass/api/Get_Suggested_Word/ HTTP/1.1" 200 -
INFO:root:2023-10-01 22:21:58.298830 : Security check : IP adresse '127.0.0.1' connected
INFO:root:2023-10-01 22:21:58.302973 : Security check : IP adresse '127.0.0.1' connected
INFO:werkzeug:127.0.0.1 - - [01/Oct/2023 22:21:58] "POST /myclass/api/get_all_class/ HTTP/1.1" 200 -
INFO:root:2023-10-01 22:21:59.252336 : Security check : IP adresse '127.0.0.1' connected
INFO:root:2023-10-01 22:21:59.261286 : Security check : IP adresse '127.0.0.1' connected
INFO:werkzeug:127.0.0.1 - - [01/Oct/2023 22:21:59] "POST /myclass/api/getRecodedClassImage_from_front/ HTTP/1.1" 200 -
INFO:root:2023-10-01 22:21:59.270043 : Security check : IP adresse '127.0.0.1' connected
INFO:root:2023-10-01 22:21:59.274541 : Security check : IP adresse '127.0.0.1' connected
INFO:werkzeug:127.0.0.1 - - [01/Oct/2023 22:21:59] "POST /myclass/api/GetActiveSessionFormation_List/ HTTP/1.1" 200 -
INFO:root:2023-10-01 22:21:59.297490 : Security check : IP adresse '127.0.0.1' connected
INFO:werkzeug:127.0.0.1 - - [01/Oct/2023 22:21:59] "POST /myclass/api/getRecodedClassImage_from_front/ HTTP/1.1" 200 -
INFO:werkzeug:127.0.0.1 - - [01/Oct/2023 22:21:59] "POST /myclass/api/GetActiveSessionFormation_List/ HTTP/1.1" 200 -
INFO:root:2023-10-01 22:21:59.304209 : Security check : IP adresse '127.0.0.1' connected
INFO:werkzeug:127.0.0.1 - - [01/Oct/2023 22:21:59] "POST /myclass/api/getRecodedClassImage_from_front/ HTTP/1.1" 200 -
INFO:root:2023-10-01 22:21:59.313940 : Security check : IP adresse '127.0.0.1' connected
INFO:werkzeug:127.0.0.1 - - [01/Oct/2023 22:21:59] "POST /myclass/api/GetActiveSessionFormation_List/ HTTP/1.1" 200 -
INFO:root:2023-10-01 22:21:59.321024 : Security check : IP adresse '127.0.0.1' connected
INFO:root:2023-10-01 22:21:59.324026 : Security check : IP adresse '127.0.0.1' connected
INFO:werkzeug:127.0.0.1 - - [01/Oct/2023 22:21:59] "POST /myclass/api/getRecodedClassImage_from_front/ HTTP/1.1" 200 -
INFO:root:2023-10-01 22:21:59.331979 : Security check : IP adresse '127.0.0.1' connected
INFO:root:2023-10-01 22:21:59.335174 : Security check : IP adresse '127.0.0.1' connected
INFO:werkzeug:127.0.0.1 - - [01/Oct/2023 22:21:59] "POST /myclass/api/getRecodedClassImage_from_front/ HTTP/1.1" 200 -
INFO:werkzeug:127.0.0.1 - - [01/Oct/2023 22:21:59] "POST /myclass/api/GetActiveSessionFormation_List/ HTTP/1.1" 200 -
INFO:root:2023-10-01 22:21:59.341884 : Security check : IP adresse '127.0.0.1' connected
INFO:werkzeug:127.0.0.1 - - [01/Oct/2023 22:21:59] "POST /myclass/api/GetActiveSessionFormation_List/ HTTP/1.1" 200 -
INFO:root:2023-10-01 22:21:59.350043 : Security check : IP adresse '127.0.0.1' connected
INFO:werkzeug:127.0.0.1 - - [01/Oct/2023 22:21:59] "POST /myclass/api/getRecodedClassImage_from_front/ HTTP/1.1" 200 -
INFO:root:2023-10-01 22:21:59.359150 : Security check : IP adresse '127.0.0.1' connected
INFO:werkzeug:127.0.0.1 - - [01/Oct/2023 22:21:59] "POST /myclass/api/GetActiveSessionFormation_List/ HTTP/1.1" 200 -
INFO:root:2023-10-01 22:21:59.367920 : Security check : IP adresse '127.0.0.1' connected
INFO:werkzeug:127.0.0.1 - - [01/Oct/2023 22:21:59] "POST /myclass/api/getRecodedClassImage_from_front/ HTTP/1.1" 200 -
INFO:root:2023-10-01 22:21:59.375368 : Security check : IP adresse '127.0.0.1' connected
INFO:werkzeug:127.0.0.1 - - [01/Oct/2023 22:21:59] "POST /myclass/api/GetActiveSessionFormation_List/ HTTP/1.1" 200 -
INFO:werkzeug:127.0.0.1 - - [01/Oct/2023 22:21:59] "POST /myclass/api/getRecodedClassImage_from_front/ HTTP/1.1" 200 -
INFO:root:2023-10-01 22:21:59.383192 : Security check : IP adresse '127.0.0.1' connected
INFO:werkzeug:127.0.0.1 - - [01/Oct/2023 22:21:59] "POST /myclass/api/GetActiveSessionFormation_List/ HTTP/1.1" 200 -
INFO:root:2023-10-01 22:21:59.388542 : Security check : IP adresse '127.0.0.1' connected
INFO:root:2023-10-01 22:21:59.395227 : Security check : IP adresse '127.0.0.1' connected
INFO:werkzeug:127.0.0.1 - - [01/Oct/2023 22:21:59] "POST /myclass/api/getRecodedClassImage_from_front/ HTTP/1.1" 200 -
INFO:root:2023-10-01 22:21:59.399863 : Security check : IP adresse '127.0.0.1' connected
INFO:werkzeug:127.0.0.1 - - [01/Oct/2023 22:21:59] "POST /myclass/api/GetActiveSessionFormation_List/ HTTP/1.1" 200 -
INFO:werkzeug:127.0.0.1 - - [01/Oct/2023 22:21:59] "POST /myclass/api/getRecodedClassImage_from_front/ HTTP/1.1" 200 -
INFO:werkzeug:127.0.0.1 - - [01/Oct/2023 22:21:59] "POST /myclass/api/GetActiveSessionFormation_List/ HTTP/1.1" 200 -
INFO:root:2023-10-01 22:22:04.914473 : Security check : IP adresse '127.0.0.1' connected
INFO:werkzeug:127.0.0.1 - - [01/Oct/2023 22:22:04] "POST /myclass/api/partner_login/ HTTP/1.1" 200 -
INFO:root:2023-10-01 22:22:05.309682 : Security check : IP adresse '127.0.0.1' connected
INFO:root:2023-10-01 22:22:05.315869 : Security check : IP adresse '127.0.0.1' connected
INFO:root:2023-10-01 22:22:05.320895 : Security check : IP adresse '127.0.0.1' connected
INFO:root:2023-10-01 22:22:05.331591 : Security check : IP adresse '127.0.0.1' connected
INFO:werkzeug:127.0.0.1 - - [01/Oct/2023 22:22:05] "POST /myclass/api/getRecodedImage/ HTTP/1.1" 200 -
INFO:werkzeug:127.0.0.1 - - [01/Oct/2023 22:22:05] "POST /myclass/api/get_partner_class/ HTTP/1.1" 200 -
INFO:werkzeug:127.0.0.1 - - [01/Oct/2023 22:22:05] "POST /myclass/api/LMS_Get_Partner_Data/ HTTP/1.1" 200 -
INFO:root:2023-10-01 22:22:05.405479 : Connexion du partner recid = dbdd36f3d86a73e2bfac7b3f10f062ce1e7c22f7da37de192a OK. Mise à jour du firstconnexion et/ou lastconnexion : OK
INFO:werkzeug:127.0.0.1 - - [01/Oct/2023 22:22:05] "POST /myclass/api/get_partner_account/ HTTP/1.1" 200 -
INFO:root:2023-10-01 22:22:05.434252 : Security check : IP adresse '127.0.0.1' connected
INFO:werkzeug:127.0.0.1 - - [01/Oct/2023 22:22:05] "POST /myclass/api/find_partner_class_like/ HTTP/1.1" 200 -
INFO:root:2023-10-01 22:22:44.050812 : Security check : IP adresse '127.0.0.1' connected
INFO:root:2023-10-01 22:22:44.055480 : Security check : IP adresse '127.0.0.1' connected
INFO:root:2023-10-01 22:22:44.060501 : Security check : IP adresse '127.0.0.1' connected
INFO:werkzeug:127.0.0.1 - - [01/Oct/2023 22:22:44] "POST /myclass/api/getRecodedImage/ HTTP/1.1" 200 -
INFO:root:2023-10-01 22:22:44.078622 : Connexion du partner recid = dbdd36f3d86a73e2bfac7b3f10f062ce1e7c22f7da37de192a OK. Mise à jour du firstconnexion et/ou lastconnexion : OK
INFO:werkzeug:127.0.0.1 - - [01/Oct/2023 22:22:44] "POST /myclass/api/get_partner_account/ HTTP/1.1" 200 -
INFO:werkzeug:127.0.0.1 - - [01/Oct/2023 22:22:44] "POST /myclass/api/LMS_Get_Partner_Data/ HTTP/1.1" 200 -
INFO:root:2023-10-01 22:22:46.051106 : Security check : IP adresse '127.0.0.1' connected
INFO:root:2023-10-01 22:22:46.056618 : Security check : IP adresse '127.0.0.1' connected
INFO:werkzeug:127.0.0.1 - - [01/Oct/2023 22:22:46] "POST /myclass/api/Get_Partner_List_Partner_Client/ HTTP/1.1" 200 -
INFO:werkzeug:127.0.0.1 - - [01/Oct/2023 22:22:46] "POST /myclass/api/Get_List_Partner_Invoice_no_filter/ HTTP/1.1" 500 -
INFO:werkzeug: * Detected change in 'C:\\Users\\billa\\Documents\\myclass.com\\Siteweb\\Production\\Ela_back\\Back_Office\\main.py', reloading
INFO:werkzeug: * Restarting with stat
INFO:root:2023-10-01 22:24:00.457787 : ++++ ENVIRONNEMENT DEVELOPPEMENT ++++
INFO:root:2023-10-01 22:24:00.457787 : ++ DATABASE mongodb://localhost:27017/cherifdb_dev ++
INFO:root:2023-10-01 22:24:00.457787 : ++ DBNAME Database(MongoClient(host=['localhost:27017'], document_class=dict, tz_aware=False, connect=True), 'cherifdb_dev') ++
INFO:root:2023-10-01 22:24:00.457787 : ++ FLASK PORT 5001 ++
INFO:root:2023-10-01 22:24:00.457787 : ++ LMS_BAS_URL mysy-training.com/ ++
WARNING:werkzeug: * Debugger is active!
INFO:werkzeug: * Debugger PIN: 877-541-979
INFO:root:2023-10-01 22:24:11.242792 : Security check : IP adresse '127.0.0.1' connected
INFO:root:2023-10-01 22:24:11.247685 : Security check : IP adresse '127.0.0.1' connected
INFO:root:2023-10-01 22:24:11.253147 : Security check : IP adresse '127.0.0.1' connected
INFO:werkzeug:127.0.0.1 - - [01/Oct/2023 22:24:11] "POST /myclass/api/getRecodedImage/ HTTP/1.1" 200 -
INFO:werkzeug:127.0.0.1 - - [01/Oct/2023 22:24:11] "POST /myclass/api/LMS_Get_Partner_Data/ HTTP/1.1" 200 -
INFO:root:2023-10-01 22:24:11.271921 : Connexion du partner recid = dbdd36f3d86a73e2bfac7b3f10f062ce1e7c22f7da37de192a OK. Mise à jour du firstconnexion et/ou lastconnexion : OK
INFO:werkzeug:127.0.0.1 - - [01/Oct/2023 22:24:11] "POST /myclass/api/get_partner_account/ HTTP/1.1" 200 -
INFO:root:2023-10-01 22:24:11.432419 : Security check : IP adresse '127.0.0.1' connected
INFO:root:2023-10-01 22:24:11.436419 : Security check : IP adresse '127.0.0.1' connected
INFO:werkzeug:127.0.0.1 - - [01/Oct/2023 22:24:11] "POST /myclass/api/Get_Partner_List_Partner_Client/ HTTP/1.1" 200 -
INFO:werkzeug:127.0.0.1 - - [01/Oct/2023 22:24:11] "POST /myclass/api/Get_List_Partner_Invoice_no_filter/ HTTP/1.1" 200 -

113
main.py
View File

@ -4796,6 +4796,119 @@ def Invoice_Partner_Order():
status, retval, invoice_id = partner_invoice.Invoice_Partner_Order(payload)
return jsonify(status=status, message=retval)
# --------------
"""
API Recuperation d'une facture donnée
"""
@app.route('/myclass/api/Get_Given_Partner_Invoice/', methods=['POST','GET'])
@crossdomain(origin='*')
def Get_Given_Partner_Invoice():
# On recupere le corps (payload) de la requete
payload = mycommon.strip_dictionary (request.form.to_dict())
print(" ### Get_Given_Partner_Invoice payload = ",payload)
status, retval, invoice_id = partner_invoice.Get_Given_Partner_Invoice(payload)
return jsonify(status=status, message=retval)
"""
API Recuperation des lignes d'une facture à partir de l'invoice_header_id, sans entete
"""
@app.route('/myclass/api/Get_Given_Partner_Invoice_Lines/', methods=['POST','GET'])
@crossdomain(origin='*')
def Get_Given_Partner_Invoice_Lines():
# On recupere le corps (payload) de la requete
payload = mycommon.strip_dictionary (request.form.to_dict())
print(" ### Get_Given_Partner_Invoice_Lines payload = ",payload)
status, retval, invoice_id = partner_invoice.Get_Given_Partner_Invoice_Lines(payload)
return jsonify(status=status, message=retval)
"""
API Recuperation des lignes d'une commande à partir de l' invoice_header_ref_interne, sans entete
"""
@app.route('/myclass/api/Get_Given_Partner_Invoice_Lines_From_Invoice_ref_interne/', methods=['POST','GET'])
@crossdomain(origin='*')
def Get_Given_Partner_Invoice_Lines_From_Invoice_ref_interne():
# On recupere le corps (payload) de la requete
payload = mycommon.strip_dictionary (request.form.to_dict())
print(" ### Get_Given_Partner_Invoice_Lines_From_Invoice_ref_interne payload = ",payload)
status, retval, invoice_id = partner_invoice.Get_Given_Partner_Invoice_Lines_From_Invoice_ref_interne(payload)
return jsonify(status=status, message=retval)
"""
API : Recuperation de la liste des factures d'un partner
"""
@app.route('/myclass/api/Get_List_Partner_Invoice_no_filter/', methods=['POST','GET'])
@crossdomain(origin='*')
def Get_List_Partner_Invoice_no_filter():
# On recupere le corps (payload) de la requete
payload = mycommon.strip_dictionary (request.form.to_dict())
print(" ### Get_List_Partner_Invoice_no_filter payload = ",payload)
status, retval = partner_invoice.Get_List_Partner_Invoice_no_filter(payload)
return jsonify(status=status, message=retval)
"""
API Recuperation de la liste des factures avec des filtres.
les filtres acceptés sont :
- ref_interne_cmd (commande)
- ref_interne_invoice
- ref_externe
- invoice_date entre date_debut et date_fin
- nom_client
"""
@app.route('/myclass/api/Get_List_Partner_Invoice_with_filter/', methods=['POST','GET'])
@crossdomain(origin='*')
def Get_List_Partner_Invoice_with_filter():
# On recupere le corps (payload) de la requete
payload = mycommon.strip_dictionary (request.form.to_dict())
print(" ### Get_List_Partner_Invoice_with_filter payload = ",payload)
status, retval = partner_invoice.Get_List_Partner_Invoice_with_filter(payload)
return jsonify(status=status, message=retval)
"""
Cette API permet de récupérer une ligne de detail d'une facture donnée
c'est a dire, une ligne de la collection 'partner_invoice_line'
"""
@app.route('/myclass/api/Get_Given_Line_Of_Partner_Invoice_Lines/', methods=['POST','GET'])
@crossdomain(origin='*')
def Get_Given_Line_Of_Partner_Invoice_Lines():
# On recupere le corps (payload) de la requete
payload = mycommon.strip_dictionary (request.form.to_dict())
print(" ### Get_Given_Line_Of_Partner_Invoice_Lines payload = ",payload)
status, retval = partner_invoice.Get_Given_Line_Of_Partner_Invoice_Lines(payload)
return jsonify(status=status, message=retval)
"""
API Impression PDF d'une facture
"""
@app.route('/myclass/api/GerneratePDF_Partner_Invoice/', methods=['POST','GET'])
@crossdomain(origin='*')
def GerneratePDF_Partner_Invoice():
# On recupere le corps (payload) de la requete
payload = mycommon.strip_dictionary (request.form.to_dict())
print(" ### GerneratePDF_Partner_Invoice payload = ",payload)
status, retval = partner_invoice.GerneratePDF_Partner_Invoice(payload)
return jsonify(status=status, message=retval)
"""
API Envoie de la facture par email
"""
@app.route('/myclass/api/Send_Partner_Invoice_By_Email/', methods=['POST','GET'])
@crossdomain(origin='*')
def Send_Partner_Invoice_By_Email():
# On recupere le corps (payload) de la requete
payload = mycommon.strip_dictionary (request.form.to_dict())
print(" ### Send_Partner_Invoice_By_Email payload = ",payload)
status, retval = partner_invoice.Send_Partner_Invoice_By_Email(payload)
return jsonify(status=status, message=retval)
if __name__ == '__main__':

File diff suppressed because it is too large Load Diff

View File

@ -3237,7 +3237,6 @@ def Get_Given_Partner_Order_Lines_From_order_ref_interne(diction):
Recuperation d'un commande en partant de la reference interne et du token
"""
def Get_Given_Partner_Order_From_Internal_ref(diction):
try:
@ -4538,10 +4537,25 @@ def Send_Partner_Order_By_Email(diction):
msg.set_content(sourceHtml, subtype='html')
smtpserver = smtplib.SMTP(MYSY_GV.O365_SMTP_COUNT_smtpsrv, MYSY_GV.O365_SMTP_COUNT_port)
client_main_mail_tmp = ""
client_invoice_email_tmp = ""
if ('email' in Order_header_client_data.keys()):
client_main_mail_tmp = Order_header_client_data['email']
if ('invoice_email' in Order_header_client_data.keys()):
client_invoice_email_tmp = Order_header_client_data['invoice_email']
if (mycommon.isEmailValide(client_main_mail_tmp) is True):
msg['To'] = client_main_mail_tmp
if (mycommon.isEmailValide(client_invoice_email_tmp) is True):
msg['Cc'] = client_invoice_email_tmp
msg['From'] = MYSY_GV.O365_SMTP_COUNT_From_User
msg['Bcc'] = 'contact@mysy-training.com'
msg['Subject'] = sujetHtml
msg['To'] = "billardman01@hotmail.com"
smtpserver.ehlo()
smtpserver.starttls()
@ -4555,7 +4569,7 @@ def Send_Partner_Order_By_Email(diction):
except Exception as e:
exc_type, exc_obj, exc_tb = sys.exc_info()
print(str(inspect.stack()[0][3]) + " -" + str(e) + " - ERRORRRR AT Line : " + str(exc_tb.tb_lineno))
return False, "Impossible d'envoyer l'email"
return False, "Impossible d'envoyer la commande par email"