From 9c3dcfea76f0f0e0b163bf5b3d2ad9a0ada83ed4 Mon Sep 17 00:00:00 2001 From: Suraj Shetty Date: Mon, 24 Dec 2018 17:00:40 +0530 Subject: [PATCH] Add a patch to rename accounts desktop icon to accounting --- erpnext/patches.txt | 3 ++- .../rename_accounts_desktop_icon_to_accounting.py | 10 ++++++++++ ...t_desktop_icon_with_projects_module_desktop_icon.py | 0 3 files changed, 12 insertions(+), 1 deletion(-) create mode 100644 erpnext/patches/v12_0/rename_accounts_desktop_icon_to_accounting.py rename erpnext/patches/{v11_0 => v12_0}/replace_project_list_desktop_icon_with_projects_module_desktop_icon.py (100%) diff --git a/erpnext/patches.txt b/erpnext/patches.txt index 847182f77e..9fec3824c1 100755 --- a/erpnext/patches.txt +++ b/erpnext/patches.txt @@ -579,4 +579,5 @@ 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 +erpnext.patches.v12_0.replace_project_list_desktop_icon_with_projects_module_desktop_icon +erpnext.patches.v12_0.rename_accounts_desktop_icon_to_accounting diff --git a/erpnext/patches/v12_0/rename_accounts_desktop_icon_to_accounting.py b/erpnext/patches/v12_0/rename_accounts_desktop_icon_to_accounting.py new file mode 100644 index 0000000000..5c1c8fb7ec --- /dev/null +++ b/erpnext/patches/v12_0/rename_accounts_desktop_icon_to_accounting.py @@ -0,0 +1,10 @@ +import frappe +from frappe import _ + +def execcute(): + accounts_module_icons = frappe.get_all('Desktop Icon', filters={ + 'module_name': 'Accounts' + }, fields=['name']) + + for icon in accounts_module_icons: + frappe.db.set_value('Desktop Icon', icon.name, 'label', _('Accounting')) \ No newline at end of file diff --git a/erpnext/patches/v11_0/replace_project_list_desktop_icon_with_projects_module_desktop_icon.py b/erpnext/patches/v12_0/replace_project_list_desktop_icon_with_projects_module_desktop_icon.py similarity index 100% rename from erpnext/patches/v11_0/replace_project_list_desktop_icon_with_projects_module_desktop_icon.py rename to erpnext/patches/v12_0/replace_project_list_desktop_icon_with_projects_module_desktop_icon.py