Try ERPNext Buy Support Partners Foundation

How can i access my custom_doctypes from server side?

Hello everyone,

We have a setup of erpnext on Ubuntu desktop. on it we have created our custom app and installed it on localhost/site1.local at 8000 port.(we can see our custom app on desk.)
so, we have created a doctype under the custom module from “doctype_list”.(It is also visible on desk under my custom_module tile).
Now, my doubt is whether the .py and .js files regarding that module are generated automatically or i have to create them manually under my custom_app folder?
OR
From where can i see my created doctype from server side? is there any file/folder created somewhere?
(Table is created in database)
(developer_mode is 1)
Could you please help me ??

Thanks & Regards

Hi,
Custom Doctype you have created will be searched from awesome bar if it is not child doctype.
For custom doctype you don’t need to create files for custom_doctype. You will get all the files at frappe_bench/custom_doc/custom_doc/custom_doc/doctype/custom_doc folder which is created by erp itself.
You can write your .js and .py code in respective files

Hello,
Thank you for the reply.
There is no such folder created called “doctype” at frappe-bench/custom_doc/custom_doc/custom_doc

You can access your custom doctypes at the below path.

frappe-bench/apps/[custom_app_name]/[custom_app_name]/[custom_app_name]/doctype/[custom_doctype_name]/

Thanks Kartik. I was also expecting same but strangely Doctype folder is not showing under custom app(CRMDEV) folder. Can be seen below screenshot.

Please let me know what I am missing as doctype created under custom app (CRMDEV) is showing in Desk and working but not visible in directory folder

Thanks,
Aishwarya

Try exporting the customization’s and check.

This is also not working for me.
Bench migrate is successful after export customization but, Doctype folder is not appearing in Custom_app.

@Aishwarya_Daware check if the highlighted field below is checked in your custom doctype. If so, uncheck it. It should create the directory then.

Thanks Kartik… This works for me :grinning:

1 Like

Now when Custom Doctype related files generated under custom folder.
Those disappears from the desk :fearful:.

However I am able to search custom Doctype from awesome bar

Doctype in Custom App folder

Same Doctype is not visible in ui

Any response much appreciated
Thanks

Hello,

In doctype you can select “Show in Module Section” so it will show default in Document, Setup, System or Other.

Also alternatively you can create Desktop Icon and Desk Config.

for Desktop Icon please refer following code:

For Desk Link, create .py file in config folder.
e.g. for CRM module ERPNext has following file.

After bench migrate new desktop icons will be set.

Thanks for the reply and information to troubleshoot.
Let me work on the same.