Hello Mates,
I just imported 100,000+ Sales Invoices and realized that I have made a mistake in data. Can you help me delete all records in this DocType?
I have tried the following bench console command method but seems it is not working:
for invoice in frappe.get_list(‘Sales Invoice’):
invoice = frappe.get_doc(‘Sales Invoice’, invoice.name)
invoice.cancel()
invoice.delete()
Maybe use the frappe.db.set_value(doctype, name, fieldname, value) method to change the value in Sales Invoice status to Cancelled. My use of the api has been limited. Make a back up before proceeding or clone the existing instance and use the duplicate to test with if possible.
Hi @satishvijayan, I have used Bench CLI to import large amount of data. Our 600,000+ journals took 24+ hours to import. I have also used tmux to run the process without keeping the session on.
You can also import using: bench --site sitename data-import --doctype Item --file /path/to/file.csv