Replace desktop icon for project list with desktop icon for projects module
- Add a patch to fix already install instances
diff --git a/erpnext/config/desktop.py b/erpnext/config/desktop.py
index cdb2e75..2f589ab 100644
--- a/erpnext/config/desktop.py
+++ b/erpnext/config/desktop.py
@@ -38,12 +38,10 @@
"link": "List/Employee"
},
{
- "module_name": "Project",
- "_doctype": "Project",
+ "module_name": "Projects",
"color": "#8e44ad",
"icon": "octicon octicon-rocket",
- "type": "link",
- "link": "List/Project"
+ "type": "module",
},
{
"module_name": "Issue",
diff --git a/erpnext/patches.txt b/erpnext/patches.txt
index 4a67eb4..847182f 100755
--- a/erpnext/patches.txt
+++ b/erpnext/patches.txt
@@ -579,3 +579,4 @@
erpnext.patches.v11_0.update_delivery_trip_status
erpnext.patches.v10_0.repost_gle_for_purchase_receipts_with_rejected_items
erpnext.patches.v11_0.set_missing_gst_hsn_code
+erpnext.patches.v11_0.replace_project_list_desktop_icon_with_projects_module_desktop_icon
diff --git a/erpnext/patches/v11_0/replace_project_list_desktop_icon_with_projects_module_desktop_icon.py b/erpnext/patches/v11_0/replace_project_list_desktop_icon_with_projects_module_desktop_icon.py
new file mode 100644
index 0000000..daa6725
--- /dev/null
+++ b/erpnext/patches/v11_0/replace_project_list_desktop_icon_with_projects_module_desktop_icon.py
@@ -0,0 +1,24 @@
+import frappe
+
+def execute():
+ frappe.db.sql("""DELETE
+ FROM `tabDesktop Icon`
+ WHERE
+ `module_name` in ('Project', 'Projects') AND
+ `standard`=1 AND
+ `app`='erpnext'
+ """)
+
+ desktop_icon = frappe.get_doc({
+ 'doctype': 'Desktop Icon',
+ 'idx': 5,
+ 'standard': 1,
+ 'app': 'erpnext',
+ 'owner': 'Administrator',
+ 'module_name': 'Projects',
+ 'color': '#8e44ad',
+ 'icon': 'octicon octicon-rocket',
+ 'type': 'module'
+ })
+
+ desktop_icon.save()