[rename] Customer Issue -> Warranty Claim
diff --git a/erpnext/config/support.py b/erpnext/config/support.py
index 2ed2c5f..54219c5 100644
--- a/erpnext/config/support.py
+++ b/erpnext/config/support.py
@@ -13,8 +13,8 @@
 				},
 				{
 					"type": "doctype",
-					"name": "Customer Issue",
-					"description": _("Customer Issue against Serial No."),
+					"name": "Warranty Claim",
+					"description": _("Warranty Claim against Serial No."),
 				},
 				{
 					"type": "doctype",
diff --git a/erpnext/controllers/js/contact_address_common.js b/erpnext/controllers/js/contact_address_common.js
index 77f4742..88a7f9e 100644
--- a/erpnext/controllers/js/contact_address_common.js
+++ b/erpnext/controllers/js/contact_address_common.js
@@ -20,7 +20,7 @@
 				docname = last_route.slice(2).join("/");
 
 			if(["Customer", "Quotation", "Sales Order", "Sales Invoice", "Delivery Note",
-				"Installation Note", "Opportunity", "Customer Issue", "Maintenance Visit",
+				"Installation Note", "Opportunity", "Warranty Claim", "Maintenance Visit",
 				"Maintenance Schedule"]
 				.indexOf(doctype)!==-1) {
 				var refdoc = frappe.get_doc(doctype, docname);
diff --git a/erpnext/patches.txt b/erpnext/patches.txt
index 849e953..147525e 100644
--- a/erpnext/patches.txt
+++ b/erpnext/patches.txt
@@ -110,3 +110,4 @@
 erpnext.patches.v5_0.update_item_name_in_bom
 execute:frappe.reload_doc('crm', 'doctype', 'lead')
 execute:frappe.reload_doc('crm', 'doctype', 'opportunity')
+erpnext.patches.v5_0.rename_customer_issue
diff --git a/erpnext/patches/repair_tools/fix_naming_series_records_lost_by_reload.py b/erpnext/patches/repair_tools/fix_naming_series_records_lost_by_reload.py
index 80e7437..0baed6b 100644
--- a/erpnext/patches/repair_tools/fix_naming_series_records_lost_by_reload.py
+++ b/erpnext/patches/repair_tools/fix_naming_series_records_lost_by_reload.py
@@ -13,7 +13,7 @@
 	'Attendance': 'ATT-',
 	'C-Form': 'C-FORM-',
 	'Customer': 'CUST-',
-	'Customer Issue': 'CI-',
+	'Warranty Claim': 'CI-',
 	'Delivery Note': 'DN-',
 	'Installation Note': 'IN-',
 	'Item': 'ITEM-',
diff --git a/erpnext/patches/v4_0/set_naming_series_property_setter.py b/erpnext/patches/v4_0/set_naming_series_property_setter.py
index d62d845..bd4ed91 100644
--- a/erpnext/patches/v4_0/set_naming_series_property_setter.py
+++ b/erpnext/patches/v4_0/set_naming_series_property_setter.py
@@ -10,7 +10,7 @@
 	'Attendance': 'ATT-',
 	'C-Form': 'C-FORM-',
 	'Customer': 'CUST-',
-	'Customer Issue': 'CI-',
+	'Warranty Claim': 'CI-',
 	'Delivery Note': 'DN-',
 	'Installation Note': 'IN-',
 	'Item': 'ITEM-',
diff --git a/erpnext/patches/v5_0/rename_customer_issue.py b/erpnext/patches/v5_0/rename_customer_issue.py
new file mode 100644
index 0000000..c3c38a7
--- /dev/null
+++ b/erpnext/patches/v5_0/rename_customer_issue.py
@@ -0,0 +1,5 @@
+import frappe
+
+def execute():
+	if frappe.db.table_exists("tabCustomer Issue"):
+		frappe.rename_doc("DocType", "Customer Issue", "Warrany Claim")
diff --git a/erpnext/public/js/feature_setup.js b/erpnext/public/js/feature_setup.js
index 536f956..91720f2 100644
--- a/erpnext/public/js/feature_setup.js
+++ b/erpnext/public/js/feature_setup.js
@@ -64,7 +64,7 @@
 		'Stock Ledger Entry': {'fields':['batch_no']}
 	},
 	'fs_item_serial_nos': {
-		'Customer Issue': {'fields':['serial_no']},
+		'Warranty Claim': {'fields':['serial_no']},
 		'Delivery Note': {'items':['serial_no'],'packed_items':['serial_no']},
 		'Installation Note': {'items':['serial_no']},
 		'Item': {'fields':['has_serial_no']},
@@ -155,7 +155,7 @@
 		'Sales Order': {'fields':['sales_team']}
 	},
 	'fs_more_info': {
-		"Customer Issue": {"fields": ["more_info"]},
+		"Warranty Claim": {"fields": ["more_info"]},
 		'Material Request': {'fields':['more_info']},
 		'Lead': {'fields':['more_info']},
 		'Opportunity': {'fields':['more_info']},
diff --git a/erpnext/startup/notifications.py b/erpnext/startup/notifications.py
index eccd1d2..66bc83d 100644
--- a/erpnext/startup/notifications.py
+++ b/erpnext/startup/notifications.py
@@ -8,7 +8,7 @@
 	return { "for_doctype": 
 		{
 			"Issue": {"status":"Open"},
-			"Customer Issue": {"status":"Open"},
+			"Warranty Claim": {"status":"Open"},
 			"Task": {"status":"Open"},
 			"Lead": {"status":"Open"},
 			"Contact": {"status":"Open"},
diff --git a/erpnext/support/doctype/customer_issue/README.md b/erpnext/support/doctype/customer_issue/README.md
deleted file mode 100644
index 0560abe..0000000
--- a/erpnext/support/doctype/customer_issue/README.md
+++ /dev/null
@@ -1 +0,0 @@
-Issue raised by Customer, can be tagged against Invoice, Serial Number to verify warranty, service contract.
\ No newline at end of file
diff --git a/erpnext/support/doctype/customer_issue/__init__.py b/erpnext/support/doctype/customer_issue/__init__.py
deleted file mode 100644
index baffc48..0000000
--- a/erpnext/support/doctype/customer_issue/__init__.py
+++ /dev/null
@@ -1 +0,0 @@
-from __future__ import unicode_literals
diff --git a/erpnext/support/doctype/customer_issue/test_customer_issue.py b/erpnext/support/doctype/customer_issue/test_customer_issue.py
deleted file mode 100644
index 88f54e2..0000000
--- a/erpnext/support/doctype/customer_issue/test_customer_issue.py
+++ /dev/null
@@ -1,10 +0,0 @@
-# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors and Contributors
-# See license.txt
-
-import frappe
-import unittest
-
-test_records = frappe.get_test_records('Customer Issue')
-
-class TestCustomerIssue(unittest.TestCase):
-	pass
diff --git a/erpnext/support/doctype/customer_issue/test_records.json b/erpnext/support/doctype/customer_issue/test_records.json
deleted file mode 100644
index cb3a3a1..0000000
--- a/erpnext/support/doctype/customer_issue/test_records.json
+++ /dev/null
@@ -1,6 +0,0 @@
-[
-	{
-		"doctype": "Customer Issue",
-		"name": "_Test Customer Issue 1"
-	}
-]
diff --git a/erpnext/support/doctype/maintenance_visit/maintenance_visit.js b/erpnext/support/doctype/maintenance_visit/maintenance_visit.js
index c58b2ee..5427b0f 100644
--- a/erpnext/support/doctype/maintenance_visit/maintenance_visit.js
+++ b/erpnext/support/doctype/maintenance_visit/maintenance_visit.js
@@ -27,11 +27,11 @@
 						}
 					})
 				}, "icon-download", "btn-default");
-			cur_frm.add_custom_button(__('From Customer Issue'),
+			cur_frm.add_custom_button(__('From Warranty Claim'),
 				function() {
 					frappe.model.map_current_doc({
 						method: "erpnext.support.doctype.customer_issue.customer_issue.make_maintenance_visit",
-						source_doctype: "Customer Issue",
+						source_doctype: "Warranty Claim",
 						get_query_filters: {
 							status: ["in", "Open, Work in Progress"],
 							customer: cur_frm.doc.customer || undefined,
diff --git a/erpnext/support/doctype/maintenance_visit/maintenance_visit.py b/erpnext/support/doctype/maintenance_visit/maintenance_visit.py
index 6ad0a9d..b7a9b9e 100644
--- a/erpnext/support/doctype/maintenance_visit/maintenance_visit.py
+++ b/erpnext/support/doctype/maintenance_visit/maintenance_visit.py
@@ -24,7 +24,7 @@
 
 	def update_customer_issue(self, flag):
 		for d in self.get('purposes'):
-			if d.prevdoc_docname and d.prevdoc_doctype == 'Customer Issue' :
+			if d.prevdoc_docname and d.prevdoc_doctype == 'Warranty Claim' :
 				if flag==1:
 					mntc_date = self.mntc_date
 					service_person = d.service_person
@@ -48,11 +48,11 @@
 						service_person = ''
 						work_done = ''
 
-				frappe.db.sql("update `tabCustomer Issue` set resolution_date=%s, resolved_by=%s, resolution_details=%s, status=%s where name =%s",(mntc_date,service_person,work_done,status,d.prevdoc_docname))
+				frappe.db.sql("update `tabWarranty Claim` set resolution_date=%s, resolved_by=%s, resolution_details=%s, status=%s where name =%s",(mntc_date,service_person,work_done,status,d.prevdoc_docname))
 
 
 	def check_if_last_visit(self):
-		"""check if last maintenance visit against same sales order/ customer issue"""
+		"""check if last maintenance visit against same sales order/ Warranty Claim"""
 		check_for_docname = None
 		for d in self.get('purposes'):
 			if d.prevdoc_docname:
diff --git a/erpnext/support/doctype/warranty_claim/__init__.py b/erpnext/support/doctype/warranty_claim/__init__.py
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/erpnext/support/doctype/warranty_claim/__init__.py
diff --git a/erpnext/support/doctype/warranty_claim/test_records.json b/erpnext/support/doctype/warranty_claim/test_records.json
new file mode 100644
index 0000000..b5b1904
--- /dev/null
+++ b/erpnext/support/doctype/warranty_claim/test_records.json
@@ -0,0 +1,6 @@
+[
+	{
+		"doctype": "Warranty Claim",
+		"name": "_Test Warranty Claim 1"
+	}
+]
diff --git a/erpnext/support/doctype/warranty_claim/test_warranty_claim.py b/erpnext/support/doctype/warranty_claim/test_warranty_claim.py
new file mode 100644
index 0000000..238808c
--- /dev/null
+++ b/erpnext/support/doctype/warranty_claim/test_warranty_claim.py
@@ -0,0 +1,10 @@
+# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors and Contributors
+# See license.txt
+
+import frappe
+import unittest
+
+test_records = frappe.get_test_records('Warranty Claim')
+
+class TestWarrantyClaim(unittest.TestCase):
+	pass
diff --git a/erpnext/support/doctype/customer_issue/customer_issue.js b/erpnext/support/doctype/warranty_claim/warranty_claim.js
similarity index 89%
rename from erpnext/support/doctype/customer_issue/customer_issue.js
rename to erpnext/support/doctype/warranty_claim/warranty_claim.js
index d260677..e062559 100644
--- a/erpnext/support/doctype/customer_issue/customer_issue.js
+++ b/erpnext/support/doctype/warranty_claim/warranty_claim.js
@@ -4,14 +4,14 @@
 frappe.provide("erpnext.support");
 frappe.require("assets/erpnext/js/utils.js");
 
-frappe.ui.form.on_change("Customer Issue", "customer", function(frm) {
+frappe.ui.form.on_change("Warranty Claim", "customer", function(frm) {
 	erpnext.utils.get_party_details(frm) });
-frappe.ui.form.on_change("Customer Issue", "customer_address",
+frappe.ui.form.on_change("Warranty Claim", "customer_address",
 	erpnext.utils.get_address_display);
-frappe.ui.form.on_change("Customer Issue", "contact_person",
+frappe.ui.form.on_change("Warranty Claim", "contact_person",
 	erpnext.utils.get_contact_details);
 
-erpnext.support.CustomerIssue = frappe.ui.form.Controller.extend({
+erpnext.support.WarrantyClaim = frappe.ui.form.Controller.extend({
 	refresh: function() {
 		if((cur_frm.doc.status=='Open' || cur_frm.doc.status == 'Work In Progress')) {
 			cur_frm.add_custom_button(__('Make Maintenance Visit'),
@@ -27,7 +27,7 @@
 	}
 });
 
-$.extend(cur_frm.cscript, new erpnext.support.CustomerIssue({frm: cur_frm}));
+$.extend(cur_frm.cscript, new erpnext.support.WarrantyClaim({frm: cur_frm}));
 
 cur_frm.cscript.onload = function(doc,cdt,cdn){
 	if(!doc.status)
diff --git a/erpnext/support/doctype/customer_issue/customer_issue.json b/erpnext/support/doctype/warranty_claim/warranty_claim.json
similarity index 98%
rename from erpnext/support/doctype/customer_issue/customer_issue.json
rename to erpnext/support/doctype/warranty_claim/warranty_claim.json
index 41c185e..71fa5a0 100644
--- a/erpnext/support/doctype/customer_issue/customer_issue.json
+++ b/erpnext/support/doctype/warranty_claim/warranty_claim.json
@@ -387,7 +387,7 @@
    "no_copy": 1, 
    "oldfieldname": "amended_from", 
    "oldfieldtype": "Data", 
-   "options": "Customer Issue", 
+   "options": "Warranty Claim", 
    "permlevel": 0, 
    "print_hide": 1, 
    "width": "150px"
@@ -396,10 +396,10 @@
  "icon": "icon-bug", 
  "idx": 1, 
  "is_submittable": 0, 
- "modified": "2015-02-05 05:11:36.857779", 
+ "modified": "2015-02-17 00:12:52.430072", 
  "modified_by": "Administrator", 
  "module": "Support", 
- "name": "Customer Issue", 
+ "name": "Warranty Claim", 
  "owner": "harshada@webnotestech.com", 
  "permissions": [
   {
diff --git a/erpnext/support/doctype/customer_issue/customer_issue.py b/erpnext/support/doctype/warranty_claim/warranty_claim.py
similarity index 86%
rename from erpnext/support/doctype/customer_issue/customer_issue.py
rename to erpnext/support/doctype/warranty_claim/warranty_claim.py
index 9e6300e..f548f6a 100644
--- a/erpnext/support/doctype/customer_issue/customer_issue.py
+++ b/erpnext/support/doctype/warranty_claim/warranty_claim.py
@@ -11,7 +11,7 @@
 
 from erpnext.utilities.transaction_base import TransactionBase
 
-class CustomerIssue(TransactionBase):
+class WarrantyClaim(TransactionBase):
 	def get_feed(self):
 		return _("{0}: From {1}").format(self.status, self.customer_name)
 
@@ -20,7 +20,7 @@
 			frappe.throw(_("Customer is required"))
 
 		if self.status=="Closed" and \
-			frappe.db.get_value("Customer Issue", self.name, "status")!="Closed":
+			frappe.db.get_value("Warranty Claim", self.name, "status")!="Closed":
 			self.resolution_date = today()
 
 	def on_cancel(self):
@@ -30,7 +30,7 @@
 			(self.name))
 		if lst:
 			lst1 = ','.join([x[0] for x in lst])
-			frappe.throw(_("Cancel Material Visit {0} before cancelling this Customer Issue").format(lst1))
+			frappe.throw(_("Cancel Material Visit {0} before cancelling this Warranty Claim").format(lst1))
 		else:
 			frappe.db.set(self, 'status', 'Cancelled')
 
@@ -51,14 +51,14 @@
 		and t1.docstatus=1 and t1.completion_status='Fully Completed'""", source_name)
 
 	if not visit:
-		target_doc = get_mapped_doc("Customer Issue", source_name, {
-			"Customer Issue": {
+		target_doc = get_mapped_doc("Warranty Claim", source_name, {
+			"Warranty Claim": {
 				"doctype": "Maintenance Visit",
 				"field_map": {}
 			}
 		}, target_doc)
 
-		source_doc = frappe.get_doc("Customer Issue", source_name)
+		source_doc = frappe.get_doc("Warranty Claim", source_name)
 		if source_doc.get("item_code"):
 			table_map = {
 				"doctype": "Maintenance Visit Purpose",
diff --git a/erpnext/support/doctype/customer_issue/customer_issue_list.js b/erpnext/support/doctype/warranty_claim/warranty_claim_list.js
similarity index 64%
rename from erpnext/support/doctype/customer_issue/customer_issue_list.js
rename to erpnext/support/doctype/warranty_claim/warranty_claim_list.js
index f47934c..e162e13 100644
--- a/erpnext/support/doctype/customer_issue/customer_issue_list.js
+++ b/erpnext/support/doctype/warranty_claim/warranty_claim_list.js
@@ -1,4 +1,4 @@
-frappe.listview_settings['Customer Issue'] = {
+frappe.listview_settings['Warranty Claim'] = {
 	add_fields: ["status", "customer", "item_code"],
 	filters:[["status","=", "Open"]]
 };