Replace desktop icon for project list with desktop icon for projects module

- Add a patch to fix already install instances
This commit is contained in:
Suraj Shetty 2018-12-20 20:12:37 +05:30
parent a8d9bfdcfd
commit b0a84f014e
3 changed files with 27 additions and 4 deletions

View File

@ -38,12 +38,10 @@ def get_data():
"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",

View File

@ -579,3 +579,4 @@ erpnext.patches.v10_0.update_user_image_in_employee
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

View File

@ -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()