Good morning, i need to submit a sales order using (eventually) the python frappe client (GitHub - frappe/frappe-client: Python library to use Frappe API).
There is a submit function for docs but i cannot understand how it works, it wants a doclist as parameter, but everything i pass as parameter, the api responses that i haven’t passe any parameter.
You need to progress through the docstatus just like you would in the UI. 0=draft, 1=submitted, 2=cancelled
from frappeclient import FrappeClient
client = FrappeClient("example.com", "user@example.com", "password")
# Prepare a customer dict that we will use to create a new
# customer in ERPNext
doc = {"doctype": "Sales Order",
# more required fields ...}
# create new record in ERPNext
client.insert(doc)
# submit this record
client.submit(doc)
i also tried to retrieve a doc (sales order) from erp and the submitting it alone, or creating a list and inserting it into the list, but i have ever the same error (the insert works well, the submit donesn’t)