Update erpnext/accounts/doctype/cost_center/cost_center.py
diff --git a/erpnext/accounts/doctype/cost_center/cost_center.py b/erpnext/accounts/doctype/cost_center/cost_center.py
index 7429821..57d9a29 100644
--- a/erpnext/accounts/doctype/cost_center/cost_center.py
+++ b/erpnext/accounts/doctype/cost_center/cost_center.py
@@ -73,7 +73,7 @@
 	def validate_budget_details(self):
 		check_acc_list = []
 		for d in getlist(self.doclist, 'budget_details'):
-			if doc.group_or_ledger=="Group":
+			if self.doc.group_or_ledger=="Group":
 				msgprint("Budget cannot be set for Group Cost Centers", raise_exception=1)
 				
 			if [d.account, d.fiscal_year] in check_acc_list: