Added new get traceback in order ack functionality

main
vrashank 9 months ago
parent 6e7500838a
commit 0a82f17d91

@ -157,10 +157,10 @@ def submit_order_acknowledgement(path: str, schedule_shipped_date: str, ack_type
formatted_data = format_sales_order_ack(response.json(),schedule_shipped_date, ack_type)
frappe.log_error(title="Formatted SO Ack Payload", message=f"{formatted_data}")
# Sales order ack functionality
ack_response = sales_order_acknowledgement(data=formatted_data,path=path)
# ack_response = {
# "path":"/in/ACK_a86e370c-43b9-3db1-b6bd-6289a132448f}-d76e3c43e0024359960669e9855509ce.dat",
# "url":"https://api.spscommerce.com/transactions/v5/data/in/ACK_a86e370c-43b9-3db1-b6bd-6289a132448f}-d76e3c43e0024359960669e9855509ce.dat"}
# ack_response = sales_order_acknowledgement(data=formatted_data,path=path)
ack_response = {
"path":"/in/ACK_a86e370c-43b9-3db1-b6bd-6289a132448f}-d76e3c43e0024359960669e9855509ce.dat",
"url":"https://api.spscommerce.com/transactions/v5/data/in/ACK_a86e370c-43b9-3db1-b6bd-6289a132448f}-d76e3c43e0024359960669e9855509ce.dat"}
if ack_response:
ack_path = ack_response.get("path")
if frappe.db.exists("Sales Order", {"name": sales_order, "docstatus": 1}):
@ -173,4 +173,5 @@ def submit_order_acknowledgement(path: str, schedule_shipped_date: str, ack_type
frappe.log_error(title="Payload for Ord ACK error",message=f"{response.json()}")
frappe.log_error(title="Testing functionality order ack", message=f"Order Ack Required Stuff: {path}\\n{schedule_shipped_date}\\n{ack_type}")
except Exception as e:
frappe.log_error(title="Error while ack the order through button", message=f"{str(e)}")
# frappe.log_error(title="Error while ack the order through button", message=f"{str(e)}")
frappe.log_error(title="Error while ack the order through button", message=str(frappe.get_traceback()))
Loading…
Cancel
Save