Let’s use a better example, and try to delete a customer. The function signature for for
delete_doc is something like this:
In ERPNext, customers are stored in a DocType named “Customer”.
Let’s say we have many customers in our database.
But we want to delete the one with name = “CUST-0005”.
I would write my function exactly like this:
That Python function would look like this in SQL:
DELETE FROM `tabCustomer`
WHERE name = 'CUST-0005'
Hopefully this makes more sense now.
There is a DocType in the Frappe App named “ToDo” (representing a list of things ‘to do’). Many of the official Test Scripts and Examples are written about this “ToDo” document. I don’t know why it was chosen.