I know that in JavaScript, we can check if a document is new by using frm.is_new()
or frm.doc.docstatus
. Is there a similar function in Python, like self.is_new()
?
I would like to call a controller method specifically on insert and update. Unfortunately, there is no controller method available that runs only on save. The before_insert
method is triggered during insert, but there’s no equivalent method available solely for updates. The save controller is called for both insert and update.
https://frappeframework.com/docs/user/en/basics/doctypes/controllers