Merge branch 'responsive' of github.com:webnotes/erpnext into responsive
diff --git a/accounts/page/accounts_home/accounts_home.js b/accounts/page/accounts_home/accounts_home.js
index aa527f7..e76255e 100644
--- a/accounts/page/accounts_home/accounts_home.js
+++ b/accounts/page/accounts_home/accounts_home.js
@@ -53,6 +53,22 @@
 		]
 	},
 	{
+		title: wn._("Setup"),
+		icon: "icon-wrench",
+		items: [
+			{
+				label: wn._("Company"),
+				description: wn._("Company Master."),
+				doctype:"Company"
+			},
+			{
+				label: wn._("Fiscal Year"),
+				description: wn._("Accounting Year."),
+				doctype:"Fiscal Year"
+			},
+		]
+	},
+	{
 		title: wn._("Tools"),
 		icon: "icon-wrench",
 		items: [
diff --git a/public/js/complete_setup.js b/public/js/complete_setup.js
index cdc8662..4fb29e3 100644
--- a/public/js/complete_setup.js
+++ b/public/js/complete_setup.js
@@ -44,7 +44,7 @@
 				{fieldname:'timezone', label: 'Time Zone', reqd:1,
 					options: "", fieldtype: 'Select'},
 				{fieldname:'industry', label: 'Industry', reqd:1,
-					options: erpnext.complete_setup.industry_list.join('\n'), fieldtype: 'Select'},
+					options: erpnext.complete_setup.domains.join('\n'), fieldtype: 'Select'},
 				{fieldname:'update', label:'Setup',fieldtype:'Button'},
 			],
 		});
@@ -129,11 +129,5 @@
 	
 	fy_start_list: ['', '1st Jan', '1st Apr', '1st Jul', '1st Oct'],
 
-	industry_list: ['', 'Aerospace and Defence', 'Agriculture', 'Apparel', 'Automobile',
-	'Banking', 'Biotechnology', 'Chemical', 'Communications', 'Consulting', 'Customer Service',
-	'Education', 'Electronics', 'Energy', 'Engineering', 'Entertainment', 'Environmental',
-	'Finance', 'Food and Beverage', 'Government', 'Healthcare', 'Hospitality',
-	'Information Technology', 'Insurance', 'Machinery', 'Manufacturing', 'Media',
-	'Not For Profit', 'Recreation', 'Retail', 'Shipping', 'Technology',
-	'Telecommunications', 'Transportation', 'Trading', 'Utilities', 'Other'],	
+	domains: ['', "Manufacturing", "Retail", "Distribution", "Services"],	
 });
\ No newline at end of file
diff --git a/setup/doctype/company/company.py b/setup/doctype/company/company.py
index 55a17f7..ea3d1b9 100644
--- a/setup/doctype/company/company.py
+++ b/setup/doctype/company/company.py
@@ -33,9 +33,28 @@
 		if self.doc.fields.get('__islocal') and len(self.doc.abbr) > 5:
 			webnotes.msgprint("Abbreviation cannot have more than 5 characters",
 				raise_exception=1)
-	
-	# Create default accounts
-	# ---------------------------------------------------
+
+	def on_update(self):
+		if not webnotes.conn.sql("""select name from tabAccount 
+			where company=%s and docstatus<2 limit 1""", self.doc.name):
+			self.create_default_accounts()
+			self.create_default_warehouses()
+		
+		if not self.doc.cost_center:
+			self.create_default_cost_center()
+			
+		self.set_default_accounts()
+
+		if self.doc.default_currency:
+			webnotes.conn.set_value("Currency", self.doc.default_currency, "enabled", 1)
+
+	def create_default_warehouses(self):
+		for whname in ("Stores", "Work In Progress", "Finished Goods"):
+			webnotes.bean({
+				"doctype":"Warehouse",
+				"company": self.doc.name
+			}).insert()
+
 	def create_default_accounts(self):
 		self.fld_dict = {'account_name':0,'parent_account':1,'group_or_ledger':2,'is_pl_account':3,'account_type':4,'debit_or_credit':5,'company':6,'tax_rate':7}
 		acc_list_common = [
@@ -162,32 +181,16 @@
 			for d in acc_list_india:
 				self.add_acc(d)
 
-	# Create account
-	# ---------------------------------------------------
 	def add_acc(self,lst):
-		ac = Document('Account')
+		account = webnotes.bean({
+			"doctype": "Account",
+			"freeze_account": "No",
+			"master_type": "",
+		})
 		for d in self.fld_dict.keys():
-			ac.fields[d] = (d == 'parent_account' and lst[self.fld_dict[d]]) and lst[self.fld_dict[d]] +' - '+ self.doc.abbr or lst[self.fld_dict[d]]
-		ac_obj = get_obj(doc=ac)
-		ac_obj.doc.freeze_account='No'
-		ac_obj.doc.master_type = ''
-		ac_obj.validate()
-		ac_obj.doc.save(1)
-		ac_obj.on_update()
-
-
-	# Set letter head
-	# ---------------------------------------------------
-	def set_letter_head(self):
-		if not self.doc.letter_head:
-			if self.doc.address:
-				header = """ 
-<div><h3> %(comp)s </h3> %(add)s </div>
-
-			""" % {'comp':self.doc.name,
-				 'add':self.doc.address.replace("\n",'<br>')}
-			 
-				self.doc.letter_head = header
+			account.doc.fields[d] = (d == 'parent_account' and lst[self.fld_dict[d]]) and lst[self.fld_dict[d]] +' - '+ self.doc.abbr or lst[self.fld_dict[d]]
+			
+		account.insert()
 
 	def set_default_accounts(self):
 		accounts = {
@@ -209,8 +212,6 @@
 		if not self.doc.stock_adjustment_cost_center:
 				webnotes.conn.set(self.doc, "stock_adjustment_cost_center", self.doc.cost_center)
 
-	# Create default cost center
-	# ---------------------------------------------------
 	def create_default_cost_center(self):
 		cc_list = [
 			{
@@ -237,21 +238,6 @@
 			cc_bean.insert()
 			
 		webnotes.conn.set(self.doc, "cost_center", "Main - " + self.doc.abbr)
-			
-	def on_update(self):
-		self.set_letter_head()
-
-		if not webnotes.conn.sql("""select name from tabAccount 
-			where company=%s and docstatus<2 limit 1""", self.doc.name):
-			self.create_default_accounts()
-		
-		if not self.doc.cost_center:
-			self.create_default_cost_center()
-			
-		self.set_default_accounts()
-			
-		if self.doc.default_currency:
-			webnotes.conn.set_value("Currency", self.doc.default_currency, "enabled", 1)
 
 	def on_trash(self):
 		"""
diff --git a/setup/doctype/company/company.txt b/setup/doctype/company/company.txt
index e3afda1..134af2c 100644
--- a/setup/doctype/company/company.txt
+++ b/setup/doctype/company/company.txt
@@ -2,7 +2,7 @@
  {
   "creation": "2013-04-10 08:35:39", 
   "docstatus": 0, 
-  "modified": "2013-07-08 17:34:21", 
+  "modified": "2013-07-10 18:17:55", 
   "modified_by": "Administrator", 
   "owner": "Administrator"
  }, 
@@ -53,6 +53,17 @@
   "read_only": 0
  }, 
  {
+  "doctype": "DocField", 
+  "fieldname": "company_name", 
+  "fieldtype": "Data", 
+  "label": "Company", 
+  "no_copy": 0, 
+  "oldfieldname": "company_name", 
+  "oldfieldtype": "Data", 
+  "read_only": 0, 
+  "reqd": 1
+ }, 
+ {
   "description": "Please Enter Abbreviation or Short Name properly as it will be added as Suffix to all Account Heads.", 
   "doctype": "DocField", 
   "fieldname": "abbr", 
@@ -72,13 +83,10 @@
  }, 
  {
   "doctype": "DocField", 
-  "fieldname": "company_name", 
-  "fieldtype": "Data", 
-  "label": "Company", 
-  "no_copy": 0, 
-  "oldfieldname": "company_name", 
-  "oldfieldtype": "Data", 
-  "read_only": 0, 
+  "fieldname": "domain", 
+  "fieldtype": "Select", 
+  "label": "Domain", 
+  "options": "Distribution\nManufacturing\nRetail\nServices", 
   "reqd": 1
  }, 
  {
diff --git a/setup/doctype/warehouse_type/README.md b/setup/doctype/warehouse_type/README.md
deleted file mode 100644
index ad065d5..0000000
--- a/setup/doctype/warehouse_type/README.md
+++ /dev/null
@@ -1 +0,0 @@
-Warehouse classification.
\ No newline at end of file
diff --git a/setup/doctype/warehouse_type/__init__.py b/setup/doctype/warehouse_type/__init__.py
deleted file mode 100644
index baffc48..0000000
--- a/setup/doctype/warehouse_type/__init__.py
+++ /dev/null
@@ -1 +0,0 @@
-from __future__ import unicode_literals
diff --git a/setup/doctype/warehouse_type/test_warehouse_type.py b/setup/doctype/warehouse_type/test_warehouse_type.py
deleted file mode 100644
index 208859b..0000000
--- a/setup/doctype/warehouse_type/test_warehouse_type.py
+++ /dev/null
@@ -1,6 +0,0 @@
-test_records = [
-	[{
-		"doctype": "Warehouse Type",
-		"warehouse_type": "_Test Warehouse Type"
-	}]
-]
\ No newline at end of file
diff --git a/setup/doctype/warehouse_type/warehouse_type.js b/setup/doctype/warehouse_type/warehouse_type.js
deleted file mode 100644
index 3cad944..0000000
--- a/setup/doctype/warehouse_type/warehouse_type.js
+++ /dev/null
@@ -1,26 +0,0 @@
-// ERPNext - web based ERP (http://erpnext.com)
-// Copyright (C) 2012 Web Notes Technologies Pvt Ltd
-// 
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation, either version 3 of the License, or
-// (at your option) any later version.
-// 
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-// GNU General Public License for more details.
-// 
-// You should have received a copy of the GNU General Public License
-// along with this program.  If not, see <http://www.gnu.org/licenses/>.
-
- 
-
-//--------- ONLOAD -------------
-cur_frm.cscript.onload = function(doc, cdt, cdn) {
-   
-}
-
-cur_frm.cscript.refresh = function(doc, cdt, cdn) {
-   
-}
\ No newline at end of file
diff --git a/setup/doctype/warehouse_type/warehouse_type.py b/setup/doctype/warehouse_type/warehouse_type.py
deleted file mode 100644
index 7794430..0000000
--- a/setup/doctype/warehouse_type/warehouse_type.py
+++ /dev/null
@@ -1,22 +0,0 @@
-# ERPNext - web based ERP (http://erpnext.com)
-# Copyright (C) 2012 Web Notes Technologies Pvt Ltd
-# 
-# This program is free software: you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation, either version 3 of the License, or
-# (at your option) any later version.
-# 
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU General Public License for more details.
-# 
-# You should have received a copy of the GNU General Public License
-# along with this program.  If not, see <http://www.gnu.org/licenses/>.
-
-from __future__ import unicode_literals
-import webnotes
-
-class DocType:
-	def __init__(self, d, dl):
-		self.doc, self.doclist = d, dl
diff --git a/setup/doctype/warehouse_type/warehouse_type.txt b/setup/doctype/warehouse_type/warehouse_type.txt
deleted file mode 100644
index 31df7d6..0000000
--- a/setup/doctype/warehouse_type/warehouse_type.txt
+++ /dev/null
@@ -1,82 +0,0 @@
-[
- {
-  "creation": "2013-01-10 16:34:24", 
-  "docstatus": 0, 
-  "modified": "2013-07-05 15:02:15", 
-  "modified_by": "Administrator", 
-  "owner": "Administrator"
- }, 
- {
-  "autoname": "field:warehouse_type", 
-  "doctype": "DocType", 
-  "icon": "icon-flag", 
-  "istable": 0, 
-  "module": "Setup", 
-  "name": "__common__"
- }, 
- {
-  "doctype": "DocField", 
-  "name": "__common__", 
-  "parent": "Warehouse Type", 
-  "parentfield": "fields", 
-  "parenttype": "DocType", 
-  "permlevel": 0
- }, 
- {
-  "amend": 0, 
-  "doctype": "DocPerm", 
-  "name": "__common__", 
-  "parent": "Warehouse Type", 
-  "parentfield": "permissions", 
-  "parenttype": "DocType", 
-  "permlevel": 0, 
-  "read": 1, 
-  "report": 1, 
-  "submit": 0
- }, 
- {
-  "doctype": "DocType", 
-  "name": "Warehouse Type"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "trash_reason", 
-  "fieldtype": "Small Text", 
-  "label": "Trash Reason", 
-  "oldfieldname": "trash_reason", 
-  "oldfieldtype": "Small Text", 
-  "read_only": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "warehouse_type", 
-  "fieldtype": "Data", 
-  "in_filter": 1, 
-  "label": "Warehouse Type", 
-  "oldfieldname": "warehouse_type", 
-  "oldfieldtype": "Data", 
-  "reqd": 1, 
-  "search_index": 1
- }, 
- {
-  "cancel": 1, 
-  "create": 1, 
-  "doctype": "DocPerm", 
-  "role": "Material Master Manager", 
-  "write": 1
- }, 
- {
-  "cancel": 0, 
-  "create": 0, 
-  "doctype": "DocPerm", 
-  "role": "Material Manager", 
-  "write": 0
- }, 
- {
-  "cancel": 0, 
-  "create": 0, 
-  "doctype": "DocPerm", 
-  "role": "Material User", 
-  "write": 0
- }
-]
\ No newline at end of file
diff --git a/startup/install.py b/startup/install.py
index de60e38..5b948a9 100644
--- a/startup/install.py
+++ b/startup/install.py
@@ -10,9 +10,9 @@
 	
 def make_modules():
 	modules = [
-		" Home", " System", " Utilities", " Website", " Setup",
-		" Selling", " Buying", " Projects", " Accounts", " Stock",
-		" Support", " HR", " Manufacturing"]
+		"Home", "System", "Utilities", "Website", "Setup",
+		"Selling", "Buying", "Projects", "Accounts", "Stock",
+		"Support", "HR", "Manufacturing"]
 	
 	for m in modules:
 		doc = webnotes.doc(fielddata = {
@@ -100,8 +100,10 @@
 def import_defaults():
 	records = [
 		# item group
-		{'doctype': 'Item Group', 'item_group_name': 'All Item Groups', 'is_group': 'Yes', 'name': 'All Item Groups', 'parent_item_group': ''},
-		{'doctype': 'Item Group', 'item_group_name': 'Default', 'is_group': 'No', 'name': 'Default', 'parent_item_group': 'All Item Groups'},
+		{'doctype': 'Item Group', 'item_group_name': 'All Item Groups', 'is_group': 'Yes', 'parent_item_group': ''},
+		{'doctype': 'Item Group', 'item_group_name': 'Products', 'is_group': 'No', 'parent_item_group': 'All Item Groups'},
+		{'doctype': 'Item Group', 'item_group_name': 'Raw Material', 'is_group': 'No', 'parent_item_group': 'All Item Groups'},
+		{'doctype': 'Item Group', 'item_group_name': 'Services', 'is_group': 'No', 'parent_item_group': 'All Item Groups'},
 		
 		# deduction type
 		{'doctype': 'Deduction Type', 'name': 'Income Tax', 'description': 'Income Tax', 'deduction_name': 'Income Tax'},
@@ -131,37 +133,30 @@
 			
 		# customer group
 		{'doctype': 'Customer Group', 'customer_group_name': 'All Customer Groups', 'is_group': 'Yes', 	'name': 'All Customer Groups', 'parent_customer_group': ''},
-		{'doctype': 'Customer Group', 'customer_group_name': 'Default', 'is_group': 'No', 'name': 'Default Customer Group', 'parent_customer_group': 'All Customer Groups'},
+		{'doctype': 'Customer Group', 'customer_group_name': 'Individual', 'is_group': 'No', 'parent_customer_group': 'All Customer Groups'},
+		{'doctype': 'Customer Group', 'customer_group_name': 'Commercial', 'is_group': 'No', 'parent_customer_group': 'All Customer Groups'},
+		{'doctype': 'Customer Group', 'customer_group_name': 'Non Profit', 'is_group': 'No', 'parent_customer_group': 'All Customer Groups'},
+		{'doctype': 'Customer Group', 'customer_group_name': 'Government', 'is_group': 'No', 'parent_customer_group': 'All Customer Groups'},
 			
 		# supplier type
-		{'doctype': 'Supplier Type', 'name': 'Default Supplier Type', 'supplier_type': 'Default Supplier Type'},
-		
-		# warehouse type
-		{'doctype': 'Warehouse Type', 'name': 'Default Warehouse Type', 'warehouse_type': 'Default Warehouse Type'},
-		{'doctype': 'Warehouse Type', 'name': 'Fixed Asset', 'warehouse_type': 'Fixed Asset'},
-		{'doctype': 'Warehouse Type', 'name': 'Reserved', 'warehouse_type': 'Reserved'},
-		{'doctype': 'Warehouse Type', 'name': 'Rejected', 'warehouse_type': 'Rejected'},
-		{'doctype': 'Warehouse Type', 'name': 'Sample', 'warehouse_type': 'Sample'},
-		{'doctype': 'Warehouse Type', 'name': 'Stores', 'warehouse_type': 'Stores'},
-		{'doctype': 'Warehouse Type', 'name': 'WIP Warehouse', 'warehouse_type': 'WIP Warehouse'},
-		
-		# warehouse 
-		{'doctype': 'Warehouse', 'warehouse_name': 'Default Warehouse', 'name': 'Default Warehouse', 'warehouse_type': 'Default Warehouse Type'},
-			
+		{'doctype': 'Supplier Type', 'supplier_type': 'Services'},
+		{'doctype': 'Supplier Type', 'supplier_type': 'Local'},
+		{'doctype': 'Supplier Type', 'supplier_type': 'Raw Material'},
+		{'doctype': 'Supplier Type', 'supplier_type': 'Electrical'},
+		{'doctype': 'Supplier Type', 'supplier_type': 'Hardware'},
+		{'doctype': 'Supplier Type', 'supplier_type': 'Pharmaceutical'},
+		{'doctype': 'Supplier Type', 'supplier_type': 'Distributor'},
+
 		# Workstation
 		{'doctype': 'Workstation', 'name': 'Default Workstation', 'workstation_name': 'Default Workstation', 'warehouse': 'Default Warehouse'},
 		
 		# Sales Person
-		{'doctype': 'Sales Person', 'name': 'All Sales Persons', 'sales_person_name': 'All Sales Persons', 'is_group': "Yes", "parent_sales_person": ""},
+		{'doctype': 'Sales Person', 'sales_person_name': 'Sales Team', 'is_group': "Yes", "parent_sales_person": ""},
 		
 		# UOM
 		{'uom_name': 'Unit', 'doctype': 'UOM', 'name': 'Unit'}, 
 		{'uom_name': 'Box', 'doctype': 'UOM', 'name': 'Box'}, 
-		{'uom_name': 'Ft', 'doctype': 'UOM', 'name': 'Ft'}, 
 		{'uom_name': 'Kg', 'doctype': 'UOM', 'name': 'Kg'}, 
-		{'uom_name': 'Ltr', 'doctype': 'UOM', 'name': 'Ltr'}, 
-		{'uom_name': 'Meter', 'doctype': 'UOM', 'name': 'Meter'}, 
-		{'uom_name': 'Mtr', 'doctype': 'UOM', 'name': 'Mtr'}, 
 		{'uom_name': 'Nos', 'doctype': 'UOM', 'name': 'Nos'}, 
 		{'uom_name': 'Pair', 'doctype': 'UOM', 'name': 'Pair'}, 
 		{'uom_name': 'Set', 'doctype': 'UOM', 'name': 'Set'}, 
diff --git a/stock/doctype/bin/bin.py b/stock/doctype/bin/bin.py
index 61baafa..cf30c5a 100644
--- a/stock/doctype/bin/bin.py
+++ b/stock/doctype/bin/bin.py
@@ -31,11 +31,7 @@
 	def validate(self):
 		if not self.doc.stock_uom:
 			self.doc.stock_uom = webnotes.conn.get_value('Item', self.doc.item_code, 'stock_uom')
-		
-		if not self.doc.warehouse_type:
-			self.doc.warehouse_type = webnotes.conn.get_value("Warehouse", self.doc.warehouse,
-				"warehouse_type")
-		
+				
 		self.validate_mandatory()
 		
 		self.doc.projected_qty = flt(self.doc.actual_qty) + flt(self.doc.ordered_qty) + \
diff --git a/stock/doctype/bin/bin.txt b/stock/doctype/bin/bin.txt
index 34681a8..676976a 100644
--- a/stock/doctype/bin/bin.txt
+++ b/stock/doctype/bin/bin.txt
@@ -2,7 +2,7 @@
  {
   "creation": "2013-01-10 16:34:25", 
   "docstatus": 0, 
-  "modified": "2013-07-10 14:54:04", 
+  "modified": "2013-07-10 18:32:13", 
   "modified_by": "Administrator", 
   "owner": "Administrator"
  }, 
@@ -54,15 +54,6 @@
  }, 
  {
   "doctype": "DocField", 
-  "fieldname": "warehouse_type", 
-  "fieldtype": "Data", 
-  "in_list_view": 1, 
-  "label": "Warehouse Type", 
-  "oldfieldname": "warehouse_type", 
-  "oldfieldtype": "Data"
- }, 
- {
-  "doctype": "DocField", 
   "fieldname": "item_code", 
   "fieldtype": "Link", 
   "in_filter": 1, 
diff --git a/stock/doctype/item/item.py b/stock/doctype/item/item.py
index 85bb3d1..4a4cd89 100644
--- a/stock/doctype/item/item.py
+++ b/stock/doctype/item/item.py
@@ -51,7 +51,6 @@
 		self.fill_customer_code()
 		self.check_item_tax()
 		self.validate_barcode()
-		self.check_non_asset_warehouse()
 		self.cant_change()
 		self.validate_item_type_for_reorder()
 
@@ -185,18 +184,7 @@
 			if duplicate:
 				msgprint("Barcode: %s already used in item: %s" % 
 					(self.doc.barcode, cstr(duplicate[0][0])), raise_exception = 1)
-					
-	def check_non_asset_warehouse(self):
-		if not self.doc.__islocal and self.doc.is_asset_item == "Yes":
-			existing_qty = webnotes.conn.sql("select t1.warehouse, t1.actual_qty from tabBin t1, tabWarehouse t2 where t1.item_code=%s and (t2.warehouse_type!='Fixed Asset' or t2.warehouse_type is null) and t1.warehouse=t2.name and t1.actual_qty > 0", self.doc.name)
-			for e in existing_qty:
-				msgprint("%s Units exist in Warehouse %s, which is not an Asset Warehouse." % 
-					(e[1],e[0]))
-			if existing_qty:
-				self.doc.is_asset_item = 'No'
-				msgprint(_("""Please transfer the above quantities to an asset warehouse \
-					before changing this item to an asset item"""), raise_exception=1)
-					
+
 	def cant_change(self):
 		if not self.doc.fields.get("__islocal"):
 			vals = webnotes.conn.get_value("Item", self.doc.name, 
diff --git a/stock/doctype/stock_ledger/stock_ledger.py b/stock/doctype/stock_ledger/stock_ledger.py
index 8fdb50e..5b3d660 100644
--- a/stock/doctype/stock_ledger/stock_ledger.py
+++ b/stock/doctype/stock_ledger/stock_ledger.py
@@ -222,9 +222,6 @@
 
 	def make_entry(self, args):
 		args.update({"doctype": "Stock Ledger Entry"})
-		if args.get("warehouse"):
-			args["warehouse_type"] = webnotes.conn.get_value('Warehouse' , args["warehouse"],
-				'warehouse_type')
 		sle = webnotes.bean([args])
 		sle.ignore_permissions = 1
 		sle.insert()
diff --git a/stock/doctype/stock_ledger_entry/stock_ledger_entry.txt b/stock/doctype/stock_ledger_entry/stock_ledger_entry.txt
index 38005f7..6ca9cc6 100644
--- a/stock/doctype/stock_ledger_entry/stock_ledger_entry.txt
+++ b/stock/doctype/stock_ledger_entry/stock_ledger_entry.txt
@@ -2,7 +2,7 @@
  {
   "creation": "2013-01-29 19:25:42", 
   "docstatus": 0, 
-  "modified": "2013-07-05 14:56:15", 
+  "modified": "2013-07-10 18:34:09", 
   "modified_by": "Administrator", 
   "owner": "Administrator"
  }, 
@@ -92,18 +92,6 @@
   "width": "100px"
  }, 
  {
-  "doctype": "DocField", 
-  "fieldname": "warehouse_type", 
-  "fieldtype": "Select", 
-  "in_filter": 1, 
-  "label": "Warehouse Type", 
-  "oldfieldname": "warehouse_type", 
-  "oldfieldtype": "Select", 
-  "options": "link:Warehouse Type", 
-  "read_only": 1, 
-  "search_index": 0
- }, 
- {
   "description": "The date at which current entry will get or has actually executed.", 
   "doctype": "DocField", 
   "fieldname": "posting_date", 
diff --git a/stock/doctype/warehouse/test_warehouse.py b/stock/doctype/warehouse/test_warehouse.py
index 10b49b6..34cc28c 100644
--- a/stock/doctype/warehouse/test_warehouse.py
+++ b/stock/doctype/warehouse/test_warehouse.py
@@ -2,19 +2,16 @@
 	[{
 		"doctype": "Warehouse",
 		"warehouse_name": "_Test Warehouse",
-		"warehouse_type": "_Test Warehouse Type",
 		"company": "_Test Company"
 	}],
 	[{
 		"doctype": "Warehouse",
 		"warehouse_name": "_Test Warehouse 1",
-		"warehouse_type": "_Test Warehouse Type",
 		"company": "_Test Company"
 	}],
 	[{
 		"doctype": "Warehouse",
 		"warehouse_name": "_Test Warehouse 2",
-		"warehouse_type": "_Test Warehouse Type",
 		"company": "_Test Company 1"
 	}]	
 ]
diff --git a/stock/doctype/warehouse/warehouse.py b/stock/doctype/warehouse/warehouse.py
index 7eb407c..1f9a32a 100644
--- a/stock/doctype/warehouse/warehouse.py
+++ b/stock/doctype/warehouse/warehouse.py
@@ -27,7 +27,12 @@
 	def __init__(self, doc, doclist=[]):
 		self.doc = doc
 		self.doclist = doclist
-		
+	
+	def autoname(self):
+		suffix = " - " + webnotes.conn.get_value("Company", self.doc.company, "abbr")
+		if not self.doc.warehouse_name.endswith(suffix):
+			self.doc.name = self.doc.warehouse_name + suffix
+	
 	def get_bin(self, item_code, warehouse=None):
 		warehouse = warehouse or self.doc.name
 		bin = sql("select name from tabBin where item_code = %s and \
@@ -47,15 +52,7 @@
 			bin_obj = get_obj('Bin', bin)
 		return bin_obj
 	
-
-	def validate_asset(self, item_code):
-		if webnotes.conn.get_value("Item", item_code, "is_asset_item") == 'Yes' \
-				and self.doc.warehouse_type != 'Fixed Asset':
-			msgprint("""Fixed Asset Item %s can only be transacted in a 
-				Fixed Asset type Warehouse""" % item_code, raise_exception=1)
-
 	def update_bin(self, args):
-		self.validate_asset(args.get("item_code"))
 		is_stock_item = webnotes.conn.get_value('Item', args.get("item_code"), 'is_stock_item')
 		if is_stock_item == 'Yes':
 			bin = self.get_bin(args.get("item_code"))
@@ -68,14 +65,7 @@
 	def validate(self):
 		if self.doc.email_id and not validate_email_add(self.doc.email_id):
 				msgprint("Please enter valid Email Id", raise_exception=1)
-		if not self.doc.warehouse_type:
-			msgprint("Warehouse Type is Mandatory", raise_exception=1)
-			
-		wt = sql("select warehouse_type from `tabWarehouse` where name ='%s'" % self.doc.name)
-		if wt and cstr(self.doc.warehouse_type) != cstr(wt[0][0]):
-			sql("""update `tabStock Ledger Entry` set warehouse_type = %s 
-				where warehouse = %s""", (self.doc.warehouse_type, self.doc.name))
-	
+
 	def merge_warehouses(self):
 		webnotes.conn.auto_commit_on_many_writes = 1
 		
diff --git a/stock/doctype/warehouse/warehouse.txt b/stock/doctype/warehouse/warehouse.txt
index 3873408..95b0b52 100644
--- a/stock/doctype/warehouse/warehouse.txt
+++ b/stock/doctype/warehouse/warehouse.txt
@@ -2,20 +2,18 @@
  {
   "creation": "2013-03-07 18:50:32", 
   "docstatus": 0, 
-  "modified": "2013-07-05 15:02:12", 
+  "modified": "2013-07-10 18:46:40", 
   "modified_by": "Administrator", 
   "owner": "Administrator"
  }, 
  {
   "allow_rename": 1, 
-  "autoname": "field:warehouse_name", 
   "description": "A logical Warehouse against which stock entries are made.", 
   "doctype": "DocType", 
   "document_type": "Master", 
   "icon": "icon-building", 
   "module": "Stock", 
-  "name": "__common__", 
-  "search_fields": "warehouse_type"
+  "name": "__common__"
  }, 
  {
   "doctype": "DocField", 
@@ -59,19 +57,6 @@
  }, 
  {
   "doctype": "DocField", 
-  "fieldname": "warehouse_type", 
-  "fieldtype": "Link", 
-  "in_filter": 1, 
-  "in_list_view": 1, 
-  "label": "Warehouse Type", 
-  "oldfieldname": "warehouse_type", 
-  "oldfieldtype": "Link", 
-  "options": "Warehouse Type", 
-  "permlevel": 0, 
-  "reqd": 1
- }, 
- {
-  "doctype": "DocField", 
   "fieldname": "company", 
   "fieldtype": "Link", 
   "in_filter": 1, 
@@ -80,12 +65,13 @@
   "oldfieldtype": "Link", 
   "options": "Company", 
   "permlevel": 0, 
+  "reqd": 1, 
   "search_index": 1
  }, 
  {
   "doctype": "DocField", 
   "fieldname": "column_break_4", 
-  "fieldtype": "Column Break", 
+  "fieldtype": "Section Break", 
   "permlevel": 0
  }, 
  {
diff --git a/utilities/cleanup_data.py b/utilities/cleanup_data.py
index df7f4be..db6d3ec 100644
--- a/utilities/cleanup_data.py
+++ b/utilities/cleanup_data.py
@@ -42,8 +42,6 @@
 	print "Deleting masters...."
 	masters = {
 		'Workstation': ['Default Workstation'],
-		'Warehouse Type': ['Default Warehouse Type', 'Fixed Asset', 'Rejected', 'Reserved', 
-			'Sample', 'Stores', 'WIP Warehouse'],
 		'Warehouse': ['Default Warehouse'],
 		'UOM': ['Kg', 'Mtr', 'Box', 'Ltr', 'Nos', 'Ft', 'Pair', 'Set'],
 		'Territory': ['All Territories', 'Default Territory'],
@@ -139,7 +137,6 @@
 		'default_item_group': 'Default', 
 		'default_stock_uom': 'Nos', 
 		'default_valuation_method': 'FIFO', 
-		'default_warehouse_type': 'Default Warehouse Type', 
 		'tolerance': None, 
 		'acc_frozen_upto': None, 
 		'bde_auth_role': None, 
diff --git a/website/page/website_home/website_home.js b/website/page/website_home/website_home.js
index bdedcc9..11a22d5 100644
--- a/website/page/website_home/website_home.js
+++ b/website/page/website_home/website_home.js
@@ -78,12 +78,6 @@
 		right: true,
 		items: [
 			{
-				"route":"Form/Product Settings",
-				"label":wn._("Product Settings"),
-				"description":wn._("Settings for Product Catalog on the website."),
-				doctype:"Product Settings"
-			},
-			{
 				"route":"Form/About Us Settings",
 				"label":wn._("About Us Settings"),
 				"description":wn._("Settings for About Us Page."),