Is there a way to amend a document via Python?

I wish to cancel a document and then amend it via a Python method is there a method or no.

There’s a method call frappe.copy_doc but I’m not sure it meets your need.


I’ll take a look at it