Immutable Doctype

How to make an Immutable doctype where all the fields are read-only, the same as the GL Entry doctype in ERPNext?

I think by not giving anyone write/create permissions, the doctype documents becomes immutable.

See Permission Rules in the GL Entry DocType:

1 Like

Also
check the box of User Cannot Create.

another option.
you can we form readonly from javascript on refresh or onload.

2 Likes

@Omar-Abdullah
@Sudhanshu
Thanks for your replies.

I did that already, but it appears that the documents of that un-editable doctype must be created automatically to make their fields read-only, as in the GL Entry and Stock Ledger Entry doctypes. Also, I have found, if you created a document from this un-editable doctype manually, you will still be able to edit it! I have tried this with the core GL Entry doctype on my local environment.