How to create a desktop icons with my DocTypes

I create 3 Modules (Geral, Fiscal and Estoque)… for each module, I have at least 3 doctypes…

I need to create a Icon on Desktop for each module (Geral, Fiscal and Estoque). when I click on these icon, show me DocTypes inside that…

How can I do that? I tried these on desktop.py. file:

def get_data():
	return [
		{
			"module_name": "Geral",
			"color": "#f39c12",
			"icon": "octicon octicon-package",
			"type": "link",
			"link": "List/Geral"
		},
	]

But nothing happen! Any idea?!

Using latest version of frappe

1 Like

Hi, I think that it should be:

def get_data():
	return [
		{
			"module_name": "Geral",
			"color": "#f39c12",
			"icon": "octicon octicon-package",
			"type": "module",
			"label": _("Geral")
		}
	]

Doesn’t work… I tried before…

Here is my desktop.py

def get_data():
	return [
		{
			"module_name": "Geral",
			"color": "#f39c12",
			"icon": "octicon octicon-package",
			"type": "module",
			"label": _("Geral")
		},
	]

These is the /Users/fellipeh/Developer/frappe/frappe-bench/apps/erpbr/erpbr/config/desktop.py

If I go to. Ctrl+G and type. New Pessoa (these DocType is inside Geral module) works fine…

Here is my desktop:

45

Did you do a bench migrate after edited the files?

works fine now…

I think on these new version every change, we need to run. bench migrate

1 Like