Custom Checkbox

I don’t know if this is meant to be like this, but when I select the ‘custom’ option in a new doc type , it appears in the document section of that module… If I do not select it, it does not appear . But by making the doc type custom the respective files are not created in the server (.py, .is etc) .
I need the files to be created as well as the documents to be visible in the module. Am I missing something ? Or is the approach incorrect ? How can i make doc types just like the ones which are existing in the erpnext ?


Steps to Create Doctype:
1.Set Developer mode as 1 of particular site.
2.Open ‘Doctype’ form.
3.Select Module
4.Check ‘Custom ?’ checkbox.
5.Enter fields info in ‘Fields’ datagrid.
6.Give Permission in ‘Permission Rules’ datagrid.
7.Click on ‘Save’ button and give the doctype name.

i have followed the same. Will this create the necessary files in the
server? i need to write server scripts for some of them.


If custom is selected while creating the doctype, you wont be able to write server side script. To create .py files you need to uncheck custom while creating the doctype.

The document must be visible in the module you have specified. Make sure you have the permissions to view the doctype.

Why is this?

1 Like

Server-side scripts can only be written if there’s a python file.

I think the ‘custom doctypes’ are for users who don’t have server-side code and don’t need to use python scripts. (Eg. Customizations to be done can be achieved via js/custom script)

If you want to create a new doctype and handle it’s back-end operations via python, you need to make sure it’s not a ‘custom’ doctype. But as previously mentioned, you need to be on developer mode for the necessary files to be generated for your new doctype.

1 Like

Thank you @littlehera

1 Like

One more thing to add to @littlehera’s recommendation.

Always keep your own doctypes in a custom app rather than add them to ERPNext’s app.

Same goes for Custom Fields, Custom Scripts.