rename function added in item
diff --git a/stock/doctype/item/item.py b/stock/doctype/item/item.py
index ae67749..7f0d3c2 100644
--- a/stock/doctype/item/item.py
+++ b/stock/doctype/item/item.py
@@ -178,3 +178,7 @@
 
 		sle = sql("select name from `tabStock Ledger Entry` where item_code = %s and ifnull(is_cancelled, 'No') = 'No'", self.doc.name)
 		return sle and 'exists' or 'not exists'
+		
+	def on_rename(self,newdn,olddn):
+		sql("update tabItem set item_code = %s where name = %s", (newdn, olddn))	
+