Added patch to fetch Item Template Attributes
diff --git a/erpnext/patches.txt b/erpnext/patches.txt
index 8e3aab1..c7c9388 100644
--- a/erpnext/patches.txt
+++ b/erpnext/patches.txt
@@ -192,3 +192,4 @@
 erpnext.patches.v5_4.stock_entry_additional_costs
 erpnext.patches.v5_4.cleanup_journal_entry
 execute:frappe.db.sql("update `tabProduction Order` pro set description = (select description from tabItem where name=pro.production_item) where ifnull(description, '') = ''")
+erpnext.patches.v5_4.item_template
diff --git a/erpnext/patches/v5_4/item_template.py b/erpnext/patches/v5_4/item_template.py
new file mode 100644
index 0000000..4183654
--- /dev/null
+++ b/erpnext/patches/v5_4/item_template.py
@@ -0,0 +1,16 @@
+# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
+# License: GNU General Public License v3. See license.txt
+
+from __future__ import unicode_literals
+import frappe
+
+def execute():
+	item_attribute = {}
+	for d in  frappe.db.sql("""select DISTINCT va.attribute, i.variant_of from `tabVariant Attribute` va, `tabItem` i \
+		where va.parent = i.name""", as_dict=1):
+		item_attribute.setdefault(d.variant_of, []).append({"attribute": d.attribute})
+	
+	for item, attributes in item_attribute.items():
+		template = frappe.get_doc("Item", item)
+		template.set('valid_attributes', attributes)
+		template.save()
\ No newline at end of file
diff --git a/erpnext/stock/doctype/item/item_list.js b/erpnext/stock/doctype/item/item_list.js
index 6eaa492..46a22ea 100644
--- a/erpnext/stock/doctype/item/item_list.js
+++ b/erpnext/stock/doctype/item/item_list.js
@@ -6,7 +6,7 @@
 		if(doc.end_of_life && doc.end_of_life < frappe.datetime.get_today()) {
 			return [__("Expired"), "grey", "end_of_life,<,Today"]
 		} else if(doc.has_variants) {
-			return [__("Template"), "blue", "has_variant,=,1"]
+			return [__("Template"), "blue", "has_variants,=,Yes"]
 		} else if(doc.variant_of) {
 			return [__("Variant"), "green", "variant_of,=," + doc.variant_of]
 		} else {