Changed case in modules.txt
diff --git a/erpnext/modules.txt b/erpnext/modules.txt
index 92614d8..32547e9 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 1ff3136..938beeb 100644
--- a/erpnext/patches.txt
+++ b/erpnext/patches.txt
@@ -47,6 +47,7 @@
 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 0000000..21edb58
--- /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")