Doctypes are not showen in my Module

Hello ,
I have an old app on v10, and i instaled it to new v12 instance.
it contains several modules in each module new doctypes
my modules are

Charity
Administrative Communication
HR Services
Donation
Beneficiaries

  • I add new .py file in config folder
    example
    donation.py
from __future__ import unicode_literals
from frappe import _

def get_data():
	return [
	{
	"label": _("Donation"),
	"items": [
			{
				"type": "doctype",
				"name": "Donation Permission",
				"onboard": 1
			},
			{
				"type": "doctype",
				"name": "Donation Campaign",
				"onboard": 1
			},
			{
				"type": "doctype",
				"name": "Donation Payment",
				"onboard": 1
			},
		]
	},
	{
	"label": _("Tools"),
	"items": [
		{
			"type": "doctype",
			"label": _("Donation Category"),
			"name": "Donation Category",
			"icon": "fa fa-sitemap",
			"link": "Tree/Donation Category",
		},
		{
			"type": "doctype",
			"name": "Donation Settings",
			"label": _("Donation Settings"),
		},
	]
	},
	{
	"label": _("Donor"),
	"items": [
		{
			"type": "doctype",
			"name": "Donor",
			"description": _("Donor information."),
		},
		{
			"type": "doctype",
			"name": "Donor Type",
			"description": _("Donor Type information."),
		}
	]
	},
	{
	"label": _("Membership"),
	"items": [
		{
			"type": "doctype",
			"name": "Member",
			"description": _("Member information."),
		},
		{
			"type": "doctype",
			"name": "Membership",
			"description": _("Memebership Details"),
		},
		{
			"type": "doctype",
			"name": "Membership Type",
			"description": _("Memebership Type Details"),
		},
	]
	},
	{
	"label": _("Chapter"),
	"icon": "fa fa-star",
	"items": [
		{
			"type": "doctype",
			"name": "Chapter",
			"description": _("Chapter information."),
		}
	]
	},
	]
  • the module is shone in the board successfully

io

  • the problem is when selecting the module some of the doctypes are not showing
    ps: iam admin with all the roles and the doctypes work normally with no problem

my problem that it not shown inside

my apps are

Installed Apps

Bench Manager: v0.0.1 (v12)

Charity: v0.0.1 (v12)

ERPNext: v12.4.3 (version-12)

Frappe Framework: v12.2.1 (version-12)

how can i fix this and if anyone had the same problem ??
best regards

after tracing the code i found some clu

when i change the line 2

doctypes = build_domain_restriced_doctype_cache()

I think we need to trace the cache more

Try check the checkbox “Custom?” in Doctype screen.
I had the same issue, and I manged to display my Doctypes in my Module Page by doing the above.

I hope this will help you.
Good Luck!

1 Like

To be visible, you must:
Check the Custom? field in the DocType.
Select which module section from within DocType.
I still don’t know how to add module sections for each app!

if I created a new app the new doc is not custom …
it was a code problem from the cache as I said previously the cache update when login and there was a problem with it.
cache functionality needs more revision I think