__islocal equivalent in server side script

https://frappe.github.io/erpnext/user/manual/en/customize-erpnext/custom-scripts/custom-script-examples/make-read-only-after-saving

Is there a Python equivalent for the __islocal property ?

Answering my own question :stuck_out_tongue:

self.get("__islocal") does the job

Good

Better way you can use

self.is_new()

2 Likes

Ah that’s nice. I’m curious to know the difference though.