From 4a069a1e7f2f9e1a6f8bf50463a4cf2fe6931039 Mon Sep 17 00:00:00 2001 From: Anand Doshi Date: Fri, 6 Jun 2014 16:28:03 +0530 Subject: [PATCH] Changed case in modules.txt --- erpnext/modules.txt | 24 +++++++++---------- erpnext/patches.txt | 1 + .../patches/v4_0/fix_case_of_hr_module_def.py | 11 +++++++++ 3 files changed, 24 insertions(+), 12 deletions(-) create mode 100644 erpnext/patches/v4_0/fix_case_of_hr_module_def.py diff --git a/erpnext/modules.txt b/erpnext/modules.txt index 92614d87e5..32547e957f 100644 --- a/erpnext/modules.txt +++ b/erpnext/modules.txt @@ -1,12 +1,12 @@ -accounts -buying -home -hr -manufacturing -projects -selling -setup -stock -support -utilities -contacts +Accounts +Buying +Home +HR +Manufacturing +Projects +Selling +Setup +Stock +Support +Utilities +Contacts diff --git a/erpnext/patches.txt b/erpnext/patches.txt index 1ff3136bb7..938beeb0d7 100644 --- a/erpnext/patches.txt +++ b/erpnext/patches.txt @@ -47,6 +47,7 @@ erpnext.patches.v4_0.update_account_root_type execute:frappe.delete_doc("Report", "Purchase In Transit") erpnext.patches.v4_0.new_address_template execute:frappe.delete_doc("DocType", "SMS Control") +erpnext.patches.v4_0.fix_case_of_hr_module_def # WATCHOUT: This patch reload's documents erpnext.patches.v4_0.reset_permissions_for_masters diff --git a/erpnext/patches/v4_0/fix_case_of_hr_module_def.py b/erpnext/patches/v4_0/fix_case_of_hr_module_def.py new file mode 100644 index 0000000000..21edb5861a --- /dev/null +++ b/erpnext/patches/v4_0/fix_case_of_hr_module_def.py @@ -0,0 +1,11 @@ +# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors +# MIT License. See license.txt + +from __future__ import unicode_literals +import frappe + +def execute(): + hr = frappe.db.get_value("Module Def", "HR") + if hr == "Hr": + frappe.rename_doc("Module Def", "Hr", "HR") + frappe.db.set_value("Module Def", "HR", "module_name", "HR")