Custom app calling doctypes from different modules

where u are saving it? the file name and the path

its the new app.
So i ran bench new-app membership
Then I went to cd /apps/membership/membership/config/desktop.py

i got it …so you have to save in

/apps/membership/membership/config/desktop.py:

def get_data():
        return [
                {
                        "module_name": "Membership",
                        "color": "#1777CB",
                        "icon": "fa fa-users",
                        "type": "module",
                        "label": _("Membership")
                }]

and in apps/membership/membership/config/membership.py

def get_data():
    return [

{
                        "label": _("Masters"),
                        "items": [
                                                       {
                                {
                                        "type": "doctype",
                                        "name": "Customer",                                                                                                                                                           "description": _("Customer database.")
                                },
                                {
                                        "type": "doctype",
                                        "name": "Supplier",
                                        "description": _("Supplier database.")
                                },
                                {
                                        "type": "doctype",
                                        "name": "Item",
                                },
                                {
                                        "type": "doctype",
                                        "name": "Asset",
                                },
                                {
                                        "type": "doctype",
                                        "name": "Asset Category",
                                },
                                }
                        ]
                }
        ]

Perfect I think this makes sense, only issue is there is no memebership.py

Should i just create one?

Yes you have to create it manually :slight_smile:
You can check the config folder of ERPNext for reference.

Awesome sauce! I did I reinstalled the app and it did create the membership.pyc but nothing shows. The app does show and the test doctype I attached in the front end. But none of the backend code is showing. The other doctypes arent pulling through though.

Hello All,

I have the same problem. I have made sure that my desktop.py and mymodule.py code are correct. I have read the codes from erpnext config folder as example. But, my module only showing doctype from it’s own module. Not from other ERPNext modules.

I realy need your help.

Thankyou so much :slight_smile:

My bad,

It was just a typo on mymodule.py.

I’m now able to show doctypes from another modules :slight_smile:

Thanks!