Could someone tell me what I am doing wrong here? I have like around 10,000 DOs that I am trying to submit via bench execute code. But nothing seem to happen, I get nothing on the console also. Any ideas what I am doing wrong?
@frappe.whitelist() def submit_do(): for name in frappe.get_all("Delivery Note"): doc = frappe.get_doc("Delivery Note", name) print(doc) if doc.docstatus == 0: doc.cancel() doc.submit() frappe.db.commit()