Merge pull request #3150 from rmehta/is_group

[rename] group_or_ledger to is_group
diff --git a/erpnext/accounts/doctype/account/account.js b/erpnext/accounts/doctype/account/account.js
index 71acd62..a2eb714 100644
--- a/erpnext/accounts/doctype/account/account.js
+++ b/erpnext/accounts/doctype/account/account.js
@@ -12,12 +12,12 @@
 	cur_frm.toggle_display('account_name', doc.__islocal);
 
 	// hide fields if group
-	cur_frm.toggle_display(['account_type', 'tax_rate'], doc.group_or_ledger=='Ledger')
+	cur_frm.toggle_display(['account_type', 'tax_rate'], cint(doc.is_group)==0)
 
 	// disable fields
-	cur_frm.toggle_enable(['account_name', 'group_or_ledger', 'company'], false);
+	cur_frm.toggle_enable(['account_name', 'is_group', 'company'], false);
 
-	if(doc.group_or_ledger=='Ledger') {
+	if(cint(doc.is_group)==0) {
 		cur_frm.toggle_display('freeze_account', doc.__onload && doc.__onload.can_freeze_account);
 	}
 
@@ -40,7 +40,7 @@
 cur_frm.add_fetch('parent_account', 'root_type', 'root_type');
 
 cur_frm.cscript.account_type = function(doc, cdt, cdn) {
-	if(doc.group_or_ledger=='Ledger') {
+	if(doc.is_group==0) {
 		cur_frm.toggle_display(['tax_rate'], doc.account_type == 'Tax');
 		cur_frm.toggle_display('warehouse', doc.account_type=='Warehouse');
 	}
@@ -50,10 +50,10 @@
 	cur_frm.add_custom_button(__('Chart of Accounts'),
 		function() { frappe.set_route("Accounts Browser", "Account"); }, 'icon-sitemap')
 
-	if (cstr(doc.group_or_ledger) == 'Group') {
-		cur_frm.add_custom_button(__('Convert to Ledger'),
+	if (doc.is_group == 1) {
+		cur_frm.add_custom_button(__('Convert to non-Group'),
 			function() { cur_frm.cscript.convert_to_ledger(); }, 'icon-retweet', 'btn-default');
-	} else if (cstr(doc.group_or_ledger) == 'Ledger') {
+	} else if (cint(doc.is_group) == 0) {
 		cur_frm.add_custom_button(__('View Ledger'), function() {
 			frappe.route_options = {
 				"account": doc.name,
@@ -88,7 +88,7 @@
 cur_frm.fields_dict['parent_account'].get_query = function(doc) {
 	return {
 		filters: {
-			"group_or_ledger": "Group",
+			"is_group": 1,
 			"company": doc.company
 		}
 	}
diff --git a/erpnext/accounts/doctype/account/account.json b/erpnext/accounts/doctype/account/account.json
index 4862962..fa3f814 100644
--- a/erpnext/accounts/doctype/account/account.json
+++ b/erpnext/accounts/doctype/account/account.json
@@ -38,18 +38,12 @@
    "search_index": 1
   }, 
   {
-   "default": "Ledger", 
-   "fieldname": "group_or_ledger", 
-   "fieldtype": "Select", 
-   "in_filter": 1, 
-   "in_list_view": 1, 
-   "label": "Group or Ledger", 
-   "oldfieldname": "group_or_ledger", 
-   "oldfieldtype": "Select", 
-   "options": "\nLedger\nGroup", 
+   "default": "0", 
+   "fieldname": "is_group", 
+   "fieldtype": "Check", 
+   "label": "Is Group", 
    "permlevel": 0, 
-   "read_only": 1, 
-   "reqd": 1, 
+   "precision": "", 
    "search_index": 1
   }, 
   {
@@ -177,7 +171,7 @@
  "icon": "icon-money", 
  "idx": 1, 
  "in_create": 0, 
- "modified": "2015-02-20 05:09:22.108350", 
+ "modified": "2015-04-23 02:53:48.056520", 
  "modified_by": "Administrator", 
  "module": "Accounts", 
  "name": "Account", 
@@ -261,5 +255,5 @@
    "write": 1
   }
  ], 
- "search_fields": "group_or_ledger"
+ "search_fields": "is_group"
 }
\ No newline at end of file
diff --git a/erpnext/accounts/doctype/account/account.py b/erpnext/accounts/doctype/account/account.py
index 23fa656..a824a12 100644
--- a/erpnext/accounts/doctype/account/account.py
+++ b/erpnext/accounts/doctype/account/account.py
@@ -32,12 +32,12 @@
 		"""Fetch Parent Details and validate parent account"""
 		if self.parent_account:
 			par = frappe.db.get_value("Account", self.parent_account,
-				["name", "group_or_ledger", "report_type", "root_type", "company"], as_dict=1)
+				["name", "is_group", "report_type", "root_type", "company"], as_dict=1)
 			if not par:
 				throw(_("Account {0}: Parent account {1} does not exist").format(self.name, self.parent_account))
 			elif par.name == self.name:
 				throw(_("Account {0}: You can not assign itself as parent account").format(self.name))
-			elif par.group_or_ledger != 'Group':
+			elif not par.is_group:
 				throw(_("Account {0}: Parent account {1} can not be a ledger").format(self.name, self.parent_account))
 			elif par.company != self.company:
 				throw(_("Account {0}: Parent account {1} does not belong to company: {2}")
@@ -78,7 +78,7 @@
 		elif self.check_gle_exists():
 			throw(_("Account with existing transaction cannot be converted to ledger"))
 		else:
-			self.group_or_ledger = 'Ledger'
+			self.is_group = 0
 			self.save()
 			return 1
 
@@ -88,7 +88,7 @@
 		elif self.account_type:
 			throw(_("Cannot covert to Group because Account Type is selected."))
 		else:
-			self.group_or_ledger = 'Group'
+			self.is_group = 1
 			self.save()
 			return 1
 
@@ -160,10 +160,10 @@
 				throw(_("Account {0} does not exist").format(new))
 
 			val = list(frappe.db.get_value("Account", new_account,
-				["group_or_ledger", "root_type", "company"]))
+				["is_group", "root_type", "company"]))
 
-			if val != [self.group_or_ledger, self.root_type, self.company]:
-				throw(_("""Merging is only possible if following properties are same in both records. Group or Ledger, Root Type, Company"""))
+			if val != [self.is_group, self.root_type, self.company]:
+				throw(_("""Merging is only possible if following properties are same in both records. Is Group, Root Type, Company"""))
 
 		return new_account
 
@@ -177,7 +177,7 @@
 
 def get_parent_account(doctype, txt, searchfield, start, page_len, filters):
 	return frappe.db.sql("""select name from tabAccount
-		where group_or_ledger = 'Group' and docstatus != 2 and company = %s
+		where is_group = 1 and docstatus != 2 and company = %s
 		and %s like %s order by name limit %s, %s""" %
 		("%s", searchfield, "%s", "%s", "%s"),
 		(filters["company"], "%%%s%%" % txt, start, page_len), as_list=1)
diff --git a/erpnext/accounts/doctype/account/chart_of_accounts/chart_of_accounts.py b/erpnext/accounts/doctype/account/chart_of_accounts/chart_of_accounts.py
index a27d739..7729d22 100644
--- a/erpnext/accounts/doctype/account/chart_of_accounts/chart_of_accounts.py
+++ b/erpnext/accounts/doctype/account/chart_of_accounts/chart_of_accounts.py
@@ -13,18 +13,18 @@
 		accounts = []
 
 		def _import_accounts(children, parent, root_type, root_account=False):
-			for account_name, children in children.items():
+			for account_name, child in children.items():
 				if root_account:
-					root_type = children.get("root_type")
+					root_type = child.get("root_type")
 
-				if account_name not in ["account_type", "root_type", "group_or_ledger"]:
+				if account_name not in ["account_type", "root_type", "is_group"]:
 
 					account_name_in_db = unidecode(account_name.strip().lower())
 					if account_name_in_db in accounts:
 						count = accounts.count(account_name_in_db)
 						account_name = account_name + " " + cstr(count)
 
-					group_or_ledger = identify_group_or_ledger(children)
+					is_group = identify_is_group(child)
 					report_type = "Balance Sheet" if root_type in ["Asset", "Liability", "Equity"] \
 						else "Profit and Loss"
 
@@ -33,10 +33,10 @@
 						"account_name": account_name,
 						"company": company,
 						"parent_account": parent,
-						"group_or_ledger": group_or_ledger,
+						"is_group": is_group,
 						"root_type": root_type,
 						"report_type": report_type,
-						"account_type": children.get("account_type")
+						"account_type": child.get("account_type")
 					})
 
 					if root_account:
@@ -46,19 +46,19 @@
 
 					accounts.append(account_name_in_db)
 
-					_import_accounts(children, account.name, root_type)
+					_import_accounts(child, account.name, root_type)
 
 		_import_accounts(chart, None, None, root_account=True)
 
-def identify_group_or_ledger(children):
-	if children.get("group_or_ledger"):
-		group_or_ledger = children.get("group_or_ledger")
-	elif len(set(children.keys()) - set(["account_type", "root_type", "group_or_ledger"])):
-		group_or_ledger = "Group"
+def identify_is_group(child):
+	if child.get("is_group"):
+		is_group = child.get("is_group")
+	elif len(set(child.keys()) - set(["account_type", "root_type", "is_group"])):
+		is_group = 1
 	else:
-		group_or_ledger = "Ledger"
+		is_group = 0
 
-	return group_or_ledger
+	return is_group
 
 def get_chart(chart_name):
 	chart = {}
diff --git a/erpnext/accounts/doctype/account/chart_of_accounts/verified/ae_uae_chart_template_standard.json b/erpnext/accounts/doctype/account/chart_of_accounts/verified/ae_uae_chart_template_standard.json
index 58c4548..1ba0931 100644
--- a/erpnext/accounts/doctype/account/chart_of_accounts/verified/ae_uae_chart_template_standard.json
+++ b/erpnext/accounts/doctype/account/chart_of_accounts/verified/ae_uae_chart_template_standard.json
@@ -85,7 +85,7 @@
                     },
                     "Stock in Hand": {
 		                "account_type": "Stock",
-						"group_or_ledger": "Group"
+						"is_group": 1
                     }
                 },
                 "Perliminary and Preoperating Expenses": {
@@ -326,7 +326,7 @@
 			    },
 				"Duties and Taxes": {
 					"account_type": "Tax",
-					"group_or_ledger": "Group"
+					"is_group": 1
 				},
                 "Accruals & Provisions": {
                     "Accruals": {
diff --git a/erpnext/accounts/doctype/account/chart_of_accounts/verified/in_standard_chart_of_accounts.json b/erpnext/accounts/doctype/account/chart_of_accounts/verified/in_standard_chart_of_accounts.json
index 84e734a..c2fbecc 100644
--- a/erpnext/accounts/doctype/account/chart_of_accounts/verified/in_standard_chart_of_accounts.json
+++ b/erpnext/accounts/doctype/account/chart_of_accounts/verified/in_standard_chart_of_accounts.json
@@ -12,7 +12,7 @@
 	            },
 	            "Bank Accounts": {
 	                "account_type": "Bank",
-					"group_or_ledger": "Group"
+					"is_group": 1
 	            },
 	            "Cash In Hand": {
 	                "Cash": {
@@ -21,17 +21,17 @@
 	                "account_type": "Cash"
 	            },
 	            "Loans and Advances (Assets)": {
-	            	"group_or_ledger": "Group"
+	            	"is_group": 1
 	            },
 	            "Securities and Deposits": {
 	                "Earnest Money": {}
 	            },
 	            "Stock Assets": {
 	                "account_type": "Stock",
-					"group_or_ledger": "Group"
+					"is_group": 1
 	            },
 	            "Tax Assets": {
-					"group_or_ledger": "Group"
+					"is_group": 1
 				}
 	        },
 	        "Fixed Assets": {
@@ -52,7 +52,7 @@
 	            }
 	        },
 	        "Investments": {
-	        	"group_or_ledger": "Group"
+	        	"is_group": 1
 	        },
 	        "Temporary Accounts (Assets)": {
 	            "Temporary Assets": {}
@@ -146,7 +146,7 @@
 	        },
 	        "Indirect Income": {
 	            "account_type": "Income Account",
-				"group_or_ledger": "Group"
+				"is_group": 1
 	        },
 			"root_type": "Income"
 	    },
@@ -168,7 +168,7 @@
 			    },
 				"Duties and Taxes": {
 					"account_type": "Tax",
-					"group_or_ledger": "Group"
+					"is_group": 1
 				},
 				"Loans (Liabilities)": {
 					"Secured Loans": {},
diff --git a/erpnext/accounts/doctype/account/chart_of_accounts/verified/ni_ni_chart_template.json b/erpnext/accounts/doctype/account/chart_of_accounts/verified/ni_ni_chart_template.json
index 6db540a..eafc309 100644
--- a/erpnext/accounts/doctype/account/chart_of_accounts/verified/ni_ni_chart_template.json
+++ b/erpnext/accounts/doctype/account/chart_of_accounts/verified/ni_ni_chart_template.json
@@ -32,7 +32,7 @@
 						}
 					},
 					"Otros Equivalentes a Efectivo": {
-						"group_or_ledger": "Group",
+						"is_group": 1,
 						"account_type": "Cash"
 					}
 				},
@@ -61,7 +61,7 @@
 					"Estimacion para Cuentas Incobrables": {}
 				},
 				"Inventarios": {
-					"group_or_ledger": "Group",
+					"is_group": 1,
 					"account_type": "Stock"
 				},
 				"Impuestos Acreditables": {
@@ -90,7 +90,7 @@
 					"Retenciones Definitivas Sobre Rentas o Ganancias de Capital": {}
 				},
 				"Otras Cuentas por Cobrar": {
-					"group_or_ledger": "Group",
+					"is_group": 1,
 					"account_type": "Receivable"
 				}
 			},
@@ -110,11 +110,11 @@
 				},
 				"Inversiones Permanentes": {
 					"Inversiones Permanentes": {
-						"group_or_ledger": "Group",
+						"is_group": 1,
 						"account_type": "Fixed Asset"
 					},
 					"Negocios Conjuntos": {
-						"group_or_ledger": "Group",
+						"is_group": 1,
 						"account_type": "Fixed Asset"
 					}
 				},
@@ -124,25 +124,25 @@
 				},
 				"Activos Intangibles": {
 					"Patentes": {
-						"group_or_ledger": "Group"
+						"is_group": 1
 					},
 					"Marcas Registradas": {
-						"group_or_ledger": "Group"
+						"is_group": 1
 					},
 					"Derechos de Autor": {
-						"group_or_ledger": "Group"
+						"is_group": 1
 					},
 					"Concesiones": {
-						"group_or_ledger": "Group"
+						"is_group": 1
 					},
 					"Licencias": {
-						"group_or_ledger": "Group"
+						"is_group": 1
 					},
 					"Gastos de investigacion": {
-						"group_or_ledger": "Group"
+						"is_group": 1
 					},
 					"Amortizacion de Activos Intangibles": {
-						"group_or_ledger": "Group"
+						"is_group": 1
 					},
 					"Deterioro de Valor de Activos Intangibles": {}
 				},
@@ -150,29 +150,29 @@
 					"Gastos de Consitucion": {},
 					"Gastos Pre Operativos": {},
 					"Mejoras en Bienes Arrendados": {
-						"group_or_ledger": "Group"
+						"is_group": 1
 					},
 					"Amortizacion de Activos Amortizables": {},
 					"Deterioro de Valaor de Activos Amortizables": {}
 				},
 				"Cuentas por Cobrar a Largo Plazo": {
 					"Creditos a Largo Plazo": {
-						"group_or_ledger": "Group"
+						"is_group": 1
 					}
 				},
 				"Inversiones a Largo Plazo": {
 					"Depositos Bancarios a Plazo": {
-						"group_or_ledger": "Group"
+						"is_group": 1
 					},
 					"Intereses percibidos por adelantado": {
-						"group_or_ledger": "Group"
+						"is_group": 1
 					},
 					"Titulos y Acciones": {
-						"group_or_ledger": "Group"
+						"is_group": 1
 					}
 				},
 				"Activo por Impuestos Diferidos": {
-					"group_or_ledger": "Group"
+					"is_group": 1
 				}
 			},
 			"root_type": "Asset"
@@ -199,21 +199,21 @@
 				"Anticipos de Clientes": {},
 				"Pasivos Financieros a Corto Plazo": {
 					"Prestamos por Pagar a Corto Plazo": {
-						"group_or_ledger": "Group"
+						"is_group": 1
 					},
 					"Sobregiros Bancarios": {
-						"group_or_ledger": "Group"
+						"is_group": 1
 					},
 					"Otras Deudas Bancarias": {
-						"group_or_ledger": "Group"
+						"is_group": 1
 					}
 				},
 				"Gastos por Pagar": {
 					"Servicios Basicos": {
-						"group_or_ledger": "Group"
+						"is_group": 1
 					},
 					"Prestaciones Sociales": {
-						"group_or_ledger": "Group"
+						"is_group": 1
 					},
 					"Salarios por Pagar": {}
 				},
@@ -287,28 +287,28 @@
 					}
 				},
 				"Otras Cuentas por Pagar": {
-					"group_or_ledger": "Group"
+					"is_group": 1
 				}
 			},
 			"Pasivo No Corriente": {
 				"Prestamos a Largo Plazo": {
-					"group_or_ledger": "Group"
+					"is_group": 1
 				},
 				"Cuentas por Pagar a Largo Plaso": {
-					"group_or_ledger": "Group"
+					"is_group": 1
 				},
 				"Otras Cuentas por Pagar a Largo Plazo": {
-					"group_or_ledger": "Group"
+					"is_group": 1
 				},
 				"Otros Pasivos Financieros a Largo Plaso": {
-					"group_or_ledger": "Group"
+					"is_group": 1
 				}
 			},
 			"Obligaciones por Arrendamiento Financiero a Largo Plazo": {
-				"group_or_ledger": "Group"
+				"is_group": 1
 			},
 			"Pasivo por Impuestos Diferidos": {
-				"group_or_ledger": "Group"
+				"is_group": 1
 			},
 			"root_type": "Liability"
 		},
@@ -324,7 +324,7 @@
 				}
 			},
 			"Donaciones": {
-				"group_or_ledger": "Group"
+				"is_group": 1
 			},
 			"Ganancias Acumuladas": {
 				"Reservas": {
diff --git a/erpnext/accounts/doctype/account/chart_of_accounts/verified/standard_chart_of_accounts.py b/erpnext/accounts/doctype/account/chart_of_accounts/verified/standard_chart_of_accounts.py
index 7236631..50fc2f4 100644
--- a/erpnext/accounts/doctype/account/chart_of_accounts/verified/standard_chart_of_accounts.py
+++ b/erpnext/accounts/doctype/account/chart_of_accounts/verified/standard_chart_of_accounts.py
@@ -15,7 +15,7 @@
 	            },
 	            _("Bank Accounts"): {
 	                "account_type": "Bank",
-					"group_or_ledger": "Group"
+					"is_group": 1
 	            },
 	            _("Cash In Hand"): {
 	                _("Cash"): {
@@ -24,17 +24,17 @@
 	                "account_type": "Cash"
 	            },
 	            _("Loans and Advances (Assets)"): {
-	            	"group_or_ledger": "Group"
+	            	"is_group": 1
 	            },
 	            _("Securities and Deposits"): {
 	                _("Earnest Money"): {}
 	            },
 	            _("Stock Assets"): {
 	                "account_type": "Stock",
-					"group_or_ledger": "Group"
+					"is_group": 1
 	            },
 	            _("Tax Assets"): {
-					"group_or_ledger": "Group"
+					"is_group": 1
 				}
 	        },
 	        _("Fixed Assets"): {
@@ -55,7 +55,7 @@
 	            }
 	        },
 	        _("Investments"): {
-	        	"group_or_ledger": "Group"
+	        	"is_group": 1
 	        },
 	        _("Temporary Accounts (Assets)"): {
 	            _("Temporary Assets"): {}
@@ -149,7 +149,7 @@
 	        },
 	        _("Indirect Income"): {
 	            "account_type": "Income Account",
-				"group_or_ledger": "Group"
+				"is_group": 1
 	        },
 			"root_type": "Income"
 	    },
@@ -167,7 +167,7 @@
 			    },
 				_("Duties and Taxes"): {
 					"account_type": "Tax",
-					"group_or_ledger": "Group"
+					"is_group": 1
 				},
 				_("Loans (Liabilities)"): {
 					_("Secured Loans"): {},
diff --git a/erpnext/accounts/doctype/account/test_account.py b/erpnext/accounts/doctype/account/test_account.py
index 985b884..2a3feda 100644
--- a/erpnext/accounts/doctype/account/test_account.py
+++ b/erpnext/accounts/doctype/account/test_account.py
@@ -8,37 +8,37 @@
 	from frappe.test_runner import make_test_objects
 
 	accounts = [
-		# [account_name, parent_account, group_or_ledger]
-		["_Test Account Bank Account", "Bank Accounts", "Ledger", "Bank"],
+		# [account_name, parent_account, is_group]
+		["_Test Account Bank Account", "Bank Accounts", 0, "Bank"],
 
-		["_Test Account Stock Expenses", "Direct Expenses", "Group", None],
-		["_Test Account Shipping Charges", "_Test Account Stock Expenses", "Ledger", "Chargeable"],
-		["_Test Account Customs Duty", "_Test Account Stock Expenses", "Ledger", "Tax"],
-		["_Test Account Insurance Charges", "_Test Account Stock Expenses", "Ledger", "Chargeable"],
-		["_Test Account Stock Adjustment", "_Test Account Stock Expenses", "Ledger", "Stock Adjustment"],
+		["_Test Account Stock Expenses", "Direct Expenses", 1, None],
+		["_Test Account Shipping Charges", "_Test Account Stock Expenses", 0, "Chargeable"],
+		["_Test Account Customs Duty", "_Test Account Stock Expenses", 0, "Tax"],
+		["_Test Account Insurance Charges", "_Test Account Stock Expenses", 0, "Chargeable"],
+		["_Test Account Stock Adjustment", "_Test Account Stock Expenses", 0, "Stock Adjustment"],
 
 
-		["_Test Account Tax Assets", "Current Assets", "Group", None],
-		["_Test Account VAT", "_Test Account Tax Assets", "Ledger", "Tax"],
-		["_Test Account Service Tax", "_Test Account Tax Assets", "Ledger", "Tax"],
+		["_Test Account Tax Assets", "Current Assets", 1, None],
+		["_Test Account VAT", "_Test Account Tax Assets", 0, "Tax"],
+		["_Test Account Service Tax", "_Test Account Tax Assets", 0, "Tax"],
 
-		["_Test Account Reserves and Surplus", "Current Liabilities", "Ledger", None],
+		["_Test Account Reserves and Surplus", "Current Liabilities", 0, None],
 
-		["_Test Account Cost for Goods Sold", "Expenses", "Ledger", None],
-		["_Test Account Excise Duty", "_Test Account Tax Assets", "Ledger", "Tax"],
-		["_Test Account Education Cess", "_Test Account Tax Assets", "Ledger", "Tax"],
-		["_Test Account S&H Education Cess", "_Test Account Tax Assets", "Ledger", "Tax"],
-		["_Test Account CST", "Direct Expenses", "Ledger", "Tax"],
-		["_Test Account Discount", "Direct Expenses", "Ledger", None],
-		["_Test Write Off", "Indirect Expenses", "Ledger", None],
+		["_Test Account Cost for Goods Sold", "Expenses", 0, None],
+		["_Test Account Excise Duty", "_Test Account Tax Assets", 0, "Tax"],
+		["_Test Account Education Cess", "_Test Account Tax Assets", 0, "Tax"],
+		["_Test Account S&H Education Cess", "_Test Account Tax Assets", 0, "Tax"],
+		["_Test Account CST", "Direct Expenses", 0, "Tax"],
+		["_Test Account Discount", "Direct Expenses", 0, None],
+		["_Test Write Off", "Indirect Expenses", 0, None],
 
 		# related to Account Inventory Integration
-		["_Test Account Stock In Hand", "Current Assets", "Ledger", None],
-		["_Test Account Fixed Assets", "Current Assets", "Ledger", None],
+		["_Test Account Stock In Hand", "Current Assets", 0, None],
+		["_Test Account Fixed Assets", "Current Assets", 0, None],
 
 		# Receivable / Payable Account
-		["_Test Receivable", "Current Assets", "Ledger", "Receivable"],
-		["_Test Payable", "Current Liabilities", "Ledger", "Payable"],
+		["_Test Receivable", "Current Assets", 0, "Receivable"],
+		["_Test Payable", "Current Liabilities", 0, "Payable"],
 	]
 
 	for company, abbr in [["_Test Company", "_TC"], ["_Test Company 1", "_TC1"]]:
@@ -47,8 +47,8 @@
 				"account_name": account_name,
 				"parent_account": parent_account + " - " + abbr,
 				"company": company,
-				"group_or_ledger": group_or_ledger,
+				"is_group": is_group,
 				"account_type": account_type
-			} for account_name, parent_account, group_or_ledger, account_type in accounts])
+			} for account_name, parent_account, is_group, account_type in accounts])
 
 	return test_objects
diff --git a/erpnext/accounts/doctype/bank_reconciliation/bank_reconciliation.js b/erpnext/accounts/doctype/bank_reconciliation/bank_reconciliation.js
index 96f9007..c39550b 100644
--- a/erpnext/accounts/doctype/bank_reconciliation/bank_reconciliation.js
+++ b/erpnext/accounts/doctype/bank_reconciliation/bank_reconciliation.js
@@ -26,7 +26,7 @@
 		return {
 			"filters": {
 				"account_type": "Bank",
-				"group_or_ledger": "Ledger"
+				"is_group": 0
 			}
 		};
 	});
diff --git a/erpnext/accounts/doctype/cost_center/cost_center.js b/erpnext/accounts/doctype/cost_center/cost_center.js
index 1b4451f..6946bcb 100644
--- a/erpnext/accounts/doctype/cost_center/cost_center.js
+++ b/erpnext/accounts/doctype/cost_center/cost_center.js
@@ -18,7 +18,7 @@
 					filters:[
 						['Account', 'company', '=', me.frm.doc.company],
 						['Account', 'report_type', '=', 'Profit and Loss'],
-						['Account', 'group_or_ledger', '=', 'Ledger'],
+						['Account', 'is_group', '=', '0'],
 					]
 				}
 			});
@@ -27,7 +27,7 @@
 		this.frm.set_query("parent_cost_center", function() {
 			return {
 				filters:[
-					['Cost Center', 'group_or_ledger', '=', 'Group'],
+					['Cost Center', 'is_group', '=', '1'],
 					['Cost Center', 'company', '=', me.frm.doc.company],
 				]
 			}
@@ -40,15 +40,15 @@
 cur_frm.cscript.refresh = function(doc, cdt, cdn) {
 	var intro_txt = '';
 	cur_frm.toggle_display('cost_center_name', doc.__islocal);
-	cur_frm.toggle_enable(['group_or_ledger', 'company'], doc.__islocal);
+	cur_frm.toggle_enable(['is_group', 'company'], doc.__islocal);
 
-	if(!doc.__islocal && doc.group_or_ledger=='Group') {
+	if(!doc.__islocal && doc.is_group==1) {
 		intro_txt += __('Note: This Cost Center is a Group. Cannot make accounting entries against groups.');
 	}
 
 	cur_frm.cscript.hide_unhide_group_ledger(doc);
 
-	cur_frm.toggle_display('sb1', doc.group_or_ledger=='Ledger')
+	cur_frm.toggle_display('sb1', doc.is_group==0)
 	cur_frm.set_intro(intro_txt);
 
 	cur_frm.add_custom_button(__('Chart of Cost Centers'),
@@ -62,11 +62,11 @@
 }
 
 cur_frm.cscript.hide_unhide_group_ledger = function(doc) {
-	if (cstr(doc.group_or_ledger) == 'Group') {
-		cur_frm.add_custom_button(__('Convert to Ledger'),
+	if (doc.is_group == 1) {
+		cur_frm.add_custom_button(__('Convert to non-Group'),
 			function() { cur_frm.cscript.convert_to_ledger(); }, 'icon-retweet',
 				"btn-default")
-	} else if (cstr(doc.group_or_ledger) == 'Ledger') {
+	} else if (doc.is_group == 0) {
 		cur_frm.add_custom_button(__('Convert to Group'),
 			function() { cur_frm.cscript.convert_to_group(); }, 'icon-retweet',
 				"btn-default")
diff --git a/erpnext/accounts/doctype/cost_center/cost_center.json b/erpnext/accounts/doctype/cost_center/cost_center.json
index b37fa96..409f59c 100644
--- a/erpnext/accounts/doctype/cost_center/cost_center.json
+++ b/erpnext/accounts/doctype/cost_center/cost_center.json
@@ -58,18 +58,12 @@
    "width": "50%"
   }, 
   {
-   "fieldname": "group_or_ledger", 
-   "fieldtype": "Select", 
-   "hidden": 0, 
-   "label": "Group or Ledger", 
-   "no_copy": 1, 
-   "oldfieldname": "group_or_ledger", 
-   "oldfieldtype": "Select", 
-   "options": "\nGroup\nLedger", 
+   "default": "0", 
+   "fieldname": "is_group", 
+   "fieldtype": "Check", 
+   "label": "Is Group", 
    "permlevel": 0, 
-   "print_hide": 1, 
-   "report_hide": 1, 
-   "reqd": 1
+   "precision": ""
   }, 
   {
    "description": "Define Budget for this Cost Center. To set budget action, see <a href=\"#!List/Company\">Company Master</a>", 
@@ -145,7 +139,7 @@
  "icon": "icon-money", 
  "idx": 1, 
  "in_create": 0, 
- "modified": "2015-02-20 05:07:59.251051", 
+ "modified": "2015-04-23 02:54:26.934607", 
  "modified_by": "Administrator", 
  "module": "Accounts", 
  "name": "Cost Center", 
@@ -198,5 +192,5 @@
    "role": "Material User"
   }
  ], 
- "search_fields": "parent_cost_center"
+ "search_fields": "parent_cost_center, is_group"
 }
\ No newline at end of file
diff --git a/erpnext/accounts/doctype/cost_center/cost_center.py b/erpnext/accounts/doctype/cost_center/cost_center.py
index b6cc503..f26c80b 100644
--- a/erpnext/accounts/doctype/cost_center/cost_center.py
+++ b/erpnext/accounts/doctype/cost_center/cost_center.py
@@ -16,9 +16,6 @@
 			frappe.db.get_value("Company", self.company, "abbr")
 
 	def validate_mandatory(self):
-		if not self.group_or_ledger:
-			msgprint(_("Please select Group or Ledger value"), raise_exception=1)
-
 		if self.cost_center_name != self.company and not self.parent_cost_center:
 			msgprint(_("Please enter parent cost center"), raise_exception=1)
 		elif self.cost_center_name == self.company and self.parent_cost_center:
@@ -30,7 +27,7 @@
 		elif self.check_gle_exists():
 			msgprint(_("Cost Center with existing transactions can not be converted to ledger"), raise_exception=1)
 		else:
-			self.group_or_ledger = 'Ledger'
+			self.is_group = 0
 			self.save()
 			return 1
 
@@ -38,7 +35,7 @@
 		if self.check_gle_exists():
 			msgprint(_("Cost Center with existing transactions can not be converted to group"), raise_exception=1)
 		else:
-			self.group_or_ledger = 'Group'
+			self.is_group = 1
 			self.save()
 			return 1
 
@@ -52,7 +49,7 @@
 	def validate_budget_details(self):
 		check_acc_list = []
 		for d in self.get('budgets'):
-			if self.group_or_ledger=="Group":
+			if self.is_group==1:
 				msgprint(_("Budget cannot be set for Group Cost Centers"), raise_exception=1)
 
 			if [d.account, d.fiscal_year] in check_acc_list:
@@ -70,7 +67,7 @@
 		new_cost_center = get_name_with_abbr(newdn, self.company)
 
 		# Validate properties before merging
-		super(CostCenter, self).before_rename(olddn, new_cost_center, merge, "group_or_ledger")
+		super(CostCenter, self).before_rename(olddn, new_cost_center, merge, "is_group")
 
 		return new_cost_center
 
diff --git a/erpnext/accounts/doctype/cost_center/test_records.json b/erpnext/accounts/doctype/cost_center/test_records.json
index 7486214..129f0db 100644
--- a/erpnext/accounts/doctype/cost_center/test_records.json
+++ b/erpnext/accounts/doctype/cost_center/test_records.json
@@ -13,21 +13,21 @@
   "cost_center_name": "_Test Cost Center",
   "distribution_id": "_Test Distribution",
   "doctype": "Cost Center",
-  "group_or_ledger": "Ledger",
+  "is_group": 0,
   "parent_cost_center": "_Test Company - _TC"
  },
  {
   "company": "_Test Company",
   "cost_center_name": "_Test Cost Center 2",
   "doctype": "Cost Center",
-  "group_or_ledger": "Ledger",
+  "is_group": 0,
   "parent_cost_center": "_Test Company - _TC"
  },
  {
   "company": "_Test Company",
   "cost_center_name": "_Test Write Off Cost Center",
   "doctype": "Cost Center",
-  "group_or_ledger": "Ledger",
+  "is_group": 0,
   "parent_cost_center": "_Test Company - _TC"
  }
 ]
diff --git a/erpnext/accounts/doctype/gl_entry/gl_entry.py b/erpnext/accounts/doctype/gl_entry/gl_entry.py
index 54acc9e..b17d75b 100644
--- a/erpnext/accounts/doctype/gl_entry/gl_entry.py
+++ b/erpnext/accounts/doctype/gl_entry/gl_entry.py
@@ -63,10 +63,10 @@
 	def validate_account_details(self, adv_adj):
 		"""Account must be ledger, active and not freezed"""
 
-		ret = frappe.db.sql("""select group_or_ledger, docstatus, company
+		ret = frappe.db.sql("""select is_group, docstatus, company
 			from tabAccount where name=%s""", self.account, as_dict=1)[0]
 
-		if ret.group_or_ledger=='Group':
+		if ret.is_group==1:
 			frappe.throw(_("Account {0} cannot be a Group").format(self.account))
 
 		if ret.docstatus==2:
diff --git a/erpnext/accounts/doctype/journal_entry/journal_entry.js b/erpnext/accounts/doctype/journal_entry/journal_entry.js
index 2b0003e..3a953e7 100644
--- a/erpnext/accounts/doctype/journal_entry/journal_entry.js
+++ b/erpnext/accounts/doctype/journal_entry/journal_entry.js
@@ -36,7 +36,7 @@
 				return {
 					filters: {
 						company: me.frm.doc.company,
-						group_or_ledger: "Ledger"
+						is_group: 0
 					}
 				};
 			});
diff --git a/erpnext/accounts/doctype/journal_entry/journal_entry.py b/erpnext/accounts/doctype/journal_entry/journal_entry.py
index 0873b9b..a06e5fc 100644
--- a/erpnext/accounts/doctype/journal_entry/journal_entry.py
+++ b/erpnext/accounts/doctype/journal_entry/journal_entry.py
@@ -546,7 +546,7 @@
 def get_opening_accounts(company):
 	"""get all balance sheet accounts for opening entry"""
 	accounts = frappe.db.sql_list("""select name from tabAccount
-		where group_or_ledger='Ledger' and report_type='Balance Sheet' and company=%s""", company)
+		where is_group=0 and report_type='Balance Sheet' and company=%s""", company)
 
 	return [{"account": a, "balance": get_balance_on(a)} for a in accounts]
 
diff --git a/erpnext/accounts/doctype/mode_of_payment/mode_of_payment.js b/erpnext/accounts/doctype/mode_of_payment/mode_of_payment.js
index a052375..10807ff 100644
--- a/erpnext/accounts/doctype/mode_of_payment/mode_of_payment.js
+++ b/erpnext/accounts/doctype/mode_of_payment/mode_of_payment.js
@@ -5,7 +5,7 @@
 	return{
 		filters: [
 			['Account', 'account_type', 'in', 'Bank, Cash'],
-			['Account', 'group_or_ledger', '=', 'Ledger'],
+			['Account', 'is_group', '=', 0],
 			['Account', 'company', '=', doc.company]
 		]
 	}
diff --git a/erpnext/accounts/doctype/payment_reconciliation/payment_reconciliation.js b/erpnext/accounts/doctype/payment_reconciliation/payment_reconciliation.js
index 9394bcb..71df6cf 100644
--- a/erpnext/accounts/doctype/payment_reconciliation/payment_reconciliation.js
+++ b/erpnext/accounts/doctype/payment_reconciliation/payment_reconciliation.js
@@ -22,7 +22,7 @@
 				return{
 					filters: {
 						"company": me.frm.doc.company,
-						"group_or_ledger": "Ledger",
+						"is_group": 0,
 						"account_type": (me.frm.doc.party_type == "Customer" ? "Receivable" : "Payable")
 					}
 				};
@@ -37,7 +37,7 @@
 				return{
 					filters:[
 						['Account', 'company', '=', me.frm.doc.company],
-						['Account', 'group_or_ledger', '=', 'Ledger'],
+						['Account', 'is_group', '=', 0],
 						['Account', 'account_type', 'in', ['Bank', 'Cash']]
 					]
 				};
diff --git a/erpnext/accounts/doctype/payment_tool/payment_tool.js b/erpnext/accounts/doctype/payment_tool/payment_tool.js
index eb44161..7224f3b 100644
--- a/erpnext/accounts/doctype/payment_tool/payment_tool.js
+++ b/erpnext/accounts/doctype/payment_tool/payment_tool.js
@@ -18,7 +18,7 @@
 		return {
 			filters: {
 				"account_type": ["in", ["Bank", "Cash"]],
-				"group_or_ledger": "Ledger",
+				"is_group": 0,
 				"company": frm.doc.company
 			}
 		}
diff --git a/erpnext/accounts/doctype/period_closing_voucher/period_closing_voucher.js b/erpnext/accounts/doctype/period_closing_voucher/period_closing_voucher.js
index 2f2fc7c..c087500 100644
--- a/erpnext/accounts/doctype/period_closing_voucher/period_closing_voucher.js
+++ b/erpnext/accounts/doctype/period_closing_voucher/period_closing_voucher.js
@@ -15,7 +15,7 @@
 			"company": doc.company,
 			"report_type": "Balance Sheet",
 			"freeze_account": "No",
-			"group_or_ledger": "Ledger"
+			"is_group": 0
 		}
-	}	
+	}
 }
diff --git a/erpnext/accounts/doctype/pos_setting/pos_setting.js b/erpnext/accounts/doctype/pos_setting/pos_setting.js
index 8004e3e..db5fec1 100755
--- a/erpnext/accounts/doctype/pos_setting/pos_setting.js
+++ b/erpnext/accounts/doctype/pos_setting/pos_setting.js
@@ -22,7 +22,7 @@
 	return{
 		filters:{
 			'report_type': "Balance Sheet",
-			'group_or_ledger': "Ledger",
+			'is_group': 0,
 			'company': doc.company
 		}
 	}
@@ -33,7 +33,7 @@
 cur_frm.fields_dict['income_account'].get_query = function(doc,cdt,cdn) {
 	return{
 		filters:{
-			'group_or_ledger': "Ledger",
+			'is_group': 0,
 			'company': doc.company,
 			'account_type': "Income Account"
 		}
@@ -47,7 +47,7 @@
 	return{
 		filters:{
 			'company': doc.company,
-			'group_or_ledger': "Ledger"
+			'is_group': 0
 		}
 	}
 }
@@ -60,7 +60,7 @@
 		filters: {
 			"report_type": "Profit and Loss",
 			"company": doc.company,
-			"group_or_ledger": "Ledger"
+			"is_group": 0
 		}
 	}
 }
@@ -83,7 +83,7 @@
 	return{
 		filters:{
 			'report_type': 'Profit and Loss',
-			'group_or_ledger': 'Ledger',
+			'is_group': 0,
 			'company': doc.company
 		}
 	}
@@ -94,7 +94,7 @@
 cur_frm.fields_dict.write_off_cost_center.get_query = function(doc) {
 	return{
 		filters:{
-			'group_or_ledger': 'Ledger',
+			'is_group': 0,
 			'company': doc.company
 		}
 	}
diff --git a/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.js b/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.js
index 9da83b6..417e3b3 100644
--- a/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.js
+++ b/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.js
@@ -161,7 +161,7 @@
 		filters:{
 			'account_type': 'Payable',
 			'root_type': 'Liability',
-			'group_or_ledger': 'Ledger',
+			'is_group': 0,
 			'company': doc.company
 		}
 	}
@@ -198,7 +198,7 @@
 	return {
 		filters: {
 			'company': doc.company,
-			'group_or_ledger': 'Ledger'
+			'is_group': 0
 		}
 
 	}
diff --git a/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.py b/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.py
index 0e7a640..d2d349e 100644
--- a/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.py
+++ b/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.py
@@ -394,9 +394,9 @@
 	return frappe.db.sql("""select tabAccount.name from `tabAccount`
 			where (tabAccount.report_type = "Profit and Loss"
 					or tabAccount.account_type in ("Expense Account", "Fixed Asset"))
-				and tabAccount.group_or_ledger="Ledger"
+				and tabAccount.is_group=0
 				and tabAccount.docstatus!=2
 				and tabAccount.company = '%(company)s'
 				and tabAccount.%(key)s LIKE '%(txt)s'
 				%(mcond)s""" % {'company': filters['company'], 'key': searchfield,
-			'txt': "%%%s%%" % txt, 'mcond':get_match_cond(doctype)})
\ No newline at end of file
+			'txt': "%%%s%%" % txt, 'mcond':get_match_cond(doctype)})
diff --git a/erpnext/accounts/doctype/sales_invoice/sales_invoice.js b/erpnext/accounts/doctype/sales_invoice/sales_invoice.js
index ade0d32..3534cf9 100644
--- a/erpnext/accounts/doctype/sales_invoice/sales_invoice.js
+++ b/erpnext/accounts/doctype/sales_invoice/sales_invoice.js
@@ -291,7 +291,7 @@
 	return{
 		filters: {
 			'report_type': 'Balance Sheet',
-			'group_or_ledger': 'Ledger',
+			'is_group': 0,
 			'company': doc.company
 		}
 	}
@@ -302,7 +302,7 @@
 		filters: [
 			["Account", "account_type", "in", ["Cash", "Bank"]],
 			["Account", "root_type", "=", "Asset"],
-			["Account", "group_or_ledger", "=", "Ledger"],
+			["Account", "is_group", "=",0],
 			["Account", "company", "=", doc.company]
 		]
 	}
@@ -312,7 +312,7 @@
 	return{
 		filters:{
 			'report_type': 'Profit and Loss',
-			'group_or_ledger': 'Ledger',
+			'is_group': 0,
 			'company': doc.company
 		}
 	}
@@ -323,7 +323,7 @@
 cur_frm.fields_dict.write_off_cost_center.get_query = function(doc) {
 	return{
 		filters:{
-			'group_or_ledger': 'Ledger',
+			'is_group': 0,
 			'company': doc.company
 		}
 	}
@@ -354,7 +354,7 @@
 			filters: {
 				'report_type': 'Profit and Loss',
 				'company': doc.company,
-				'group_or_ledger': 'Ledger'
+				"is_group": 0
 			}
 		}
 	}
@@ -367,7 +367,7 @@
 	return {
 		filters: {
 			'company': doc.company,
-			'group_or_ledger': 'Ledger'
+			"is_group": 0
 		}
 	}
 }
diff --git a/erpnext/accounts/doctype/sales_invoice/sales_invoice.py b/erpnext/accounts/doctype/sales_invoice/sales_invoice.py
index 40712c2..55159e4 100644
--- a/erpnext/accounts/doctype/sales_invoice/sales_invoice.py
+++ b/erpnext/accounts/doctype/sales_invoice/sales_invoice.py
@@ -449,7 +449,7 @@
 
 	def make_gl_entries(self, repost_future_gle=True):
 		gl_entries = self.get_gl_entries()
-		
+
 		if gl_entries:
 			from erpnext.accounts.general_ledger import make_gl_entries
 
@@ -617,7 +617,7 @@
 	return frappe.db.sql("""select tabAccount.name from `tabAccount`
 			where (tabAccount.report_type = "Profit and Loss"
 					or tabAccount.account_type = "Income Account")
-				and tabAccount.group_or_ledger="Ledger"
+				and tabAccount.is_group=0
 				and tabAccount.docstatus!=2
 				and tabAccount.company = '%(company)s'
 				and tabAccount.%(key)s LIKE '%(txt)s'
diff --git a/erpnext/accounts/page/accounts_browser/accounts_browser.js b/erpnext/accounts/page/accounts_browser/accounts_browser.js
index 9c9b037..fde7eb2 100644
--- a/erpnext/accounts/page/accounts_browser/accounts_browser.js
+++ b/erpnext/accounts/page/accounts_browser/accounts_browser.js
@@ -24,18 +24,16 @@
 		'<ol>'+
 			'<li>'+__('To add child nodes, explore tree and click on the node under which you want to add more nodes.')+'</li>'+
 			'<li>'+
-			      __('Accounting Entries can be made against leaf nodes, called')+
-				 ' <b>' +__('Ledgers')+'</b>. '+ __('Entries against ') +
-				 '<b>' +__('Groups') + '</b> '+ __('are not allowed.')+
+			      __('Accounting Entries can be made against leaf nodes. Entries against Groups are not allowed.')+
 		    '</li>'+
-			'<li>'+__('Please do NOT create Account (Ledgers) for Customers and Suppliers. They are created directly from the Customer / Supplier masters.')+'</li>'+
+			'<li>'+__('Please do NOT create Accounts for Customers and Suppliers. They are created directly from the Customer / Supplier masters.')+'</li>'+
 			'<li>'+
 			     '<b>'+__('To create a Bank Account')+'</b>: '+
-			      __('Go to the appropriate group (usually Application of Funds > Current Assets > Bank Accounts and create a new Account Ledger (by clicking on Add Child) of type "Bank"')+
+			      __('Go to the appropriate group (usually Application of Funds > Current Assets > Bank Accounts and create a new Account (by clicking on Add Child) of type "Bank"')+
 			'</li>'+
 			'<li>'+
 			      '<b>'+__('To create a Tax Account') +'</b>: '+
-			      __('Go to the appropriate group (usually Source of Funds > Current Liabilities > Taxes and Duties and create a new Account Ledger (by clicking on Add Child) of type "Tax" and do mention the Tax rate.')+
+			      __('Go to the appropriate group (usually Source of Funds > Current Liabilities > Taxes and Duties and create a new Account (by clicking on Add Child) of type "Tax" and do mention the Tax rate.')+
 			'</li>'+
 		'</ol>'+
 		'<p>'+__('Please setup your chart of accounts before you start Accounting Entries')+'</p></div>').appendTo(main);
@@ -201,9 +199,8 @@
 			fields: [
 				{fieldtype:'Data', fieldname:'account_name', label:__('New Account Name'), reqd:true,
 					description: __("Name of new Account. Note: Please don't create accounts for Customers and Suppliers, they are created automatically from the Customer and Supplier master")},
-				{fieldtype:'Select', fieldname:'group_or_ledger', label:__('Group or Ledger'),
-					options:'Group\nLedger', "default": "Ledger",
-					description: __('Further accounts can be made under Groups, but entries can be made against Ledger')},
+				{fieldtype:'Check', fieldname:'is_group', label:__('Is Group'),
+					description: __('Further accounts can be made under Groups, but entries can be made against non-Groups')},
 				{fieldtype:'Select', fieldname:'account_type', label:__('Account Type'),
 					options: ['', 'Bank', 'Cash', 'Warehouse', 'Receivable', 'Payable',
 						'Equity', 'Cost of Goods Sold', 'Fixed Asset', 'Expense Account',
@@ -217,8 +214,8 @@
 		var fd = d.fields_dict;
 
 		// account type if ledger
-		$(fd.group_or_ledger.input).change(function() {
-			if($(this).val()=='Group') {
+		$(fd.is_group.input).change(function() {
+			if($(this).prop("checked")) {
 				$(fd.account_type.wrapper).toggle(false);
 				$(fd.tax_rate.wrapper).toggle(false);
 				$(fd.warehouse.wrapper).toggle(false);
@@ -263,11 +260,11 @@
 
 		// show
 		d.on_page_show = function() {
-			$(fd.group_or_ledger.input).change();
+			$(fd.is_group.input).change();
 			$(fd.account_type.input).change();
 		}
 
-		$(fd.group_or_ledger.input).val("Ledger").change();
+		$(fd.is_group.input).prop("checked", false).change();
 		d.show();
 	},
 
@@ -278,8 +275,8 @@
 			title:__('New Cost Center'),
 			fields: [
 				{fieldtype:'Data', fieldname:'cost_center_name', label:__('New Cost Center Name'), reqd:true},
-				{fieldtype:'Select', fieldname:'group_or_ledger', label:__('Group or Ledger'),
-					options:'Group\nLedger', description:__('Further accounts can be made under Groups but entries can be made against Ledger')},
+				{fieldtype:'Check', fieldname:'is_group', label:__('Is Group'),
+					description:__('Further cost centers can be made under Groups but entries can be made against non-Groups')},
 				{fieldtype:'Button', fieldname:'create_new', label:__('Create New') }
 			]
 		});
diff --git a/erpnext/accounts/page/accounts_browser/accounts_browser.py b/erpnext/accounts/page/accounts_browser/accounts_browser.py
index de19d3b..30d6ee1 100644
--- a/erpnext/accounts/page/accounts_browser/accounts_browser.py
+++ b/erpnext/accounts/page/accounts_browser/accounts_browser.py
@@ -21,7 +21,7 @@
 	# root
 	if args['parent'] in ("Accounts", "Cost Centers"):
 		acc = frappe.db.sql(""" select
-			name as value, if(group_or_ledger='Group', 1, 0) as expandable
+			name as value, is_group as expandable
 			from `tab%s`
 			where ifnull(parent_%s,'') = ''
 			and `company` = %s	and docstatus<2
@@ -30,7 +30,7 @@
 	else:
 		# other
 		acc = frappe.db.sql("""select
-			name as value, if(group_or_ledger='Group', 1, 0) as expandable
+			name as value, is_group as expandable
 	 		from `tab%s`
 			where ifnull(parent_%s,'') = %s
 			and docstatus<2
diff --git a/erpnext/accounts/page/financial_analytics/financial_analytics.js b/erpnext/accounts/page/financial_analytics/financial_analytics.js
index a9ac72f..ef373aa 100644
--- a/erpnext/accounts/page/financial_analytics/financial_analytics.js
+++ b/erpnext/accounts/page/financial_analytics/financial_analytics.js
@@ -265,7 +265,7 @@
 		var me= this;
 		$.each(this.data, function(i, account) {
 			// update groups
-			if((account.group_or_ledger == "Ledger") || (account.rgt - account.lft == 1)) {
+			if((account.is_group == 0) || (account.rgt - account.lft == 1)) {
 				var parent = me.parent_map[account.name];
 				while(parent) {
 					var parent_account = me.item_by_name[parent];
diff --git a/erpnext/accounts/report/accounts_receivable/accounts_receivable.py b/erpnext/accounts/report/accounts_receivable/accounts_receivable.py
index 3bde399..5512c6d 100644
--- a/erpnext/accounts/report/accounts_receivable/accounts_receivable.py
+++ b/erpnext/accounts/report/accounts_receivable/accounts_receivable.py
@@ -188,17 +188,6 @@
 			conditions.append("party_type=%s and party=%s")
 			values += [party_type, self.filters.get(party_type_field)]
 
-		if self.filters.account:
-			conditions.append("account=%s")
-			values.append(self.filters.account)
-		else:
-			account_map = self.get_account_map()
-			if not account_map:
-				frappe.throw(_("No Customer Accounts found."))
-			else:
-				conditions.append("account in ({0})".format(", ".join(["%s"] * len(account_map))))
-				values += account_map.keys()
-				
 		return " and ".join(conditions), values
 
 	def get_gl_entries_for(self, party, party_type, against_voucher_type, against_voucher):
diff --git a/erpnext/accounts/report/bank_clearance_summary/bank_clearance_summary.js b/erpnext/accounts/report/bank_clearance_summary/bank_clearance_summary.js
index 35a4fe9..37d8130 100644
--- a/erpnext/accounts/report/bank_clearance_summary/bank_clearance_summary.js
+++ b/erpnext/accounts/report/bank_clearance_summary/bank_clearance_summary.js
@@ -24,13 +24,13 @@
 			"reqd": 1,
 			"get_query": function() {
 				return {
-					"query": "erpnext.controllers.queries.get_account_list", 
+					"query": "erpnext.controllers.queries.get_account_list",
 					"filters": [
 						['Account', 'account_type', 'in', 'Bank, Cash'],
-						['Account', 'group_or_ledger', '=', 'Ledger'],
+						['Account', 'is_group', '=', 0],
 					]
 				}
 			}
 		},
 	]
-}
\ No newline at end of file
+}
diff --git a/erpnext/accounts/report/bank_reconciliation_statement/bank_reconciliation_statement.js b/erpnext/accounts/report/bank_reconciliation_statement/bank_reconciliation_statement.js
index 0d333da..581531b 100644
--- a/erpnext/accounts/report/bank_reconciliation_statement/bank_reconciliation_statement.js
+++ b/erpnext/accounts/report/bank_reconciliation_statement/bank_reconciliation_statement.js
@@ -14,7 +14,7 @@
 					"query": "erpnext.controllers.queries.get_account_list",
 					"filters": [
 						['Account', 'account_type', 'in', 'Bank, Cash'],
-						['Account', 'group_or_ledger', '=', 'Ledger'],
+						['Account', 'is_group', '=', 0],
 					]
 				}
 			}
diff --git a/erpnext/accounts/report/general_ledger/general_ledger.py b/erpnext/accounts/report/general_ledger/general_ledger.py
index e70f2ea..a7ee7c0 100644
--- a/erpnext/accounts/report/general_ledger/general_ledger.py
+++ b/erpnext/accounts/report/general_ledger/general_ledger.py
@@ -8,7 +8,7 @@
 
 def execute(filters=None):
 	account_details = {}
-	for acc in frappe.db.sql("""select name, group_or_ledger from tabAccount""", as_dict=1):
+	for acc in frappe.db.sql("""select name, is_group from tabAccount""", as_dict=1):
 			account_details.setdefault(acc.name, acc)
 
 	validate_filters(filters, account_details)
@@ -25,7 +25,7 @@
 		frappe.throw(_("Account {0} does not exists").format(filters.account))
 
 	if filters.get("account") and filters.get("group_by_account") \
-			and account_details[filters.account].group_or_ledger == "Ledger":
+			and account_details[filters.account].is_group == 0:
 		frappe.throw(_("Can not filter based on Account, if grouped by Account"))
 
 	if filters.get("voucher_no") and filters.get("group_by_voucher"):
@@ -45,10 +45,10 @@
 			frappe.throw(_("Invalid {0}: {1}").format(party_type, party))
 
 def get_columns():
-	return [_("Posting Date") + ":Date:90", _("Account") + ":Link/Account:200", 
-		_("Debit") + ":Float:100", _("Credit") + ":Float:100", 
-		_("Voucher Type") + "::120", _("Voucher No") + ":Dynamic Link/Voucher Type:160", 
-		_("Against Account") + "::120", _("Party Type") + "::80", _("Party") + "::150", 
+	return [_("Posting Date") + ":Date:90", _("Account") + ":Link/Account:200",
+		_("Debit") + ":Float:100", _("Credit") + ":Float:100",
+		_("Voucher Type") + "::120", _("Voucher No") + ":Dynamic Link/Voucher Type:160",
+		_("Against Account") + "::120", _("Party Type") + "::80", _("Party") + "::150",
 		_("Cost Center") + ":Link/Cost Center:100", _("Remarks") + "::400"]
 
 def get_result(filters, account_details):
@@ -179,7 +179,7 @@
 	for d in data:
 		result.append([d.get("posting_date"), d.get("account"), d.get("debit"),
 			d.get("credit"), d.get("voucher_type"), d.get("voucher_no"),
-			d.get("against"), d.get("party_type"), d.get("party"), 
+			d.get("against"), d.get("party_type"), d.get("party"),
 			d.get("cost_center"), d.get("remarks")])
 
 	return result
diff --git a/erpnext/accounts/utils.py b/erpnext/accounts/utils.py
index 4b5b5f6..d00b5dc 100644
--- a/erpnext/accounts/utils.py
+++ b/erpnext/accounts/utils.py
@@ -89,7 +89,7 @@
 				% year_start_date)
 
 		# different filter for group and ledger - improved performance
-		if acc.group_or_ledger=="Group":
+		if acc.is_group:
 			cond.append("""exists (
 				select * from `tabAccount` ac where ac.name = gle.account
 				and ac.lft >= %s and ac.rgt <= %s
diff --git a/erpnext/buying/doctype/supplier/supplier.js b/erpnext/buying/doctype/supplier/supplier.js
index a8ccf32..064fac1 100644
--- a/erpnext/buying/doctype/supplier/supplier.js
+++ b/erpnext/buying/doctype/supplier/supplier.js
@@ -65,7 +65,7 @@
 		filters: {
 			'account_type': 'Payable',
 			'company': d.company,
-			'group_or_ledger': 'Ledger'
+			"is_group": 0
 		}
 	}
 }
diff --git a/erpnext/controllers/queries.py b/erpnext/controllers/queries.py
index 2af8738..898dd23 100644
--- a/erpnext/controllers/queries.py
+++ b/erpnext/controllers/queries.py
@@ -138,7 +138,7 @@
 	tax_accounts = frappe.db.sql("""select name, parent_account	from tabAccount
 		where tabAccount.docstatus!=2
 			and account_type in (%s)
-			and group_or_ledger = 'Ledger'
+			and is_group = 0
 			and company = %s
 			and `%s` LIKE %s
 		limit %s, %s""" %
@@ -147,7 +147,7 @@
 			start, page_len]))
 	if not tax_accounts:
 		tax_accounts = frappe.db.sql("""select name, parent_account	from tabAccount
-			where tabAccount.docstatus!=2 and group_or_ledger = 'Ledger'
+			where tabAccount.docstatus!=2 and is_group = 0
 				and company = %s and `%s` LIKE %s limit %s, %s"""
 			% ("%s", searchfield, "%s", "%s", "%s"),
 			(filters.get("company"), "%%%s%%" % txt, start, page_len))
@@ -281,8 +281,8 @@
 	elif isinstance(filters, list):
 		filter_list.extend(filters)
 
-	if "group_or_ledger" not in [d[1] for d in filter_list]:
-		filter_list.append(["Account", "group_or_ledger", "=", "Ledger"])
+	if "is_group" not in [d[1] for d in filter_list]:
+		filter_list.append(["Account", "is_group", "=", "0"])
 
 	if searchfield and txt:
 		filter_list.append([doctype, searchfield, "like", "%%%s%%" % txt])
diff --git a/erpnext/manufacturing/report/open_production_orders/open_production_orders.json b/erpnext/manufacturing/report/open_production_orders/open_production_orders.json
index bb32326..860f81d 100644
--- a/erpnext/manufacturing/report/open_production_orders/open_production_orders.json
+++ b/erpnext/manufacturing/report/open_production_orders/open_production_orders.json
@@ -5,12 +5,12 @@
  "doctype": "Report", 
  "idx": 1, 
  "is_standard": "Yes", 
- "modified": "2015-03-30 05:43:59.976254", 
+ "modified": "2015-04-23 03:26:35.711681", 
  "modified_by": "Administrator", 
  "module": "Manufacturing", 
  "name": "Open Production Orders", 
  "owner": "Administrator", 
- "query": "SELECT\n  `tabProduction Order`.name as \"Production Order:Link/Production Order:200\",\n  `tabProduction Order`.creation as \"Date:Date:120\",\n  `tabProduction Order`.production_item as \"Item:Link/Item:150\",\n  `tabProduction Order`.qty as \"To Produce:Int:100\",\n  `tabProduction Order`.produced_qty as \"Produced:Int:100\",\n  `tabProduction Order`.company as \"Company:Link/Company:\",\nFROM\n  `tabProduction Order`\nWHERE\n  `tabProduction Order`.docstatus=1\n  AND ifnull(`tabProduction Order`.produced_qty,0) < `tabProduction Order`.qty\n  AND NOT EXISTS (SELECT name from `tabStock Entry` where production_order =`tabProduction Order`.name) ", 
+ "query": "SELECT\n  `tabProduction Order`.name as \"Production Order:Link/Production Order:200\",\n  `tabProduction Order`.creation as \"Date:Date:120\",\n  `tabProduction Order`.production_item as \"Item:Link/Item:150\",\n  `tabProduction Order`.qty as \"To Produce:Int:100\",\n  `tabProduction Order`.produced_qty as \"Produced:Int:100\",\n  `tabProduction Order`.company as \"Company:Link/Company:\"\nFROM\n  `tabProduction Order`\nWHERE\n  `tabProduction Order`.docstatus=1\n  AND ifnull(`tabProduction Order`.produced_qty,0) < `tabProduction Order`.qty\n  AND NOT EXISTS (SELECT name from `tabStock Entry` where production_order =`tabProduction Order`.name) ", 
  "ref_doctype": "Production Order", 
  "report_name": "Open Production Orders", 
  "report_type": "Query Report"
diff --git a/erpnext/patches.txt b/erpnext/patches.txt
index 0665df4..042bbde 100644
--- a/erpnext/patches.txt
+++ b/erpnext/patches.txt
@@ -101,6 +101,7 @@
 execute:frappe.reload_doc('crm', 'doctype', 'opportunity')
 erpnext.patches.v5_0.rename_table_fieldnames
 execute:frappe.db.sql("update `tabJournal Entry` set voucher_type='Journal Entry' where ifnull(voucher_type, '')=''")
+erpnext.patches.v5_0.is_group
 erpnext.patches.v4_2.party_model
 erpnext.patches.v5_0.party_model_patch_fix
 erpnext.patches.v4_1.fix_jv_remarks
diff --git a/erpnext/patches/v4_2/party_model.py b/erpnext/patches/v4_2/party_model.py
index bb4ff0b..897598f 100644
--- a/erpnext/patches/v4_2/party_model.py
+++ b/erpnext/patches/v4_2/party_model.py
@@ -25,7 +25,7 @@
 
 	def _create_account(args):
 		account = frappe.new_doc("Account")
-		account.group_or_ledger = "Ledger"
+		account.is_group = 0
 		account.update(args)
 		account.insert()
 
@@ -87,7 +87,7 @@
 
 			frappe.db.sql("update `tab{0}` set account=%s, party_type=%s, party=%s where name=%s".format(dt),
 				(new_account, account_details.get("master_type"), account_details.get("master_name"), d.name))
-				
+
 			if i%500 == 0:
 				frappe.db.commit()
 
diff --git a/erpnext/patches/v5_0/is_group.py b/erpnext/patches/v5_0/is_group.py
new file mode 100644
index 0000000..4e3f760
--- /dev/null
+++ b/erpnext/patches/v5_0/is_group.py
@@ -0,0 +1,9 @@
+from __future__ import unicode_literals
+
+import frappe
+
+def execute():
+	frappe.reload_doctype("Account")
+	frappe.reload_doctype("Cost Center")
+	frappe.db.sql("update tabAccount set is_group = if(group_or_ledger='Group', 1, 0)")
+	frappe.db.sql("update `tabCost Center` set is_group = if(group_or_ledger='Group', 1, 0)")
diff --git a/erpnext/public/js/account_tree_grid.js b/erpnext/public/js/account_tree_grid.js
index ed3704a..ac8784d 100644
--- a/erpnext/public/js/account_tree_grid.js
+++ b/erpnext/public/js/account_tree_grid.js
@@ -178,7 +178,7 @@
 		var me= this;
 		$.each(this.data, function(i, account) {
 			// update groups
-			if((account.group_or_ledger == "Ledger") || (account.rgt - account.lft == 1)) {
+			if((account.is_group == 0) || (account.rgt - account.lft == 1)) {
 				var parent = me.parent_map[account.name];
 				while(parent) {
 					var parent_account = me.item_by_name[parent];
diff --git a/erpnext/public/js/controllers/accounts.js b/erpnext/public/js/controllers/accounts.js
index 5d779fa..2ea4bac 100644
--- a/erpnext/public/js/controllers/accounts.js
+++ b/erpnext/public/js/controllers/accounts.js
@@ -162,7 +162,7 @@
 			return {
 				filters: {
 					'company': doc.company,
-					'group_or_ledger': "Ledger"
+					"is_group": 0
 				}
 			}
 		});
diff --git a/erpnext/selling/doctype/customer/customer.js b/erpnext/selling/doctype/customer/customer.js
index b87d7c0..d83628d 100644
--- a/erpnext/selling/doctype/customer/customer.js
+++ b/erpnext/selling/doctype/customer/customer.js
@@ -93,7 +93,7 @@
 		filters: {
 			'account_type': 'Receivable',
 			'company': d.company,
-			'group_or_ledger': 'Ledger'
+			"is_group": 0
 		}
 	}
 }
diff --git a/erpnext/setup/doctype/company/company.js b/erpnext/setup/doctype/company/company.js
index 5ff256d..115fdfa 100644
--- a/erpnext/setup/doctype/company/company.js
+++ b/erpnext/setup/doctype/company/company.js
@@ -114,7 +114,7 @@
 	return{
 		filters: [
 			['Account', 'account_type', '=', 'Bank'],
-			['Account', 'group_or_ledger', '=', 'Ledger'],
+			['Account', 'is_group', '=', 0],
 			['Account', 'company', '=', doc.name]
 		]
 	}
@@ -124,7 +124,7 @@
 	return{
 		filters: [
 			['Account', 'account_type', '=', 'Cash'],
-			['Account', 'group_or_ledger', '=', 'Ledger'],
+			['Account', 'is_group', '=', 0],
 			['Account', 'company', '=', doc.name]
 		]
 	}
@@ -134,7 +134,7 @@
 	return{
 		filters:{
 			'company': doc.name,
-			'group_or_ledger': "Ledger",
+			"is_group": 0,
 			"account_type": "Receivable"
 		}
 	}
@@ -144,7 +144,7 @@
 	return{
 		filters:{
 			'company': doc.name,
-			'group_or_ledger': "Ledger",
+			"is_group": 0,
 			"account_type": "Payable"
 		}
 	}
@@ -156,7 +156,7 @@
 	return{
 		filters:{
 			'company': doc.name,
-			'group_or_ledger': "Ledger",
+			"is_group": 0,
 			"report_type": "Profit and Loss"
 		}
 	}
@@ -166,7 +166,7 @@
 	return{
 		filters:{
 			'company': doc.name,
-			'group_or_ledger': "Ledger",
+			"is_group": 0,
 			"report_type": "Profit and Loss"
 		}
 	}
@@ -176,7 +176,7 @@
 	return{
 		filters:{
 			'company': doc.name,
-			'group_or_ledger': "Ledger",
+			"is_group": 0,
 		}
 	}
 }
@@ -187,7 +187,7 @@
 			"filters": {
 				"report_type": "Profit and Loss",
 				"company": doc.name,
-				'group_or_ledger': "Ledger"
+				"is_group": 0
 			}
 		}
 	}
@@ -200,7 +200,7 @@
 			"filters": {
 				"report_type": "Balance Sheet",
 				"company": doc.name,
-				'group_or_ledger': "Ledger"
+				"is_group": 0
 			}
 		}
 	}
diff --git a/erpnext/setup/doctype/company/company.py b/erpnext/setup/doctype/company/company.py
index a89fc51..26a2797 100644
--- a/erpnext/setup/doctype/company/company.py
+++ b/erpnext/setup/doctype/company/company.py
@@ -55,7 +55,7 @@
 			self.create_default_warehouses()
 			self.install_country_fixtures()
 
-		if not frappe.db.get_value("Cost Center", {"group_or_ledger": "Ledger", "company": self.name}):
+		if not frappe.db.get_value("Cost Center", {"is_group": 0, "company": self.name}):
 			self.create_default_cost_center()
 
 		self.set_default_accounts()
@@ -71,7 +71,7 @@
 		for whname in (_("Stores"), _("Work In Progress"), _("Finished Goods")):
 			if not frappe.db.exists("Warehouse", whname + " - " + self.abbr):
 				stock_group = frappe.db.get_value("Account", {"account_type": "Stock",
-					"group_or_ledger": "Group", "company": self.name})
+					"is_group": 1, "company": self.name})
 				if stock_group:
 					frappe.get_doc({
 						"doctype":"Warehouse",
@@ -125,7 +125,7 @@
 			return
 
 		account = frappe.db.get_value("Account", {"account_type": account_type,
-			"group_or_ledger": "Ledger", "company": self.name})
+			"is_group": 0, "company": self.name})
 
 		if account:
 			self.db_set(fieldname, account)
@@ -135,13 +135,13 @@
 			{
 				'cost_center_name': self.name,
 				'company':self.name,
-				'group_or_ledger':'Group',
+				'is_group': 1,
 				'parent_cost_center':None
 			},
 			{
 				'cost_center_name':_('Main'),
 				'company':self.name,
-				'group_or_ledger':'Ledger',
+				'is_group':0,
 				'parent_cost_center':self.name + ' - ' + self.abbr
 			},
 		]
diff --git a/erpnext/setup/doctype/customer_group/customer_group.js b/erpnext/setup/doctype/customer_group/customer_group.js
index 8e31119..7a5d2fa 100644
--- a/erpnext/setup/doctype/customer_group/customer_group.js
+++ b/erpnext/setup/doctype/customer_group/customer_group.js
@@ -32,7 +32,7 @@
 		filters: {
 			'account_type': 'Receivable',
 			'company': d.company,
-			'group_or_ledger': 'Ledger'
+			"is_group": 0
 		}
 	}
 }
diff --git a/erpnext/setup/doctype/email_digest/email_digest.py b/erpnext/setup/doctype/email_digest/email_digest.py
index 15a3781..87a1043 100644
--- a/erpnext/setup/doctype/email_digest/email_digest.py
+++ b/erpnext/setup/doctype/email_digest/email_digest.py
@@ -394,7 +394,7 @@
 		if not hasattr(self, "accounts"):
 			self.accounts = frappe.db.sql("""select name, account_type, account_name, root_type
 				from `tabAccount` where company=%s and docstatus < 2
-				and group_or_ledger = "Ledger" order by lft""",
+				and is_group = 0 order by lft""",
 				(self.company,), as_dict=1)
 		return self.accounts
 
diff --git a/erpnext/setup/doctype/supplier_type/supplier_type.js b/erpnext/setup/doctype/supplier_type/supplier_type.js
index 7b2464b..f1c5d70 100644
--- a/erpnext/setup/doctype/supplier_type/supplier_type.js
+++ b/erpnext/setup/doctype/supplier_type/supplier_type.js
@@ -11,7 +11,7 @@
 		filters: {
 			'account_type': 'Payable',
 			'company': d.company,
-			'group_or_ledger': 'Ledger'
+			"is_group": 0
 		}
 	}
 }
diff --git a/erpnext/setup/page/setup_wizard/setup_wizard.py b/erpnext/setup/page/setup_wizard/setup_wizard.py
index 7fd3542..b80d55e 100644
--- a/erpnext/setup/page/setup_wizard/setup_wizard.py
+++ b/erpnext/setup/page/setup_wizard/setup_wizard.py
@@ -297,14 +297,14 @@
 
 			try:
 				tax_group = frappe.db.get_value("Account", {"company": args.get("company_name"),
-					"group_or_ledger": "Group", "account_type": "Tax", "root_type": "Liability"})
+					"is_group": 1, "account_type": "Tax", "root_type": "Liability"})
 				if tax_group:
 					frappe.get_doc({
 						"doctype":"Account",
 						"company": args.get("company_name").strip(),
 						"parent_account": tax_group,
 						"account_name": args.get("tax_" + str(i)),
-						"group_or_ledger": "Ledger",
+						"is_group": 0,
 						"report_type": "Balance Sheet",
 						"account_type": "Tax",
 						"tax_rate": flt(tax_rate) if tax_rate else None
@@ -330,69 +330,78 @@
 					"company": args.get("company_name").strip()
 				})
 
-			frappe.get_doc({
-				"doctype":"Item",
-				"item_code": item,
-				"item_name": item,
-				"description": item,
-				"is_sales_item": "Yes" if is_sales_item else "No",
-				"is_purchase_item": "Yes" if is_purchase_item else "No",
-				"show_in_website": 1,
-				"is_stock_item": is_stock_item and "Yes" or "No",
-				"item_group": item_group,
-				"stock_uom": args.get("item_uom_" + str(i)),
-				"default_warehouse": default_warehouse
-			}).insert()
+			try:
+				frappe.get_doc({
+					"doctype":"Item",
+					"item_code": item,
+					"item_name": item,
+					"description": item,
+					"is_sales_item": "Yes" if is_sales_item else "No",
+					"is_purchase_item": "Yes" if is_purchase_item else "No",
+					"show_in_website": 1,
+					"is_stock_item": is_stock_item and "Yes" or "No",
+					"item_group": item_group,
+					"stock_uom": args.get("item_uom_" + str(i)),
+					"default_warehouse": default_warehouse
+				}).insert()
 
-			if args.get("item_img_" + str(i)):
-				item_image = args.get("item_img_" + str(i)).split(",")
-				if len(item_image)==3:
-					filename, filetype, content = item_image
-					fileurl = save_file(filename, content, "Item", item, decode=True).file_url
-					frappe.db.set_value("Item", item, "image", fileurl)
+				if args.get("item_img_" + str(i)):
+					item_image = args.get("item_img_" + str(i)).split(",")
+					if len(item_image)==3:
+						filename, filetype, content = item_image
+						fileurl = save_file(filename, content, "Item", item, decode=True).file_url
+						frappe.db.set_value("Item", item, "image", fileurl)
+			except frappe.NameError:
+				pass
 
 def create_customers(args):
 	for i in xrange(1,6):
 		customer = args.get("customer_" + str(i))
 		if customer:
-			frappe.get_doc({
-				"doctype":"Customer",
-				"customer_name": customer,
-				"customer_type": "Company",
-				"customer_group": _("Commercial"),
-				"territory": args.get("country"),
-				"company": args.get("company_name").strip()
-			}).insert()
-
-			if args.get("customer_contact_" + str(i)):
-				contact = args.get("customer_contact_" + str(i)).split(" ")
+			try:
 				frappe.get_doc({
-					"doctype":"Contact",
-					"customer": customer,
-					"first_name":contact[0],
-					"last_name": len(contact) > 1 and contact[1] or ""
+					"doctype":"Customer",
+					"customer_name": customer,
+					"customer_type": "Company",
+					"customer_group": _("Commercial"),
+					"territory": args.get("country"),
+					"company": args.get("company_name").strip()
 				}).insert()
 
+				if args.get("customer_contact_" + str(i)):
+					contact = args.get("customer_contact_" + str(i)).split(" ")
+					frappe.get_doc({
+						"doctype":"Contact",
+						"customer": customer,
+						"first_name":contact[0],
+						"last_name": len(contact) > 1 and contact[1] or ""
+					}).insert()
+			except frappe.NameError:
+				pass
+
 def create_suppliers(args):
 	for i in xrange(1,6):
 		supplier = args.get("supplier_" + str(i))
 		if supplier:
-			frappe.get_doc({
-				"doctype":"Supplier",
-				"supplier_name": supplier,
-				"supplier_type": _("Local"),
-				"company": args.get("company_name").strip()
-			}).insert()
-
-			if args.get("supplier_contact_" + str(i)):
-				contact = args.get("supplier_contact_" + str(i)).split(" ")
+			try:
 				frappe.get_doc({
-					"doctype":"Contact",
-					"supplier": supplier,
-					"first_name":contact[0],
-					"last_name": len(contact) > 1 and contact[1] or ""
+					"doctype":"Supplier",
+					"supplier_name": supplier,
+					"supplier_type": _("Local"),
+					"company": args.get("company_name").strip()
 				}).insert()
 
+				if args.get("supplier_contact_" + str(i)):
+					contact = args.get("supplier_contact_" + str(i)).split(" ")
+					frappe.get_doc({
+						"doctype":"Contact",
+						"supplier": supplier,
+						"first_name":contact[0],
+						"last_name": len(contact) > 1 and contact[1] or ""
+					}).insert()
+			except frappe.NameError:
+				pass
+
 
 def create_letter_head(args):
 	if args.get("attach_letterhead"):
diff --git a/erpnext/startup/report_data_map.py b/erpnext/startup/report_data_map.py
index 813090f..b8653cd 100644
--- a/erpnext/startup/report_data_map.py
+++ b/erpnext/startup/report_data_map.py
@@ -19,7 +19,7 @@
 	# Accounts
 	"Account": {
 		"columns": ["name", "parent_account", "lft", "rgt", "report_type",
-			"company", "group_or_ledger"],
+			"company", "is_group"],
 		"conditions": ["docstatus < 2"],
 		"order_by": "lft",
 		"links": {
diff --git a/erpnext/stock/doctype/delivery_note/delivery_note.js b/erpnext/stock/doctype/delivery_note/delivery_note.js
index 00916c2..631009f 100644
--- a/erpnext/stock/doctype/delivery_note/delivery_note.js
+++ b/erpnext/stock/doctype/delivery_note/delivery_note.js
@@ -214,7 +214,7 @@
 			filters: {
 				"report_type": "Profit and Loss",
 				"company": doc.company,
-				"group_or_ledger": "Ledger"
+				"is_group": 0
 			}
 		}
 	}
@@ -236,7 +236,7 @@
 
 			filters: {
 				'company': doc.company,
-				'group_or_ledger': "Ledger"
+				"is_group": 0
 			}
 		}
 	}
diff --git a/erpnext/stock/doctype/item/item.js b/erpnext/stock/doctype/item/item.js
index 24851dd..55d6d33 100644
--- a/erpnext/stock/doctype/item/item.js
+++ b/erpnext/stock/doctype/item/item.js
@@ -122,7 +122,7 @@
 			return {
 				filters: {
 					"report_type": "Profit and Loss",
-					"group_or_ledger": "Ledger"
+					"is_group": 0
 				}
 			}
 		}
@@ -133,7 +133,7 @@
 			return {
 				filters: {
 					"report_type": "Profit and Loss",
-					'group_or_ledger': "Ledger",
+					"is_group": 0,
 					'account_type': "Income Account"
 				}
 			}
@@ -144,7 +144,7 @@
 		// -----------------------------
 		frm.fields_dict['buying_cost_center'].get_query = function(doc) {
 			return {
-				filters:{ 'group_or_ledger': "Ledger" }
+				filters:{ "is_group": 0 }
 			}
 		}
 
@@ -153,7 +153,7 @@
 		// -----------------------------
 		frm.fields_dict['selling_cost_center'].get_query = function(doc) {
 			return {
-				filters:{ 'group_or_ledger': "Ledger" }
+				filters:{ "is_group": 0 }
 			}
 		}
 
diff --git a/erpnext/stock/doctype/stock_entry/stock_entry.js b/erpnext/stock/doctype/stock_entry/stock_entry.js
index c7c7aaa..6bb2e2f 100644
--- a/erpnext/stock/doctype/stock_entry/stock_entry.js
+++ b/erpnext/stock/doctype/stock_entry/stock_entry.js
@@ -51,7 +51,7 @@
 				return {
 					filters: {
 						"company": me.frm.doc.company,
-						"group_or_ledger": "Ledger"
+						"is_group": 0
 					}
 				}
 			}
diff --git a/erpnext/stock/doctype/stock_reconciliation/stock_reconciliation.js b/erpnext/stock/doctype/stock_reconciliation/stock_reconciliation.js
index 67eb882..c0ae213 100644
--- a/erpnext/stock/doctype/stock_reconciliation/stock_reconciliation.js
+++ b/erpnext/stock/doctype/stock_reconciliation/stock_reconciliation.js
@@ -65,7 +65,7 @@
 				return {
 					"filters": {
 						'company': me.frm.doc.company,
-						'group_or_ledger': 'Ledger'
+						"is_group": 0
 					}
 				}
 			}
@@ -73,7 +73,7 @@
 				return {
 					"filters": {
 						'company': me.frm.doc.company,
-						'group_or_ledger': 'Ledger'
+						"is_group": 0
 					}
 				}
 			}
diff --git a/erpnext/stock/doctype/warehouse/warehouse.js b/erpnext/stock/doctype/warehouse/warehouse.js
index 27b63b5..22396b7 100644
--- a/erpnext/stock/doctype/warehouse/warehouse.js
+++ b/erpnext/stock/doctype/warehouse/warehouse.js
@@ -9,7 +9,7 @@
 	return {
 		filters: {
 			"company": cur_frm.doc.company,
-			'group_or_ledger': "Group"
+			'is_group': 1
 		}
 	}
 })
diff --git a/erpnext/stock/doctype/warehouse/warehouse.py b/erpnext/stock/doctype/warehouse/warehouse.py
index 1643f93..2024ebe 100644
--- a/erpnext/stock/doctype/warehouse/warehouse.py
+++ b/erpnext/stock/doctype/warehouse/warehouse.py
@@ -48,7 +48,7 @@
 						"doctype": "Account",
 						'account_name': self.warehouse_name,
 						'parent_account': self.create_account_under,
-						'group_or_ledger':'Ledger',
+						'is_group':0,
 						'company':self.company,
 						"account_type": "Warehouse",
 						"warehouse": self.name,