Merge branch 'master' of github.com:webnotes/erpnext into stock_reco
diff --git a/accounts/doctype/bank_reconciliation/bank_reconciliation.txt b/accounts/doctype/bank_reconciliation/bank_reconciliation.txt
index 9914b48..f04cd0a 100644
--- a/accounts/doctype/bank_reconciliation/bank_reconciliation.txt
+++ b/accounts/doctype/bank_reconciliation/bank_reconciliation.txt
@@ -2,25 +2,19 @@
  {
   "owner": "Administrator", 
   "docstatus": 0, 
-  "creation": "2012-03-27 14:35:40", 
+  "creation": "2012-07-03 13:30:49", 
   "modified_by": "Administrator", 
-  "modified": "2012-03-27 14:35:40"
+  "modified": "2013-01-10 12:15:49"
  }, 
  {
-  "section_style": "Simple", 
   "allow_print": 1, 
   "module": "Accounts", 
-  "doctype": "DocType", 
-  "server_code_error": " ", 
   "read_only": 1, 
   "allow_email": 1, 
   "hide_heading": 1, 
   "issingle": 1, 
   "name": "__common__", 
-  "colour": "White:FFF", 
-  "_last_update": "1294312169", 
-  "show_in_menu": 0, 
-  "version": 12, 
+  "doctype": "DocType", 
   "hide_toolbar": 1, 
   "allow_copy": 1
  }, 
@@ -32,10 +26,13 @@
   "parentfield": "fields"
  }, 
  {
+  "amend": 0, 
   "name": "__common__", 
   "parent": "Bank Reconciliation", 
   "read": 1, 
+  "submit": 0, 
   "doctype": "DocPerm", 
+  "cancel": 0, 
   "parenttype": "DocType", 
   "parentfield": "permissions"
  }, 
@@ -44,43 +41,14 @@
   "doctype": "DocType"
  }, 
  {
-  "amend": 0, 
-  "create": 1, 
-  "doctype": "DocPerm", 
-  "submit": 0, 
-  "write": 1, 
-  "role": "Accounts User", 
-  "cancel": 0, 
-  "permlevel": 0
- }, 
- {
-  "role": "All", 
-  "permlevel": 1, 
-  "doctype": "DocPerm"
- }, 
- {
-  "create": 1, 
-  "doctype": "DocPerm", 
-  "write": 1, 
-  "role": "Accounts Manager", 
-  "permlevel": 0
- }, 
- {
-  "doctype": "DocField", 
-  "label": "Head HTML", 
-  "fieldname": "head_html", 
-  "fieldtype": "HTML", 
-  "permlevel": 0
- }, 
- {
   "description": "Select account head of the bank where cheque was deposited.", 
   "doctype": "DocField", 
   "label": "Bank Account", 
-  "permlevel": 0, 
+  "options": "Account", 
   "fieldname": "bank_account", 
   "fieldtype": "Link", 
   "reqd": 1, 
-  "options": "Account"
+  "permlevel": 0
  }, 
  {
   "doctype": "DocField", 
@@ -99,29 +67,27 @@
   "permlevel": 0
  }, 
  {
-  "colour": "White:FFF", 
   "doctype": "DocField", 
   "label": "Get Non Reconciled Entries", 
-  "permlevel": 0, 
+  "options": "get_details", 
   "fieldname": "get_non_reconciled_entries", 
   "fieldtype": "Button", 
-  "options": "get_details"
+  "permlevel": 0
  }, 
  {
-  "colour": "White:FFF", 
   "doctype": "DocField", 
   "label": "Entries", 
-  "permlevel": 0, 
+  "options": "Bank Reconciliation Detail", 
   "fieldname": "entries", 
   "fieldtype": "Table", 
-  "options": "Bank Reconciliation Detail"
+  "permlevel": 0
  }, 
  {
   "doctype": "DocField", 
+  "label": "Update Clearance Date", 
   "options": "update_details", 
   "fieldname": "update_clearance_date", 
   "fieldtype": "Button", 
-  "label": "Update Clearance Date", 
   "permlevel": 0
  }, 
  {
@@ -130,5 +96,18 @@
   "fieldname": "total_amount", 
   "fieldtype": "Currency", 
   "permlevel": 1
+ }, 
+ {
+  "create": 1, 
+  "doctype": "DocPerm", 
+  "write": 1, 
+  "role": "Accounts User", 
+  "permlevel": 0
+ }, 
+ {
+  "create": 0, 
+  "doctype": "DocPerm", 
+  "role": "All", 
+  "permlevel": 1
  }
 ]
\ No newline at end of file
diff --git a/accounts/doctype/fiscal_year/fiscal_year.js b/accounts/doctype/fiscal_year/fiscal_year.js
index 936037c..6e0ed38 100644
--- a/accounts/doctype/fiscal_year/fiscal_year.js
+++ b/accounts/doctype/fiscal_year/fiscal_year.js
@@ -1,3 +1,31 @@
+// 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/>.
+
 cur_frm.cscript.refresh = function(doc, dt, dn) {
 	cur_frm.toggle_enable('year_start_date', doc.__islocal)
+	
+	if (!doc.__islocal && (doc.name != sys_defaults.fiscal_year)) {
+		cur_frm.add_custom_button("Set as Default", cur_frm.cscript.set_as_default);
+		cur_frm.set_intro("To set this Fiscal Year as Deafult, click on 'Set as Default'");
+	} else cur_frm.set_intro("");
 }
+
+cur_frm.cscript.set_as_default = function() {
+	wn.call({
+		doc: cur_frm.doc,
+		method: "set_as_default"
+	});
+}
\ No newline at end of file
diff --git a/accounts/doctype/fiscal_year/fiscal_year.py b/accounts/doctype/fiscal_year/fiscal_year.py
index 7f48feb..e23351c 100644
--- a/accounts/doctype/fiscal_year/fiscal_year.py
+++ b/accounts/doctype/fiscal_year/fiscal_year.py
@@ -16,7 +16,18 @@
 
 from __future__ import unicode_literals
 import webnotes
+from webnotes import msgprint, _
 
 class DocType:
 	def __init__(self, d, dl):
-		self.doc, self.doclist = d, dl
\ No newline at end of file
+		self.doc, self.doclist = d, dl
+		
+	def set_as_default(self):
+		webnotes.conn.set_value("Global Defaults", None, "current_fiscal_year", self.doc.name)
+		webnotes.get_obj("Global Defaults").on_update()
+		
+		# clear cache
+		webnotes.clear_cache()
+		
+		msgprint(self.doc.name + _(""" is now the default Fiscal Year. \
+			Please refresh your browser for the change to take effect."""))
\ No newline at end of file
diff --git a/accounts/doctype/sales_invoice/sales_invoice.js b/accounts/doctype/sales_invoice/sales_invoice.js
index 86dc3a5..eab1d47 100644
--- a/accounts/doctype/sales_invoice/sales_invoice.js
+++ b/accounts/doctype/sales_invoice/sales_invoice.js
@@ -94,8 +94,7 @@
 		for(f in item_flds_pos) cur_frm.fields_dict['entries'].grid.set_column_disp(item_flds_pos[f], false);
 	}
 
-	if(doc.customer) unhide_field('contact_section');
-	else hide_field('contact_section');
+	cur_frm.toggle_display("contact_section", doc.customer);
 
 	// India related fields
 	var cp = wn.control_panel;
@@ -173,6 +172,8 @@
 
 //Customer
 cur_frm.cscript.customer = function(doc,dt,dn,onload) {
+	cur_frm.toggle_display("contact_section", doc.customer);
+	
 	var pl = doc.price_list_name;
 	var callback = function(r,rt) {
 			var callback2 = function(doc, dt, dn) {
@@ -191,8 +192,6 @@
 	}
 	var args = onload ? 'onload':''
 	if(doc.customer) $c_obj(make_doclist(doc.doctype, doc.name), 'get_default_customer_address', args, callback);
-
-	if(doc.customer) unhide_field('contact_section');
 	
 }
 
@@ -202,25 +201,6 @@
 	if(doc.customer) get_server_fields('get_customer_address', JSON.stringify({customer: doc.customer, address: doc.customer_address, contact: doc.contact_person}),'', doc, dt, dn, 1);
 }
 
-cur_frm.fields_dict.customer_address.on_new = function(dn) {
-	locals['Address'][dn].customer = locals[cur_frm.doctype][cur_frm.docname].customer;
-	locals['Address'][dn].customer_name = locals[cur_frm.doctype][cur_frm.docname].customer_name;
-}
-
-cur_frm.fields_dict.contact_person.on_new = function(dn) {
-	locals['Contact'][dn].customer = locals[cur_frm.doctype][cur_frm.docname].customer;
-	locals['Contact'][dn].customer_name = locals[cur_frm.doctype][cur_frm.docname].customer_name;
-}
-
-cur_frm.fields_dict['customer_address'].get_query = function(doc, cdt, cdn) {
-	return 'SELECT name,address_line1,city FROM tabAddress WHERE customer = "'+ doc.customer +'" AND docstatus != 2 AND name LIKE "%s" ORDER BY name ASC LIMIT 50';
-}
-
-cur_frm.fields_dict['contact_person'].get_query = function(doc, cdt, cdn) {
-	return 'SELECT name,CONCAT(first_name," ",ifnull(last_name,"")) As FullName,department,designation FROM tabContact WHERE customer = "'+ doc.customer +'" AND docstatus != 2 AND name LIKE "%s" ORDER BY name ASC LIMIT 50';
-}
-
-
 // Set Due Date = posting date + credit days
 cur_frm.cscript.debit_to = function(doc,dt,dn) {
 
@@ -232,7 +212,8 @@
 	var callback = function(r,rt) {
 			var doc = locals[cur_frm.doctype][cur_frm.docname];
 			if(doc.customer) $c_obj(make_doclist(dt,dn), 'get_default_customer_address', '', callback2);
-			if(doc.customer) unhide_field('contact_section');
+			cur_frm.toggle_display("contact_section", doc.customer);
+			
 			cur_frm.refresh();
 	}
 
diff --git a/accounts/page/accounts_home/accounts_home.html b/accounts/page/accounts_home/accounts_home.html
deleted file mode 100644
index 498b214..0000000
--- a/accounts/page/accounts_home/accounts_home.html
+++ /dev/null
@@ -1,142 +0,0 @@
-<div class="layout-wrapper layout-wrapper-background">
-	<div class="appframe-area"></div>
-	<div class="layout-main-section">
-		<div style="width: 48%; float: left;">
-			<h5><a href="#List/Journal Voucher">Journal Voucher</a></h5>
-			<p class="help">General Ledger Entries</p>
-			<br>
-			<h5><a href="#List/Sales Invoice">Sales Invoice</a></h5>
-			<p class="help">Bills raised to Customers</p>
-			<br>
-			<h5><a href="#List/Purchase Invoice">Purchase Invoice</a></h5>
-			<p class="help">Bills raised by Suppliers</p>
-		</div>
-		<div style="width: 48%; float: right;">
-			<h5><a href="#Accounts Browser/Account" 
-				data-role="Accounts Manager, Accounts User">Chart of Accounts</a></h5>
-			<p class="help">Structure of books of accounts</p>
-			<br>
-			<h5><a href="#Accounts Browser/Cost Center">Chart of Cost Centers</a></h5>
-			<p class="help">Structure cost centers</p>
-		</div>
-		<div style="clear: both"></div>
-		<hr>
-		<h4>Reports</h4>
-		<div style="width: 48%; float: left;">
-			<h5><a href="#general-ledger" 
-				data-role="Analytics, Accounts Manager, Accounts User">
-					General Ledger</a>
-			</h5>
-			<p class="help">General Ledger Report</p>
-			<br>
-			<h5><a href="#trial-balance"
-				data-role="Analytics, Accounts Manager, Accounts User">Trial Balance</a>
-			</h5>
-			<p class="help">Tree view of all Account balances</p>
-		</div>
-		<div style="width: 48%; float: right;">
-			<h5><a href="#financial-analytics" 
-				data-role="Analytics, Accounts Manager, Accounts User">
-					Financial Analytics</a>
-			</h5>
-			<p class="help">Visual representation of financial trends</p>
-		</div>
-		<div style="clear: both;"></div>
-		<hr>
-		<div class="reports-list"></div>
-	</div>
-	<div class="layout-side-section">
-		<div class="psidebar">
-			<div class="section">
-				<div class="section-head">Tools</div>
-				<div class="section-body">
-					<div class="section-item">
-						<a class="section-link" 
-							title="Update system bank entries (JV) with actual bank trasaction"
-							href="#Form/Bank Reconciliation/Bank Reconciliation">Bank Reconciliation</a>
-					</div>
-					<div class="section-item">
-						<a class="section-link" 
-							title="Cancel off untracked Payments (JV) against Invoices"
-							href="#Form/Payment to Invoice Matching Tool/Payment to Invoice Matching Tool">Payment Reconciliation</a>
-					</div>
-					<div class="section-item">
-						<a class="section-link" 
-							title="Clear your P/L account and balance your Balance Sheets"
-							href="#List/Period Closing Voucher">Close Period Entry</a>
-					</div>
-					<div class="section-item">
-						<a class="section-link" 
-							title = "Helper for managing return of goods (sales or purchase)"
-							href="#Form/Sales and Purchase Return Tool/Sales and Purchase Return Tool">Sales or Purchase Returns</a>
-					</div>
-					<div class="section-item">
-						<a class="section-link"
-							data-role="Accounts Manager, Accounts User"
-							title = "Analyze Sales and Purchase trends and slice them based on item, customer, groups etc"
-							href="#Report/Profile/Trend Analyzer">Trend Analyzer</a>
-					</div>
-					<div class="section-item">
-						<a class="section-link" 
-							data-role="Accounts Manager, Accounts User"
-							title = "Check your Balance Sheet and Profit & Loss Statement"
-							href="#Financial Statements">Financial Statements</a>
-					</div>
-					<div class="section-item">
-						<a class="section-link" data-role="Accounts Manager"
-							title = "Import Multiple Vouchers from CSV"
-							href="#voucher-import-tool">Voucher Import Tool</a>
-					</div>
-				</div>
-			</div>
-
-			<div class="section">
-				<div class="section-head">Setup</div>
-				<div class="section-body">
-					<div class="section-item">
-						<a class="section-link" 
-							title = "Tax and charges structure master on sales transactions"
-							href="#List/Sales Taxes and Charges Master">Sales Taxes and Charges Master</a>
-					</div>
-					<div class="section-item">
-						<a class="section-link" 
-							title = "Tax and charges structure master on purchase transactions"
-							href="#List/Purchase Taxes and Charges Master">Purchase Taxes and Charges Master</a>
-					</div>
-					<div class="section-item">
-						<a class="section-link" 
-							title = "Defaults for Point of Sale (Retail) type of Invoices"
-							href="#List/POS Setting">Point of Sale (PoS) Setting</a>
-					</div>
-					<div class="section-item">
-						<a class="section-link" 
-							title = "Seasonal distributions for budgets"
-							href="#List/Budget Distribution">Budget Distribution</a>
-					</div>
-					<div class="section-item">
-						<a class="section-link" 
-							title = "Terms of contract template"
-							href="#List/Terms and Conditions">Terms and Conditions Template</a>
-					</div>
-					<div class="section-item">
-						<a class="section-link" 
-							title = "Mode of Payment master"
-							href="#List/Mode of Payment">Mode of Payment</a>
-					</div>
-				</div>
-			</div>
-
-			<div class="section india-specific">
-				<div class="section-head">India Specific</div>
-				<div class="section-body">
-					<div class="section-item">
-						<a class="section-link" 
-							title = "C-Forms received from customers"
-							href="#List/C-Form">C-Form</a>
-					</div>
-				</div>
-			</div>
-		</div>
-	</div>
-	<div style="clear: both;"></div>
-</div>
diff --git a/accounts/page/accounts_home/accounts_home.js b/accounts/page/accounts_home/accounts_home.js
index 3815578..7e04ca9 100644
--- a/accounts/page/accounts_home/accounts_home.js
+++ b/accounts/page/accounts_home/accounts_home.js
@@ -1,25 +1,172 @@
-// 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/>.
+// ERPNext: Copyright 2013 Web Notes Technologies Pvt Ltd
+// GNU General Public License. See "license.txt"
+
+wn.module_page["Accounts"] = [
+	{
+		title: wn._("Documents"),
+		icon: "icon-copy",
+		items: [
+			{
+				label: wn._("Journal Voucher"),
+				description: wn._("Accounting journal entries."),
+				doctype:"Journal Voucher"
+			},
+			{
+				label: wn._("Sales Invoice"),
+				description: wn._("Bills raised to Customers."),
+				doctype:"Sales Invoice"
+			},
+			{
+				label: wn._("Purchase Invoice"),
+				description: wn._("Bills raised by Suppliers."),
+				doctype:"Purchase Invoice"
+			},
+		]
+	},
+	{
+		title: wn._("Masters"),
+		icon: "icon-book",
+		items: [
+			{
+				label: wn._("Chart of Accounts"),
+				route: "Accounts Browser/Account",
+				description: wn._("Structure of books of accounts."),
+				doctype:"Account"
+			},
+			{
+				label: wn._("Chart of Cost Centers"),
+				route: "Accounts Browser/Cost Center",
+				description: wn._("Structure cost centers for budgeting."),
+				doctype:"Cost Center"
+			},
+		]
+	},
+	{
+		title: wn._("Tools"),
+		icon: "icon-wrench",
+		items: [
+			{
+				"route":"Form/Bank Reconciliation/Bank Reconciliation",
+				"label": wn._("Bank Reconciliation"),
+				"description": wn._("Update bank payment dates with journals."),
+				doctype: "Bank Reconciliation"
+			},
+			{
+				"route":"Form/Payment to Invoice Matching Tool/Payment to Invoice Matching Tool",
+				"label": wn._("Payment Reconciliation"),
+				"description": wn._("Match non-linked Invoices and Payments."),
+				doctype: "Payment to Invoice Matching Tool"
+				
+			},
+			{
+				"label": wn._("Period Closing Voucher"),
+				"doctype": "Period Closing Voucher",
+				description: "Close Balance Sheet and book Profit or Loss."
+			},
+			{
+				"route":"Form/Sales and Purchase Return Tool/Sales and Purchase Return Tool",
+				"label": wn._("Sales and Purchase Return Tool"),
+				description: wn._("Manage sales or purchase returns"),
+				"doctype": "Sales and Purchase Return Tool"
+			},
+			{
+				"page":"voucher-import-tool",
+				"label": wn._("Voucher Import Tool"),
+				"description": "Import accounting entries from CSV."
+			},		
+		]
+	},
+	{
+		title: wn._("Setup"),
+		icon: "icon-cog",
+		items: [
+			{
+				"label": wn._("Sales Taxes and Charges Master"),
+				"doctype":"Sales Taxes and Charges Master",
+				"description": wn._("Tax Template for Sales")
+			},
+			{
+				"label": wn._("Purchase Taxes and Charges Master"),
+				"doctype":"Purchase Taxes and Charges Master",
+				"description": wn._("Tax Template for Purchase")
+			},
+			{
+				"label": wn._("Point-of-Sale Setting"),
+				"doctype":"POS Setting",
+				"description": "User settings for Point-of-sale (POS)"
+			},
+			{
+				"doctype":"Budget Distribution",
+				"label": wn._("Budget Distribution"),
+				"description": wn._("Seasonality for setting budgets.")
+			},
+			{
+				"doctype":"Terms and Conditions",
+				"label": wn._("Terms and Conditions Template"),
+				description: wn._("Template of terms or contract.")
+			},
+			{
+				"doctype":"Mode of Payment",
+				"label": wn._("Mode of Payment"),
+				description: wn._("e.g. Bank, Cash, Credit Card")
+			},
+			{
+				"doctype":"C-Form",
+				"label": wn._("C-Form"),
+				description: "C-Form records",
+				country: "India"
+			}
+		]
+	},
+	{
+		title: wn._("Main Reports"),
+		right: true,
+		icon: "icon-table",
+		items: [
+			{
+				"label":wn._("General Ledger"),
+				page: "general-ledger"
+			},
+			{
+				"label":wn._("Trial Balance"),
+				page: "trial-balance"
+			},
+			{
+				"page":"Financial Statements",
+				"label": wn._("Financial Statements")
+			},
+		]
+	},
+	{
+		title: wn._("Analytics"),
+		right: true,
+		icon: "icon-bar-chart",
+		items: [
+			{
+				"label":wn._("Financial Analytics"),
+				page: "financial-analytics"
+			},
+		]
+	},
+	{
+		title: wn._("Reports"),
+		right: true,
+		icon: "icon-list",
+		items: [
+			{
+				"label":wn._("Delivered Items To Be Billed"),
+				route: "query-report/Delivered Items To Be Billed",
+				doctype: "Sales Invoice"
+			},
+			{
+				"label":wn._("Ordered Items To Be Billed"),
+				route: "query-report/Ordered Items To Be Billed",
+				doctype: "Sales Invoice"
+			},
+		]
+	}
+]
 
 pscript['onload_accounts-home'] = function(wrapper) {
-	wrapper.appframe = new wn.ui.AppFrame($(wrapper).find('.appframe-area'), 'Accounts');
-	erpnext.module_page.setup_page('Accounts', wrapper);
-	
-	if(wn.control_panel.country!='India') {
-		$('.india-specific').toggle(false);
-	}
-
-}
+	wn.views.moduleview.make(wrapper, "Accounts");
+}
\ No newline at end of file
diff --git a/buying/page/buying_home/buying_home.html b/buying/page/buying_home/buying_home.html
deleted file mode 100644
index 785abd5..0000000
--- a/buying/page/buying_home/buying_home.html
+++ /dev/null
@@ -1,90 +0,0 @@
-<div class="layout-wrapper layout-wrapper-background">
-	<div class="appframe-area"></div>
-	<div class="layout-main-section">
-		<div style="width: 48%; float: left;">
-			<h5><a href="#List/Purchase Request">Purchase Request</a></h5>
-			<p class="help">Request for purchase</p>
-			<br>
-			<h5><a href="#List/Supplier Quotation">Supplier Quotation (beta)</a></h5>
-			<p class="help">Track Quotations received from Suppliers</p>
-			<br>
-			<h5><a href="#List/Purchase Order">Purchase Order</a></h5>
-			<p class="help">Purchase Orders given to Suppliers</p>
-		</div>
-		<div style="width: 48%; float: right;">
-			<h5><a href="#List/Supplier">Supplier</a></h5>
-			<p class="help">Supplier Master</p>
-			<br>
-			<h5><a href="#List/Item">Item</a></h5>
-			<p class="help">Item Master</p>
-			<br>
-			<h5><a href="#List/Contact">Contact</a></h5>
-			<p class="help">Contact Master</p>
-			<br>
-			<h5><a href="#List/Address">Address</a></h5>
-			<p class="help">Address Master</p>
-		</div>
-		<div style="clear: both"></div>
-		<hr>
-		<h4>Reports</h4>
-		<div style="width: 48%; float: left;">
-			<h5><a href="#purchase-analytics" data-role="Analytics, Purchase Manager">
-					Purchase Analytics</a>
-			</h5>
-			<p class="help">Purchase trends based on Purchase Invoice</p>
-		</div>
-		<div style="width: 48%; float: right;">
-		</div>
-		<div style="clear: both;"></div>
-		<hr>
-		<div class="reports-list"></div>
-	</div>
-	<div class="layout-side-section">
-		<div class="psidebar">
-			<div class="section">
-				<div class="section-head">Setup</div>
-				<div class="section-body">
-					<div class="section-item">
-						<a class="section-link" 
-							title = "Tax and charges structure master"
-							href="#List/Purchase Taxes and Charges Master">Purchase Taxes and Charges Master</a>
-					</div>
-					<div class="section-item">
-						<a class="section-link" 
-							title = "Supplier classification"
-							href="#List/Supplier Type">Supplier Type</a>
-					</div>
-					<div class="section-item">
-						<a class="section-link" 
-							title = "Tree of item classification"
-							href="#Sales Browser/Item Group"
-							data-role="Purchase Manager, Purchase Master Manager
-								Accounts Manager">Item Group</a>
-					</div>
-					<div class="section-item">
-						<a class="section-link" 
-							title = "Helper for managing return of goods (sales or purchase)"
-							href="#Form/Sales and Purchase Return Tool/Sales and Purchase Return Tool">Purchase Returns</a>
-					</div>
-					<div class="section-item">
-						<a class="section-link" 
-							title = "Terms of contract template"
-							href="#List/Terms and Conditions">Terms and Conditions Template</a>
-					</div>
-				</div>
-			</div>
-			<div class="section">
-				<div class="section-head">Tools</div>
-				<div class="section-body">
-					<div class="section-item">
-						<a class="section-link" 
-							title = "Analyze Sales and Purchase trends and slice them based on item, customer, groups etc"
-							href="#Report/Profile/Trend Analyzer">Trend Analyzer</a>
-					</div>
-				</div>
-			</div>
-
-		</div>
-	</div>
-	<div style="clear: both;"></div>
-</div>
diff --git a/buying/page/buying_home/buying_home.js b/buying/page/buying_home/buying_home.js
index 65803cc..e46a77c 100644
--- a/buying/page/buying_home/buying_home.js
+++ b/buying/page/buying_home/buying_home.js
@@ -1,20 +1,106 @@
-// 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/>.
+// ERPNext: Copyright 2013 Web Notes Technologies Pvt Ltd
+// GNU General Public License. See "license.txt"
+
+wn.module_page["Buying"] = [
+	{
+		title: wn._("Documents"),
+		icon: "icon-copy",
+		items: [
+			{
+				label: wn._("Purchase Request"),
+				description: wn._("Request for purchase."),
+				doctype:"Purchase Request"
+			},
+			{
+				label: wn._("Supplier Quotation"),
+				description: wn._("Track Quotations received from Suppliers."),
+				doctype:"Supplier Quotation"
+			},
+			{
+				label: wn._("Purchase Order"),
+				description: wn._("Purchase Orders given to Suppliers."),
+				doctype:"Purchase Order"
+			},
+		]
+	},
+	{
+		title: wn._("Masters"),
+		icon: "icon-book",
+		items: [
+		{
+			label: wn._("Supplier"),
+			description: wn._("Supplier database."),
+			doctype:"Supplier"
+		},
+		{
+			label: wn._("Contact"),
+			description: wn._("All Contacts."),
+			doctype:"Contact"
+		},
+		{
+			label: wn._("Address"),
+			description: wn._("All Addresses."),
+			doctype:"Address"
+		},
+		{
+			label: wn._("Item"),
+			description: wn._("All Products or Services."),
+			doctype:"Item"
+		},
+		]
+	},
+	{
+		title: wn._("Setup"),
+		icon: "icon-cog",
+		items: [
+			{
+				"label": wn._("Purchase Taxes and Charges Master"),
+				"doctype":"Purchase Taxes and Charges Master",
+				"description": wn._("Tax Template for Purchase")
+			},
+			{
+				"doctype":"Supplier Type",
+				"label": wn._("Supplier Type"),
+				"description": wn._("Supplier classification.")
+			},
+			{
+				"route":"Sales Browser/Item Group",
+				"label":wn._("Item Group"),
+				"description": wn._("Tree of item classification"),
+				doctype:"Item Group"
+			},
+			{
+				label: wn._("Terms and Conditions"),
+				description: wn._("Template of terms or contract."),
+				doctype:"Terms and Conditions"
+			},
+		]
+	},
+	{
+		title: wn._("Tools"),
+		icon: "icon-wrench",
+		items: [
+			{
+				"route":"Form/Sales and Purchase Return Tool/Sales and Purchase Return Tool",
+				"label":wn._("Purchase Returns"),
+				"description":wn._("Helper for managing return of goods (sales or purchase)"),
+				doctype: "Sales and Purchase Return Tool"
+			},
+		]
+	},
+	{
+		title: wn._("Analytics"),
+		right: true,
+		icon: "icon-bar-chart",
+		items: [
+			{
+				"label":wn._("Purchase Analytics"),
+				page: "purchase-analytics"
+			},
+		]
+	},
+]
 
 pscript['onload_buying-home'] = function(wrapper) {
-	wrapper.appframe = new wn.ui.AppFrame($(wrapper).find('.appframe-area'), 'Buying');
-	erpnext.module_page.setup_page('Buying', wrapper);
-}
\ No newline at end of file
+	wn.views.moduleview.make(wrapper, "Buying");
+}
diff --git a/buying/report/supplier_quotations/supplier_quotations.txt b/buying/report/supplier_quotations/supplier_quotations.txt
deleted file mode 100644
index ab4f872..0000000
--- a/buying/report/supplier_quotations/supplier_quotations.txt
+++ /dev/null
@@ -1,19 +0,0 @@
-[
- {
-  "owner": "Administrator", 
-  "docstatus": 0, 
-  "creation": "2012-08-07 14:52:42", 
-  "modified_by": "Administrator", 
-  "modified": "2012-12-03 17:10:41"
- }, 
- {
-  "name": "__common__", 
-  "ref_doctype": "Supplier Quotation", 
-  "doctype": "Report", 
-  "json": "{\"filters\":[[\"Supplier Quotation\",\"supplier\",\"like\",\"%%\"],[\"Supplier Quotation Item\",\"item_code\",\"like\",\"%%\"]],\"columns\":[[\"name\",\"Supplier Quotation\"],[\"supplier\",\"Supplier Quotation\"],[\"item_code\",\"Supplier Quotation Item\"],[\"description\",\"Supplier Quotation Item\"],[\"qty\",\"Supplier Quotation Item\"],[\"currency\",\"Supplier Quotation\"],[\"import_rate\",\"Supplier Quotation Item\"],[\"import_amount\",\"Supplier Quotation Item\"]],\"sort_by\":\"modified\",\"sort_order\":\"desc\",\"sort_by_next\":\"name\",\"sort_order_next\":\"desc\"}"
- }, 
- {
-  "name": "Supplier Quotations", 
-  "doctype": "Report"
- }
-]
\ No newline at end of file
diff --git a/home/page/desktop/desktop.css b/home/page/desktop/desktop.css
index 7990216..1fb4414 100644
--- a/home/page/desktop/desktop.css
+++ b/home/page/desktop/desktop.css
@@ -25,7 +25,6 @@
 .case-wrapper i {
 	font-size: 32px;
 	color: #f8f8f8;
-	margin-top: 8px;
 }
 
 .case-label {
diff --git a/home/page/latest_updates/latest_updates.js b/home/page/latest_updates/latest_updates.js
index 97ee561..6bbfca1 100644
--- a/home/page/latest_updates/latest_updates.js
+++ b/home/page/latest_updates/latest_updates.js
@@ -1,6 +1,9 @@
 erpnext.updates = [
+	["10th January 2013", [
+		"New module pages with open item count and multi-lingual."
+	]],
 	["7th January 2013", [
-		"Language (backend): Integrated language libraries."
+		"Language (backend): Integrated language libraries."]],
 	["4th January 2013", [
 		"Support Analytics: Simple Tool to Plot Number Tickets and time to Closing",
 		"Workflow: Added Workflow Help",
diff --git a/hr/doctype/employee/employee.txt b/hr/doctype/employee/employee.txt
index 0c48287..6e3e828 100644
--- a/hr/doctype/employee/employee.txt
+++ b/hr/doctype/employee/employee.txt
@@ -2,9 +2,9 @@
  {
   "owner": "Administrator", 
   "docstatus": 0, 
-  "creation": "2012-12-03 10:13:46", 
+  "creation": "2013-01-02 16:17:01", 
   "modified_by": "Administrator", 
-  "modified": "2012-12-27 14:45:31"
+  "modified": "2013-01-09 14:46:42"
  }, 
  {
   "autoname": "naming_series:", 
@@ -150,6 +150,7 @@
   "permlevel": 0
  }, 
  {
+  "description": "You can enter any date manually", 
   "oldfieldtype": "Date", 
   "doctype": "DocField", 
   "label": "Date of Birth", 
diff --git a/hr/doctype/expense_claim/expense_claim.js b/hr/doctype/expense_claim/expense_claim.js
index b06398e..72fe15c 100644
--- a/hr/doctype/expense_claim/expense_claim.js
+++ b/hr/doctype/expense_claim/expense_claim.js
@@ -61,7 +61,8 @@
 			} else {
 				cur_frm.set_intro("Expense Claim is pending approval. Only the Expense Approver can update status.");
 				cur_frm.toggle_enable("approval_status", false);
-				if(!doc.__islocal) cur_frm.frm_head.appframe.buttons.Submit.toggle(false);
+				if(!doc.__islocal && cur_frm.frm_head.appframe.buttons.Submit) 
+					cur_frm.frm_head.appframe.buttons.Submit.toggle(false);
 			}
 		} else {
 			if(doc.approval_status=="Approved") {
diff --git a/hr/page/hr_home/hr_home.html b/hr/page/hr_home/hr_home.html
deleted file mode 100644
index 9d6875a..0000000
--- a/hr/page/hr_home/hr_home.html
+++ /dev/null
@@ -1,135 +0,0 @@
-<div class="layout-wrapper layout-wrapper-background">
-	<div class="appframe-area"></div>
-	<div class="layout-main-section">
-		<div style="width: 48%; float: left;">
-			<h5><a href="#List/Attendance">Attendance</a></h5>
-			<p class="help">Attendance Mark</p>
-			<br>
-			<h5><a href="#List/Leave Application">Leave Application</a></h5>
-			<p class="help">Applications for leave</p>
-			<br>
-			<h5><a href="#List/Expense Claim">Expense Claim</a></h5>
-			<p class="help">Claims for expenses</p>
-			<br>
-			<h5><a href="#List/Salary Slip">Salary Slip</a></h5>
-			<p class="help">Monthly salary statement</p>	
-			<br>
-			<h5><a href="#List/Appraisal">Appraisal</a></h5>
-			<p class="help">Performance appraisal</p>	
-		</div>
-		<div style="width: 48%; float: right;">
-			<h5><a href="#List/Employee">Employee</a></h5>
-			<p class="help">Employee Master</p>
-		</div>
-		<div style="clear: both"></div>
-		<hr>
-		<h4>Reports</h4>
-		<div class="reports-list"></div>
-	</div>
-	<div class="layout-side-section">
-		<div class="psidebar">
-			<div class="section">
-				<div class="section-head">Leave and Attendance</div>
-				<div class="section-body">
-					<div class="section-item">
-						<a class="section-link" 
-							title = "Upload and update attendance from a spreadsheet file (csv)"
-							href="#Form/Attendance Control Panel/Attendance Control Panel">Upload attendance</a>
-					</div>
-					<div class="section-item">
-						<a class="section-link" 
-							title = "Leave allocation helper"
-							href="#Form/Leave Control Panel/Leave Control Panel">Leave Allocation Tool</a>
-					</div>
-					<div class="section-item">
-						<a class="section-link" 
-							title = "Allocate leaves"
-							href="#List/Leave Allocation">Leave Allocation</a>
-					</div>
-
-					<div class="section-item">
-						<a class="section-link" 
-							title = "Type of leaves like casual, sick etc."
-							href="#List/Leave Type">Leave Type</a>
-					</div>
-					<div class="section-item">
-						<a class="section-link" 
-							title = "List of holidays"
-							href="#List/Holiday List">Holiday List</a>
-					</div>
-				</div>
-			</div>
-			<div class="section">
-				<div class="section-head">Salary and Payroll</div>
-				<div class="section-body">
-					<div class="section-item">
-						<a class="section-link" 
-							title = "Monthly salary template with earnings and deductions"
-							href="#List/Salary Structure">Salary Structure</a>
-					</div>
-					<div class="section-item">
-						<a class="section-link" 
-							title = "Generate Salary Slips"
-							href="#Form/Salary Manager/Salary Manager">Process Payroll</a>
-					</div>
-					<div class="section-item">
-						<a class="section-link" 
-							title = "Benefit types like basic salary, allowances etc."
-							href="#List/Earning Type">Earning Type</a>
-					</div>
-					<div class="section-item">
-						<a class="section-link" 
-							title = "tax and other salary deductions"
-							href="#List/Deduction Type">Deduction Type</a>
-					</div>
-				</div>
-			</div>
-			<div class="section">
-				<div class="section-head">Employee Setup</div>
-				<div class="section-body">
-					<div class="section-item">
-						<a class="section-link" 
-							title = "Type of employment master"
-							href="#List/Employment Type">Employment Type</a>
-					</div>
-					<div class="section-item">
-						<a class="section-link"
-							title = "Template for employee performance appraisals"
-							href="#List/Appraisal Template">Appraisal Template</a>
-					</div>
-					<div class="section-item">
-						<a class="section-link"
-							title = "Company branches (for employee records)"
-							href="#List/Branch">Branch</a>
-					</div>
-					<div class="section-item">
-						<a class="section-link"
-							title = "Company departments"
-							href="#List/Department">Department</a>
-					</div>
-					<div class="section-item">
-						<a class="section-link"
-							title = "Company departments"
-							href="#List/Designation">Designation</a>
-					</div>
-					<div class="section-item">
-						<a class="section-link"
-							title = "Employee grades"
-							href="#List/Grade">Grade</a>
-					</div>
-				</div>
-			</div>
-			<div class="section">
-				<div class="section-head">Expense Claim</div>
-				<div class="section-body">
-					<div class="section-item">
-						<a class="section-link" 
-							title = "Types of Expense Claim"
-							href="#List/Expense Claim Type">Expense Claim Type</a>
-					</div>
-				</div>
-			</div>
-		</div>
-	</div>
-	<div style="clear: both;"></div>
-</div>
diff --git a/hr/page/hr_home/hr_home.js b/hr/page/hr_home/hr_home.js
index 1286609..c2c5cd9 100644
--- a/hr/page/hr_home/hr_home.js
+++ b/hr/page/hr_home/hr_home.js
@@ -1,20 +1,147 @@
-// 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/>.
+// ERPNext: Copyright 2013 Web Notes Technologies Pvt Ltd
+// GNU General Public License. See "license.txt"
+
+wn.module_page["HR"] = [
+	{
+		title: wn._("Documents"),
+		icon: "icon-copy",
+		items: [
+			{
+				label: wn._("Leave Application"),
+				description: wn._("Applications for leave."),
+				doctype:"Leave Application"
+			},
+			{
+				label: wn._("Expense Claim"),
+				description: wn._("Claims for expenses made on behalf of the organization."),
+				doctype:"Expense Claim"
+			},
+			{
+				label: wn._("Attendance"),
+				description: wn._("Attendance record."),
+				doctype:"Attendance"
+			},
+			{
+				label: wn._("Salary Slip"),
+				description: wn._("Monthly salary statement."),
+				doctype:"Salary Slip"
+			},
+			{
+				label: wn._("Appraisal"),
+				description: wn._("Performance appraisal."),
+				doctype:"Appraisal"
+			},
+		]
+	},
+	{
+		title: wn._("Masters"),
+		icon: "icon-book",
+		items: [
+			{
+				label: wn._("Employee"),
+				description: wn._("Employee records."),
+				doctype:"Employee"
+			},
+		]
+	},
+	{
+		title: wn._("Leave Setup"),
+		icon: "icon-cog",
+		items: [
+			{
+				"route":"Form/Attendance Control Panel/Attendance Control Panel",
+				"label":wn._("Upload attendance"),
+				"description":wn._("Upload attendance from a .csv file"),
+				doctype: "Attendance Control Panel"
+			},
+			{
+				"route":"Form/Leave Control Panel/Leave Control Panel",
+				"label": wn._("Leave Allocation Tool"),
+				"description": wn._("Allocate leaves for the year."),
+				doctype: "Leave Control Panel"
+			},
+			{
+				"label":wn._("Leave Allocation"),
+				"description":wn._("Leave allocations."),
+				doctype: "Leave Allocation"
+			},
+			{
+				"label":wn._("Leave Type"),
+				"description":wn._("Type of leaves like casual, sick etc."),
+				doctype: "Leave Type"
+			},
+			{
+				"label":wn._("Holiday List"),
+				"description":wn._("List of holidays."),
+				doctype: "Holiday List"
+			},
+		]
+	},
+	{
+		title: wn._("Payroll Setup"),
+		icon: "icon-cog",
+		items: [
+			{
+				"label": wn._("Salary Structure"),
+				"description": wn._("Monthly salary template."),
+				doctype: "Salary Structure"
+			},
+			{
+				"route":"Form/Salary Manager/Salary Manager",
+				"label":wn._("Process Payroll"),
+				"description":wn._("Generate Salary Slips"),
+				doctype: "Salary Manager"
+			},
+			{
+				"label": wn._("Earning Type"),
+				"description": wn._("Salary components."),
+				doctype: "Earning Type"
+			},
+			{
+				"label": wn._("Deduction Type"),
+				"description": wn._("Tax and other salary deductions."),
+				doctype: "Deduction Type"
+			},
+		]
+	},
+	{
+		title: wn._("Employee Setup"),
+		icon: "icon-cog",
+		items: [
+			{
+				"label": wn._("Employment Type"),
+				"description": wn._("Type of employment master."),
+				doctype: "Employment Type"
+			},	
+			{
+				"label": wn._("Appraisal Template"),
+				"description": wn._("Template for employee performance appraisals."),
+				doctype: "Appraisal Template"
+			},
+			{
+				"label": wn._("Expense Claim Type"),
+				"description": wn._("Types of Expense Claim."),
+				doctype: "Expense Claim Type"
+			},
+			{
+				"label": wn._("Branch"),
+				"description": wn._("Company branches."),
+				doctype: "Branch"
+			},
+			{
+				"label": wn._("Department"),
+				"description": wn._("Company departments."),
+				doctype: "Department"
+			},
+			{
+				"label": wn._("Grade"),
+				"description": wn._("Employee grades"),
+				doctype: "Grade"
+			},
+		]
+	}
+];
 
 pscript['onload_hr-home'] = function(wrapper) {
-	wrapper.appframe = new wn.ui.AppFrame($(wrapper).find('.appframe-area') ,'Human Resources');
-	erpnext.module_page.setup_page('HR', wrapper);
+	wn.views.moduleview.make(wrapper, "HR");
 }
\ No newline at end of file
diff --git a/manufacturing/page/manufacturing_home/manufacturing_home.html b/manufacturing/page/manufacturing_home/manufacturing_home.html
deleted file mode 100644
index 737a7c1..0000000
--- a/manufacturing/page/manufacturing_home/manufacturing_home.html
+++ /dev/null
@@ -1,48 +0,0 @@
-<div class="layout-wrapper layout-wrapper-background">
-	<div class="appframe-area"></div>
-	<div class="layout-main-section">
-		<div style="width: 48%; float: left;">
-			<h5><a href="#List/Production Order">Production Order</a></h5>
-			<p class="help">Orders for manufacturing</p>
-			<br>
-			<h5><a href="#Form/Production Planning Tool/Production Planning Tool">Production Plan</a></h5>
-			<p class="help">Generate Purchase Requisition (MRP) and Production Orders</p>
-		</div>
-		<div style="width: 48%; float: right;">
-			<h5><a href="#List/BOM">Bill of Materials</a></h5>
-			<p class="help">Bill of Materials (BOM) Master</p>
-			<br>
-			<h5><a href="#List/Item">Item</a></h5>
-			<p class="help">Item Master</p>
-		</div>
-		<div style="clear: both"></div>
-		<hr>
-		<h4>Reports</h4>
-		<div class="reports-list"></div>
-	</div>
-	<div class="layout-side-section">
-		<div class="psidebar">
-			<div class="section">
-				<div class="section-head">Tools</div>
-				<div class="section-body">
-					<div class="section-item">
-						<a class="section-link" 
-							title = "BOM Replace Tool"
-							href="#Form/BOM Replace Tool">BOM Replace Tool</a>
-					</div>
-				</div>
-			</div>
-			<div class="section">
-				<div class="section-head">Setup</div>
-				<div class="section-body">
-					<div class="section-item">
-						<a class="section-link" 
-							title = "Workstation master"
-							href="#List/Workstation">Workstations</a>
-					</div>
-				</div>
-			</div>
-		</div>
-	</div>
-	<div style="clear: both;"></div>
-</div>
diff --git a/manufacturing/page/manufacturing_home/manufacturing_home.js b/manufacturing/page/manufacturing_home/manufacturing_home.js
index ee4778d..cb4222b 100644
--- a/manufacturing/page/manufacturing_home/manufacturing_home.js
+++ b/manufacturing/page/manufacturing_home/manufacturing_home.js
@@ -1,20 +1,65 @@
-// 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/>.
+// ERPNext: Copyright 2013 Web Notes Technologies Pvt Ltd
+// GNU General Public License. See "license.txt"
+
+wn.module_page["Manufacturing"] = [
+	{
+		title: wn._("Documents"),
+		icon: "icon-copy",
+		items: [
+			{
+				label: wn._("Production Order"),
+				description: wn._("Orders released for production."),
+				doctype:"Production Order"
+			},
+		]
+	},
+	{
+		title: wn._("Production Planning (MRP)"),
+		icon: "icon-wrench",
+		items: [
+			{
+				"route":"Form/Production Planning Tool/Production Planning Tool",
+				"label":wn._("Production Planning Tool"),
+				"description":wn._("Generate Purchase Requests (MRP) and Production Orders."),
+				doctype: "Production Planning Tool"
+			},
+		]
+	},
+	{
+		title: wn._("Masters"),
+		icon: "icon-book",
+		items: [
+			{
+				label: wn._("Bill of Materials"),
+				description: wn._("Bill of Materials (BOM)"),
+				doctype:"BOM"
+			},
+			{
+				label: wn._("Item"),
+				description: wn._("All Products or Services."),
+				doctype:"Item"
+			},
+			{
+				label: wn._("Workstation"),
+				description: wn._("Where manufacturing operations are carried out."),
+				doctype:"Workstation"
+			},
+		]
+	},
+	{
+		title: wn._("Utility"),
+		icon: "icon-wrench",
+		items: [
+			{
+				"route":"Form/BOM Replace Tool/BOM Replace Tool",
+				"label":wn._("BOM Replace Tool"),
+				"description":wn._("Replace Item / BOM in all BOMs"),
+				doctype: "BOM Replace Tool"
+			},
+		]
+	},
+]
 
 pscript['onload_manufacturing-home'] = function(wrapper) {
-	wrapper.appframe = new wn.ui.AppFrame($(wrapper).find('.appframe-area'), 'Manufacturing');
-	erpnext.module_page.setup_page('Manufacturing', wrapper);
+	wn.views.moduleview.make(wrapper, "Manufacturing");
 }
\ No newline at end of file
diff --git a/production/doctype/bom_replace_tool/locale/_messages_doc.json b/production/doctype/bom_replace_tool/locale/_messages_doc.json
deleted file mode 100644
index d6c8d69..0000000
--- a/production/doctype/bom_replace_tool/locale/_messages_doc.json
+++ /dev/null
@@ -1,10 +0,0 @@
-[
- "BOM Replace Tool", 
- "The BOM which will be replaced", 
- "New BOM", 
- "The new BOM after replacement", 
- "Production", 
- "Replace a particular BOM in all other BOMs where it is used. It will replace the old BOM link, update cost and regenerate \"BOM Explosion Item\" table as per new BOM", 
- "Replace", 
- "Current BOM"
-]
\ No newline at end of file
diff --git a/production/doctype/bom_replace_tool/locale/hi-doc.json b/production/doctype/bom_replace_tool/locale/hi-doc.json
deleted file mode 100644
index 3d9e9b4..0000000
--- a/production/doctype/bom_replace_tool/locale/hi-doc.json
+++ /dev/null
@@ -1,10 +0,0 @@
-{
- "BOM Replace Tool": "\u092c\u0940\u0913\u090f\u092e \u092c\u0926\u0932\u0947\u0902 \u0909\u092a\u0915\u0930\u0923", 
- "Current BOM": "\u0935\u0930\u094d\u0924\u092e\u093e\u0928 \u092c\u0940\u0913\u090f\u092e", 
- "New BOM": "\u0928\u0908 \u092c\u0940\u0913\u090f\u092e", 
- "Production": "\u0909\u0924\u094d\u092a\u093e\u0926\u0928", 
- "Replace": "\u092c\u0926\u0932\u0947\u0902", 
- "Replace a particular BOM in all other BOMs where it is used. It will replace the old BOM link, update cost and regenerate \"BOM Explosion Item\" table as per new BOM": "\u0905\u0928\u094d\u092f \u0938\u092d\u0940 BOMs \u091c\u0939\u093e\u0902 \u092f\u0939 \u092a\u094d\u0930\u092f\u094b\u0917 \u0915\u093f\u092f\u093e \u091c\u093e\u0924\u093e \u0939\u0948 \u092e\u0947\u0902 \u090f\u0915 \u0935\u093f\u0936\u0947\u0937 \u092c\u0940\u0913\u090f\u092e \u092c\u0926\u0932\u0947\u0902. \u092f\u0939 \u092a\u0941\u0930\u093e\u0928\u0947 \u092c\u0940\u0913\u090f\u092e \u0932\u093f\u0902\u0915 \u0915\u0940 \u091c\u0917\u0939, \u0932\u093e\u0917\u0924 \u0905\u0926\u094d\u092f\u0924\u0928 \u0914\u0930 \u0928\u092f\u093e \u092c\u0940\u0913\u090f\u092e \u0915\u0947 \u0905\u0928\u0941\u0938\u093e\u0930 &quot;BOM \u0927\u092e\u093e\u0915\u093e \u0906\u0907\u091f\u092e&quot; \u0924\u093e\u0932\u093f\u0915\u093e \u092a\u0941\u0928\u0930\u094d\u091c\u0928\u094d\u092e", 
- "The BOM which will be replaced": "\u092c\u0940\u0913\u090f\u092e \u091c\u094b \u092a\u094d\u0930\u0924\u093f\u0938\u094d\u0925\u093e\u092a\u093f\u0924 \u0915\u093f\u092f\u093e \u091c\u093e\u090f\u0917\u093e", 
- "The new BOM after replacement": "\u092c\u0926\u0932\u0928\u0947 \u0915\u0947 \u092c\u093e\u0926 \u0928\u090f \u092c\u0940\u0913\u090f\u092e"
-}
\ No newline at end of file
diff --git a/projects/page/projects/projects.txt b/projects/page/projects/projects.txt
index 69f3afa..170134e 100644
--- a/projects/page/projects/projects.txt
+++ b/projects/page/projects/projects.txt
@@ -2,19 +2,30 @@
  {
   "owner": "Administrator", 
   "docstatus": 0, 
-  "creation": "2010-12-14 10:23:31", 
+  "creation": "2012-06-14 18:44:57", 
   "modified_by": "Administrator", 
-  "modified": "2010-12-30 14:43:47"
+  "modified": "2013-01-09 17:19:26"
  }, 
  {
   "name": "__common__", 
+  "doctype": "Page", 
   "module": "Projects", 
   "standard": "Yes", 
-  "page_name": "Projects", 
-  "doctype": "Page"
+  "page_name": "Projects"
+ }, 
+ {
+  "name": "__common__", 
+  "parent": "Projects", 
+  "doctype": "Page Role", 
+  "parenttype": "Page", 
+  "role": "Projects User", 
+  "parentfield": "roles"
  }, 
  {
   "name": "Projects", 
   "doctype": "Page"
+ }, 
+ {
+  "doctype": "Page Role"
  }
 ]
\ No newline at end of file
diff --git a/projects/page/projects_home/projects_home.html b/projects/page/projects_home/projects_home.html
deleted file mode 100644
index cb4f1f8..0000000
--- a/projects/page/projects_home/projects_home.html
+++ /dev/null
@@ -1,38 +0,0 @@
-<div class="layout-wrapper layout-wrapper-background">
-	<div class="appframe-area"></div>
-	<div class="layout-main-section">
-		<div style="width: 48%; float: left;">
-			<h5><a href="#List/Task">Task</a></h5>
-			<p class="help">Project activity / task</p>
-			<br>
-			<h5><a href="#List/Project">Project</a></h5>
-			<p class="help">Project master</p>
-			<br>
-			<h5><a href="#List/Timesheet">Timesheet</a></h5>
-			<p class="help">Timesheet for tasks</p>
-		</div>
-		<div style="width: 48%; float: right;">
-			<h5><a href="#Projects" data-role="Projects User">Gantt Chart</a></h5>
-			<p class="help">Gantt chart of all tasks</p>
-		</div>
-		<div style="clear: both"></div>
-		<hr>
-		<h4>Reports</h4>
-		<div class="reports-list"></div>
-	</div>
-	<div class="layout-side-section">
-		<div class="psidebar">
-			<div class="section">
-				<div class="section-head">Setup</div>
-				<div class="section-body">
-					<div class="section-item">
-						<a class="section-link" 
-							title = "Types of activities for Time Sheets"
-							href="#List/Activity Type">Activity Type</a>						
-					</div>
-				</div>
-			</div>
-		</div>
-	</div>
-	<div style="clear: both;"></div>
-</div>
diff --git a/projects/page/projects_home/projects_home.js b/projects/page/projects_home/projects_home.js
index 5ff50c9..3f91468 100644
--- a/projects/page/projects_home/projects_home.js
+++ b/projects/page/projects_home/projects_home.js
@@ -1,20 +1,52 @@
-// 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/>.
+// ERPNext: Copyright 2013 Web Notes Technologies Pvt Ltd
+// GNU General Public License. See "license.txt"
+
+wn.module_page["Projects"] = [
+	{
+		title: wn._("Documents"),
+		icon: "icon-copy",
+		items: [
+			{
+				label: wn._("Task"),
+				description: wn._("Project activity / task."),
+				doctype:"Task"
+			},
+			{
+				label: wn._("Project"),
+				description: wn._("Project master."),
+				doctype:"Project"
+			},
+			{
+				label: wn._("Timesheet"),
+				description: wn._("Timesheet for tasks."),
+				doctype:"Timesheet"
+			},
+		]
+	},
+	{
+		title: wn._("Tools"),
+		icon: "icon-wrench",
+		items: [
+			{
+				page: "Projects",
+				label: wn._("Gantt Chart"),
+				"description":wn._("Gantt chart of all tasks.")
+			},
+		]
+	},
+	{
+		title: wn._("Masters"),
+		icon: "icon-book",
+		items: [
+			{
+				label: wn._("Activity Type"),
+				description: wn._("Types of activities for Time Sheets"),
+				doctype:"Activity Type"
+			},
+		]
+	},
+]
 
 pscript['onload_projects-home'] = function(wrapper) {
-	wrapper.appframe = new wn.ui.AppFrame($(wrapper).find('.appframe-area'), 'Projects');
-	erpnext.module_page.setup_page('Projects', wrapper);
+	wn.views.moduleview.make(wrapper, "Projects");
 }
\ No newline at end of file
diff --git a/public/js/modules.js b/public/js/modules.js
index 752d369..5c572dd 100644
--- a/public/js/modules.js
+++ b/public/js/modules.js
@@ -15,6 +15,8 @@
 // along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
 wn.home_page = "desktop";
+wn.provide("wn.module_page");
+
 $.extend(wn.modules, {
 	"Selling": {
 		link: "selling-home",
diff --git a/selling/doctype/opportunity/opportunity.js b/selling/doctype/opportunity/opportunity.js
index d5c665a..664b88d 100644
--- a/selling/doctype/opportunity/opportunity.js
+++ b/selling/doctype/opportunity/opportunity.js
@@ -25,6 +25,9 @@
 		cur_frm.add_custom_button('Opportunity Lost', cur_frm.cscript['Declare Opportunity Lost']);
 		cur_frm.add_custom_button('Send SMS', cur_frm.cscript.send_sms);
 	}
+	
+	cur_frm.toggle_display("contact_info", doc.customer || doc.lead);
+	
 }
 
 // ONLOAD
@@ -79,7 +82,7 @@
 }
 
 // hide - unhide fields based on lead or customer
-cur_frm.cscript.lead_cust_show = function(doc,cdt,cdn){
+cur_frm.cscript.lead_cust_show = function(doc,cdt,cdn){	
 	if(doc.enquiry_from == 'Lead'){
 		unhide_field(['lead']);
 		hide_field(['lead_name','customer','customer_address','contact_person','customer_name','address_display','contact_display','contact_mobile','contact_email','territory','customer_group']);
@@ -87,13 +90,15 @@
 	}
 	else if(doc.enquiry_from == 'Customer'){		
 		unhide_field(['customer']);
-		hide_field(['lead','lead_name','address_display','contact_display','contact_mobile','contact_email','territory']);		
+		hide_field(['lead','lead_name','address_display','contact_display','contact_mobile','contact_email','territory', 'customer_group']);		
 		doc.lead = doc.lead_name = doc.customer = doc.customer_address = doc.contact_person = doc.address_display = doc.contact_display = doc.contact_mobile = doc.contact_email = doc.territory = doc.customer_group = "";
 	}
 }
 
 // customer
 cur_frm.cscript.customer = function(doc,dt,dn) {
+	cur_frm.toggle_display("contact_info", doc.customer || doc.lead);
+	
 	if(doc.customer) {
 		cur_frm.call({
 			doc: cur_frm.doc,
@@ -127,11 +132,18 @@
 }
 
 cur_frm.fields_dict['customer_address'].get_query = function(doc, cdt, cdn) {
-	return 'SELECT name,address_line1,city FROM tabAddress WHERE customer = "'+ doc.customer +'" AND docstatus != 2 AND name LIKE "%s" ORDER BY name ASC LIMIT 50';
+	return 'SELECT name, address_line1, city FROM tabAddress \
+		WHERE customer = "'+ doc.customer +'" AND docstatus != 2 AND \
+		%(key)s LIKE "%s" ORDER BY name ASC LIMIT 50';
 }
 
 cur_frm.fields_dict['contact_person'].get_query = function(doc, cdt, cdn) {
-	return 'SELECT name,CONCAT(first_name," ",ifnull(last_name,"")) As FullName,department,designation FROM tabContact WHERE customer = "'+ doc.customer +'" AND docstatus != 2 AND name LIKE "%s" ORDER BY name ASC LIMIT 50';
+	if (!doc.customer) msgprint("Please select customer first");
+	else {
+		return 'SELECT name, CONCAT(first_name," ",ifnull(last_name,"")) As FullName, \
+		department, designation FROM tabContact WHERE customer = "'+ doc.customer + 
+		'" AND docstatus != 2 AND %(key)s LIKE "%s" ORDER BY name ASC LIMIT 50';
+	}
 }
 
 // lead
@@ -140,6 +152,8 @@
 }
 
 cur_frm.cscript.lead = function(doc, cdt, cdn) {
+	cur_frm.toggle_display("contact_info", doc.customer || doc.lead);
+	
 	if(doc.lead) get_server_fields('get_lead_details', doc.lead,'', doc, cdt, cdn, 1);
 	if(doc.lead) unhide_field(['lead_name','address_display','contact_mobile','contact_email','territory']);	
 }
diff --git a/selling/doctype/quotation/quotation.js b/selling/doctype/quotation/quotation.js
index 3673b07..330e4e7 100644
--- a/selling/doctype/quotation/quotation.js
+++ b/selling/doctype/quotation/quotation.js
@@ -93,9 +93,7 @@
 	}
 
 	erpnext.hide_naming_series();
-	
-	if(doc.customer || doc.lead) $(cur_frm.fields_dict.contact_section.row.wrapper).toggle(true);
-	else $(cur_frm.fields_dict.contact_section.row.wrapper).toggle(false);
+	cur_frm.toggle_display("contact_section", doc.customer || doc.lead);
 	
 	if (!doc.__islocal) {
 		cur_frm.communication_view = new wn.views.CommunicationList({
@@ -120,6 +118,8 @@
 	if(doc.customer) $c_obj(make_doclist(doc.doctype, doc.name), 
 		'get_default_customer_address', '', callback);
 	if(doc.customer) unhide_field(['customer_address','contact_person','territory', 'customer_group']);
+	cur_frm.toggle_display("contact_section", doc.customer || doc.lead);
+	
 }
 
 cur_frm.cscript.customer_address = cur_frm.cscript.contact_person = function(doc,dt,dn) {
@@ -130,27 +130,11 @@
 	}),'', doc, dt, dn, 1);
 }
 
-cur_frm.fields_dict.customer_address.on_new = function(dn) {
-	locals['Address'][dn].customer = locals[cur_frm.doctype][cur_frm.docname].customer;
-	locals['Address'][dn].customer_name = locals[cur_frm.doctype][cur_frm.docname].customer_name;
-}
-
-cur_frm.fields_dict.contact_person.on_new = function(dn) {
-	locals['Contact'][dn].customer = locals[cur_frm.doctype][cur_frm.docname].customer;
-	locals['Contact'][dn].customer_name = locals[cur_frm.doctype][cur_frm.docname].customer_name;
-}
-
-cur_frm.fields_dict['customer_address'].get_query = function(doc, cdt, cdn) {
-	return 'SELECT name,address_line1,city FROM tabAddress WHERE customer = "'+ doc.customer +'" AND docstatus != 2 AND name LIKE "%s" ORDER BY name ASC LIMIT 50';
-}
-
-cur_frm.fields_dict['contact_person'].get_query = function(doc, cdt, cdn) {
-	return 'SELECT name,CONCAT(first_name," ",ifnull(last_name,"")) As FullName,department,designation FROM tabContact WHERE customer = "'+ doc.customer +'" AND docstatus != 2 AND name LIKE "%s" ORDER BY name ASC LIMIT 50';
-}
-
 cur_frm.fields_dict.lead.get_query = erpnext.utils.lead_query;
 
 cur_frm.cscript.lead = function(doc, cdt, cdn) {
+	cur_frm.toggle_display("contact_section", doc.customer || doc.lead);
+	
 	if(doc.lead) {
 		get_server_fields('get_lead_details', doc.lead,'', doc, cdt, cdn, 1);
 		unhide_field('territory');
diff --git a/selling/doctype/sales_common/sales_common.js b/selling/doctype/sales_common/sales_common.js
index c1435bd..4ceac9e 100644
--- a/selling/doctype/sales_common/sales_common.js
+++ b/selling/doctype/sales_common/sales_common.js
@@ -320,7 +320,27 @@
 		}
 	}
 
+cur_frm.fields_dict.customer_address.on_new = function(dn) {
+	locals['Address'][dn].customer = locals[cur_frm.doctype][cur_frm.docname].customer;
+	locals['Address'][dn].customer_name = locals[cur_frm.doctype][cur_frm.docname].customer_name;
+}
 
+cur_frm.fields_dict.contact_person.on_new = function(dn) {
+	locals['Contact'][dn].customer = locals[cur_frm.doctype][cur_frm.docname].customer;
+	locals['Contact'][dn].customer_name = locals[cur_frm.doctype][cur_frm.docname].customer_name;
+}
+
+cur_frm.fields_dict['customer_address'].get_query = function(doc, cdt, cdn) {
+	return 'SELECT name, address_line1, city FROM tabAddress \
+		WHERE customer = "'+ doc.customer +'" AND docstatus != 2 AND \
+		%(key)s LIKE "%s" ORDER BY name ASC LIMIT 50';
+}
+
+cur_frm.fields_dict['contact_person'].get_query = function(doc, cdt, cdn) {
+	return 'SELECT name, CONCAT(first_name," ",ifnull(last_name,"")) As FullName, \
+		department, designation FROM tabContact WHERE customer = "'+ doc.customer + 
+		'" AND docstatus != 2 AND %(key)s LIKE "%s" ORDER BY name ASC LIMIT 50';
+}
 
 // *********************** QUANTITY ***************************
 cur_frm.cscript.qty = function(doc, cdt, cdn) { cur_frm.cscript.recalc(doc, 1); }
diff --git a/selling/doctype/sales_order/sales_order.js b/selling/doctype/sales_order/sales_order.js
index a3b71b4..607b132 100644
--- a/selling/doctype/sales_order/sales_order.js
+++ b/selling/doctype/sales_order/sales_order.js
@@ -36,7 +36,9 @@
 	// load default charges
 	
 	if(doc.__islocal && !doc.customer){
-		hide_field(['customer_address','contact_person','customer_name','address_display','contact_display','contact_mobile','contact_email','territory','customer_group']);
+		hide_field(['customer_address','contact_person', 'customer_name', 
+			'address_display', 'contact_display', 'contact_mobile', 
+			'contact_email', 'territory',  'customer_group']);
 	}
 }
 
@@ -59,9 +61,8 @@
 
 	if (!cur_frm.cscript.is_onload) cur_frm.cscript.hide_price_list_currency(doc, cdt, cdn); 
 	
-	if(doc.customer) $(cur_frm.fields_dict.contact_info.row.wrapper).toggle(true);
-	else $(cur_frm.fields_dict.contact_info.row.wrapper).toggle(false);
-
+	cur_frm.toggle_display("contact_info", doc.customer);
+	
 	if(doc.docstatus==1) {
 		if(doc.status != 'Stopped') {
 			cur_frm.add_custom_button('Send SMS', cur_frm.cscript.send_sms);
@@ -105,11 +106,13 @@
 
 //customer
 cur_frm.cscript.customer = function(doc,dt,dn) {
+	cur_frm.toggle_display("contact_info", doc.customer);
+	
 	var pl = doc.price_list_name;
 	var callback = function(r,rt) {
 		var callback2  = function(r, rt) {
-
-			if(doc.customer) unhide_field(['customer_address', 'contact_person', 'territory','customer_group']);
+			if(doc.customer) 
+				unhide_field(['customer_address', 'contact_person', 'territory','customer_group']);
 			cur_frm.refresh();
 			
 			if(!onload && (pl != doc.price_list_name)) cur_frm.cscript.price_list_name(doc, dt, dn);
@@ -119,38 +122,22 @@
 		get_server_fields('get_shipping_address',doc.customer,'',doc, dt, dn, 0, callback2);
 			
 	}	 
-	if(doc.customer) $c_obj(make_doclist(doc.doctype, doc.name), 'get_default_customer_address', '', callback);
+	if(doc.customer) $c_obj(make_doclist(doc.doctype, doc.name), 
+		'get_default_customer_address', '', callback);
 }
 
 cur_frm.cscript.customer_address = cur_frm.cscript.contact_person = function(doc,dt,dn) {		
 	if(doc.customer) get_server_fields('get_customer_address', JSON.stringify({customer: doc.customer, address: doc.customer_address, contact: doc.contact_person}),'', doc, dt, dn, 1);
 }
 
-cur_frm.fields_dict.customer_address.on_new = function(dn) {
-	locals['Address'][dn].customer = locals[cur_frm.doctype][cur_frm.docname].customer;
-	locals['Address'][dn].customer_name = locals[cur_frm.doctype][cur_frm.docname].customer_name;
-}
-
-cur_frm.fields_dict.contact_person.on_new = function(dn) {
-	locals['Contact'][dn].customer = locals[cur_frm.doctype][cur_frm.docname].customer;
-	locals['Contact'][dn].customer_name = locals[cur_frm.doctype][cur_frm.docname].customer_name;
-}
-
-cur_frm.fields_dict['customer_address'].get_query = function(doc, cdt, cdn) {
-	return 'SELECT name,address_line1,city FROM tabAddress WHERE customer = "'+ doc.customer +'" AND docstatus != 2 AND name LIKE "%s" ORDER BY name ASC LIMIT 50';
-}
-
-cur_frm.fields_dict['contact_person'].get_query = function(doc, cdt, cdn) {
-	return 'SELECT name,CONCAT(first_name," ",ifnull(last_name,"")) As FullName,department,designation FROM tabContact WHERE customer = "'+ doc.customer +'" AND docstatus != 2 AND name LIKE "%s" ORDER BY name ASC LIMIT 50';
-}
-
 cur_frm.cscript.pull_quotation_details = function(doc,dt,dn) {
 	var callback = function(r,rt){
 		var doc = locals[cur_frm.doctype][cur_frm.docname];					
 		if(!r.exc){							
 			doc.quotation_no = r.message;			
 			if(doc.quotation_no) {					
-				unhide_field(['quotation_date', 'customer_address', 'contact_person', 'territory', 'customer_group']);
+				unhide_field(['quotation_date', 'customer_address', 
+					'contact_person', 'territory', 'customer_group']);
 				if(doc.customer) get_server_fields('get_shipping_address', doc.customer, '', doc, dt, dn, 0);
 			}			
 			cur_frm.refresh();
diff --git a/selling/page/sales_browser/sales_browser.py b/selling/page/sales_browser/sales_browser.py
index 49a05ff..45ca1d2 100644
--- a/selling/page/sales_browser/sales_browser.py
+++ b/selling/page/sales_browser/sales_browser.py
@@ -13,7 +13,7 @@
 		if(is_group='Yes', 1, 0) as expandable
 		from `tab%(ctype)s`
 		where docstatus < 2
-		and %(parent_field)s = "%(parent)s"
+		and ifnull(%(parent_field)s,'') = "%(parent)s"
 		order by name""" % webnotes.form_dict, as_dict=1)
 		
 @webnotes.whitelist()
diff --git a/selling/page/selling_home/selling_home.html b/selling/page/selling_home/selling_home.html
deleted file mode 100644
index e483b50..0000000
--- a/selling/page/selling_home/selling_home.html
+++ /dev/null
@@ -1,136 +0,0 @@
-<div class="layout-wrapper layout-wrapper-background">
-	<div class="appframe-area"></div>
-	<div class="layout-main-section">
-		<div style="width: 48%; float: left;">
-			<h5><a href="#List/Lead">Lead</a></h5>
-			<p class="help">Prospective customers</p>
-			<br>
-			<h5><a href="#List/Opportunity">Opportunity</a></h5>
-			<p class="help">Business opportunities</p>
-			<br>
-			<h5><a href="#List/Quotation">Quotation</a></h5>
-			<p class="help">Quotes sent to Leads / Customers</p>
-			<br>
-			<h5><a href="#List/Sales Order">Sales Order</a></h5>
-			<p class="help">Confirmed orders from Customers</p>	
-			<br>
-			<h5><a href="#List/Communication">Communication</a></h5>
-			<p class="help">All communication records</p>	
-		</div>
-		<div style="width: 48%; float: right;">
-			<h5><a href="#List/Customer">Customer</a></h5>
-			<p class="help">Customer Master</p>
-			<br>
-			<h5><a href="#List/Item">Item</a></h5>
-			<p class="help">Item Master</p>
-			<br>
-			<h5><a href="#List/Contact">Contact</a></h5>
-			<p class="help">Contact Master</p>
-			<br>
-			<h5><a href="#List/Address">Address</a></h5>
-			<p class="help">Address Master</p>
-		</div>
-		<div style="clear: both"></div>
-		<hr>
-		<h4>Reports</h4>
-		<div style="width: 48%; float: left;">
-			<h5><a href="#sales-analytics" data-role="Analytics, Sales Manager,
-					Maintenance Manager">Sales Analytics</a>
-			</h5>
-			<p class="help">Sales trends based on Sales Invoice</p>
-		</div>
-		<div style="width: 48%; float: right;">
-		</div>
-		<div style="clear: both;"></div>
-		<hr>
-		<div class="reports-list"></div>
-	</div>
-	<div class="layout-side-section">
-		<div class="psidebar">
-			<div class="section">
-				<div class="section-head">Setup</div>
-				<div class="section-body">
-					<div class="section-item">
-						<a class="section-link" 
-							title = "Tax and charges structure master"
-							href="#List/Sales Taxes and Charges Master">Sales Taxes and Charges Master</a>
-					</div>
-					<div class="section-item">
-						<a class="section-link" 
-							title = "Multiple prices lists for items"
-							href="#List/Price List">Price List</a>
-					</div>
-					<div class="section-item">
-						<a class="section-link" 
-							title = "Group items and accessories in one item code"
-							href="#List/Sales BOM">Sales BOM</a>
-					</div>
-					<div class="section-item">
-						<a class="section-link" 
-							title = "Terms of contract template"
-							href="#List/Terms and Conditions">Terms and Conditions Template</a>
-					</div>
-					<div class="section-item">
-						<a class="section-link" 
-							title = "Tree of customer groups"
-							href="#Sales Browser/Customer Group"
-							data-role="Sales Manager, Sales Master Manager,
-								Accounts Manager">Customer Group</a>
-					</div>
-					<div class="section-item">
-						<a class="section-link" 
-							title = "Tree of sales territories"
-							href="#Sales Browser/Territory"
-							data-role="Sales Manager, Sales Master Manager
-								Accounts Manager">Territory</a>
-					</div>
-					<div class="section-item">
-						<a class="section-link" 
-							title = "Sales persons and targets"
-							href="#Sales Browser/Sales Person"
-							data-role="Sales Manager, Sales Master Manager
-								Accounts Manager">Sales Person</a>
-					</div>
-					<div class="section-item">
-						<a class="section-link" 
-							title = "Commission partners and targets"
-							href="#List/Sales Partner">Sales Partner</a>
-					</div>
-					<div class="section-item">
-						<a class="section-link" 
-							title = "Tree of item classification"
-							href="#Sales Browser/Item Group"
-							data-role="Sales Manager, Sales Master Manager
-								Accounts Manager">Item Group</a>
-					</div>
-					<div class="section-item">
-						<a class="section-link" 
-							title = "Sales campaigns"
-							href="#List/Campaign">Campaign</a>
-					</div>
-					<div class="section-item">
-						<a class="section-link" 
-							title = "Send mass SMS to your contacts, leads and employees"
-							href="#Form/SMS Center/SMS Center">SMS Center</a>
-					</div>
-				</div>
-			</div>
-			<div class="section">
-				<div class="section-head">Tools</div>
-				<div class="section-body">
-					<div class="section-item">
-						<a class="section-link" 
-							title = "Helper for managing return of goods (sales or purchase)"
-							href="#Form/Sales and Purchase Return Tool/Sales and Purchase Return Tool">Sales Returns</a>
-					</div>
-					<div class="section-item">
-						<a class="section-link"
-							title = "Analyze Sales and Purchase trends and slice them based on item, customer, groups etc"
-							href="#Report/Profile/Trend Analyzer">Trend Analyzer</a>
-					</div>
-				</div>
-			</div>
-		</div>
-	</div>
-	<div style="clear: both;"></div>
-</div>
diff --git a/selling/page/selling_home/selling_home.js b/selling/page/selling_home/selling_home.js
index 1fe0e09..6f140e9 100644
--- a/selling/page/selling_home/selling_home.js
+++ b/selling/page/selling_home/selling_home.js
@@ -1,20 +1,167 @@
-// 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/>.
+// ERPNext: Copyright 2013 Web Notes Technologies Pvt Ltd
+// GNU General Public License. See "license.txt"
+
+wn.module_page["Selling"] = [
+	{
+		title: wn._("Documents"),
+		icon: "icon-copy",
+		items: [
+			{
+				label: wn._("Lead"),
+				description: wn._("Database of potential customers."),
+				doctype:"Lead"
+			},
+			{
+				label: wn._("Opportunity"),
+				description: wn._("Potential opportunities for selling."),
+				doctype:"Opportunity"
+			},
+			{
+				label: wn._("Quotation"),
+				description: wn._("Quotes to Leads or Customers."),
+				doctype:"Quotation"
+			},
+			{
+				label: wn._("Sales Order"),
+				description: wn._("Confirmed orders from Customers."),
+				doctype:"Sales Order"
+			},
+		]
+	},
+	{
+		title: wn._("Masters"),
+		icon: "icon-book",
+		items: [
+			{
+				label: wn._("Customer"),
+				description: wn._("Customer database."),
+				doctype:"Customer"
+			},
+			{
+				label: wn._("Contact"),
+				description: wn._("All Contacts."),
+				doctype:"Contact"
+			},
+			{
+				label: wn._("Address"),
+				description: wn._("All Addresses."),
+				doctype:"Address"
+			},
+			{
+				label: wn._("Item"),
+				description: wn._("All Products or Services."),
+				doctype:"Item"
+			},
+		]
+	},
+	{
+		title: wn._("Setup"),
+		icon: "icon-cog",
+		items: [
+			{
+				label: wn._("Sales Taxes and Charges Master"),
+				description: wn._("Sales taxes template."),
+				doctype:"Sales Taxes and Charges Master"
+			},
+			{
+				label: wn._("Price List"),
+				description: wn._("Mupltiple Item prices."),
+				doctype:"Price List"
+			},
+			{
+				label: wn._("Sales BOM"),
+				description: wn._("Bundle items at time of sale."),
+				doctype:"Sales BOM"
+			},
+			{
+				label: wn._("Terms and Conditions"),
+				description: wn._("Template of terms or contract."),
+				doctype:"Terms and Conditions"
+			},
+			{
+				label: wn._("Customer Group"),
+				description: wn._("Customer classification tree."),
+				route: "Sales Browser/Customer Group",
+				doctype:"Customer Group"
+			},
+			{
+				label: wn._("Territory"),
+				description: wn._("Sales territories."),
+				route: "Sales Browser/Territory",
+				doctype:"Territory"
+			},
+			{
+				"route":"Sales Browser/Sales Person",
+				"label":wn._("Sales Person"),
+				"description": wn._("Sales persons and targets"),
+				doctype:"Sales Person"
+			},
+			{
+				"route":"List/Sales Partner",
+				"label": wn._("Sales Partner"),
+				"description":wn._("Commission partners and targets"),
+				doctype:"Sales Partner"
+			},
+			{
+				"route":"Sales Browser/Item Group",
+				"label":wn._("Item Group"),
+				"description": wn._("Tree of item classification"),
+				doctype:"Item Group"
+			},
+			{
+				"route":"List/Campaign",
+				"label":wn._("Campaign"),
+				"description":wn._("Sales campaigns"),
+				doctype:"Campaign"
+			},
+		]
+	},
+	{
+		title: wn._("Tools"),
+		icon: "icon-wrench",
+		items: [
+			{
+				"route":"Form/Sales and Purchase Return Tool/Sales and Purchase Return Tool",
+				"label":wn._("Sales Returns"),
+				"description":wn._("Helper for managing return of goods (sales or purchase)"),
+				doctype: "Sales and Purchase Return Tool"
+			},
+			{
+				"route":"Form/SMS Center/SMS Center",
+				"label":wn._("SMS Center"),
+				"description":wn._("Send mass SMS to your contacts"),
+				doctype:"SMS Center"
+			},
+		]
+	},
+	{
+		title: wn._("Analytics"),
+		right: true,
+		icon: "icon-bar-chart",
+		items: [
+			{
+				"label":wn._("Sales Analytics"),
+				page: "sales-analytics"
+			},
+		]
+	},
+	{
+		title: wn._("Reports"),
+		right: true,
+		icon: "icon-list",
+		items: [
+			{
+				"label":wn._("Customer Addresses and Contacts"),
+				route: "query-report/Customer Addresses and Contacts"
+			},
+			{
+				"label":wn._("Sales Orders Pending to be Delivered"),
+				route: "query-report/Sales Orders Pending to be Delivered"
+			},
+		]
+	}
+]
 
 pscript['onload_selling-home'] = function(wrapper) {
-	wrapper.appframe = new wn.ui.AppFrame($(wrapper).find('.appframe-area'), 'Selling');
-	erpnext.module_page.setup_page('Selling', wrapper);
+	wn.views.moduleview.make(wrapper, "Selling");
 }
\ No newline at end of file
diff --git a/setup/doctype/global_defaults/global_defaults.py b/setup/doctype/global_defaults/global_defaults.py
index 48c2365..1d93e24 100644
--- a/setup/doctype/global_defaults/global_defaults.py
+++ b/setup/doctype/global_defaults/global_defaults.py
@@ -64,6 +64,9 @@
 			webnotes.conn.set_default('year_start_date', ysd.strftime('%Y-%m-%d'))
 			webnotes.conn.set_default('year_end_date', \
 				get_last_day(get_first_day(ysd,0,11)).strftime('%Y-%m-%d'))
+				
+		# clear cache
+		webnotes.clear_cache()
 	
 	def validate_session_expiry(self):
 		if self.doc.session_expiry:
diff --git a/setup/doctype/notification_control/notification_control.txt b/setup/doctype/notification_control/notification_control.txt
index 3a17fb5..be86a96 100644
--- a/setup/doctype/notification_control/notification_control.txt
+++ b/setup/doctype/notification_control/notification_control.txt
@@ -2,22 +2,18 @@
  {
   "owner": "Administrator", 
   "docstatus": 0, 
-  "creation": "2012-07-03 13:30:56", 
+  "creation": "2012-07-12 23:29:45", 
   "modified_by": "Administrator", 
-  "modified": "2012-07-12 16:20:36"
+  "modified": "2013-01-10 12:22:45"
  }, 
  {
-  "section_style": "Simple", 
-  "description": "Send automatic emails to Contacts on Submitting transactions.", 
-  "allow_print": 1, 
-  "module": "Setup", 
   "allow_email": 1, 
   "issingle": 1, 
+  "description": "Send automatic emails to Contacts on Submitting transactions.", 
   "name": "__common__", 
-  "colour": "White:FFF", 
+  "allow_print": 1, 
   "doctype": "DocType", 
-  "server_code_error": " ", 
-  "version": 1, 
+  "module": "Setup", 
   "allow_copy": 1
  }, 
  {
@@ -42,26 +38,14 @@
   "doctype": "DocType"
  }, 
  {
-  "write": 0, 
-  "create": 0, 
-  "role": "Guest", 
-  "doctype": "DocPerm"
- }, 
- {
-  "write": 1, 
-  "create": 1, 
-  "role": "System Manager", 
-  "doctype": "DocPerm"
- }, 
- {
-  "description": "When any of the checked transactions are \"Submitted\", an email is automatically sent to the associated \"Contact\" in that transaction, with the transaction as an attachment.", 
-  "colour": "White:FFF", 
+  "description": "When any of the checked transactions are \"Submitted\", an email pop-up automatically opened to send an email to the associated \"Contact\" in that transaction, with the transaction as an attachment. The user may or may not send the email.", 
   "doctype": "DocField", 
-  "label": "Send Email Automatically on Submission of", 
+  "label": "Prompt for Email on Submission of", 
   "fieldname": "send_autonotification_for", 
   "fieldtype": "Section Break"
  }, 
  {
+  "print_width": "50%", 
   "doctype": "DocField", 
   "label": "Sales", 
   "width": "50%", 
@@ -70,29 +54,30 @@
  }, 
  {
   "doctype": "DocField", 
+  "label": "Quotation", 
   "fieldname": "quotation", 
-  "fieldtype": "Check", 
-  "label": "Quotation"
+  "fieldtype": "Check"
  }, 
  {
   "doctype": "DocField", 
+  "label": "Sales Order", 
   "fieldname": "sales_order", 
-  "fieldtype": "Check", 
-  "label": "Sales Order"
+  "fieldtype": "Check"
  }, 
  {
   "doctype": "DocField", 
+  "label": "Delivery Note", 
   "fieldname": "delivery_note", 
-  "fieldtype": "Check", 
-  "label": "Delivery Note"
+  "fieldtype": "Check"
  }, 
  {
   "doctype": "DocField", 
+  "label": "Sales Invoice", 
   "fieldname": "sales_invoice", 
-  "fieldtype": "Check", 
-  "label": "Sales Invoice"
+  "fieldtype": "Check"
  }, 
  {
+  "print_width": "50%", 
   "doctype": "DocField", 
   "label": "Purchase", 
   "width": "50%", 
@@ -101,44 +86,41 @@
  }, 
  {
   "doctype": "DocField", 
+  "label": "Purchase Order", 
   "fieldname": "purchase_order", 
-  "fieldtype": "Check", 
-  "label": "Purchase Order"
+  "fieldtype": "Check"
  }, 
  {
   "doctype": "DocField", 
+  "label": "Purchase Receipt", 
   "fieldname": "purchase_receipt", 
-  "fieldtype": "Check", 
-  "label": "Purchase Receipt"
+  "fieldtype": "Check"
  }, 
  {
   "doctype": "DocField", 
+  "label": "Expense Claim", 
   "fieldname": "expense_claim", 
-  "fieldtype": "Check", 
-  "label": "Expense Claim"
+  "fieldtype": "Check"
  }, 
  {
   "description": "Customize the introductory text that goes as a part of that email. Each transaction has a separate introductory text.", 
-  "colour": "White:FFF", 
   "doctype": "DocField", 
   "label": "Customize the Notification", 
   "fieldname": "customize_the_notification", 
   "fieldtype": "Section Break"
  }, 
  {
-  "colour": "White:FFF", 
   "doctype": "DocField", 
   "label": "Select Transaction", 
-  "trigger": "Client", 
   "fieldname": "select_transaction", 
   "fieldtype": "Select", 
   "options": "\nQuotation\nSales Order\nDelivery Note\nSales Invoice\nPurchase Order\nPurchase Receipt\nExpense Claim\nExpense Claim Approved\nExpense Claim Rejected"
  }, 
  {
   "doctype": "DocField", 
+  "label": "Custom Message", 
   "fieldname": "custom_message", 
-  "fieldtype": "Text Editor", 
-  "label": "Custom Message"
+  "fieldtype": "Text Editor"
  }, 
  {
   "doctype": "DocField", 
@@ -210,5 +192,17 @@
   "fieldname": "expense_claim_rejected_message", 
   "fieldtype": "Text", 
   "hidden": 1
+ }, 
+ {
+  "create": 0, 
+  "doctype": "DocPerm", 
+  "write": 0, 
+  "role": "Guest"
+ }, 
+ {
+  "create": 1, 
+  "doctype": "DocPerm", 
+  "write": 1, 
+  "role": "System Manager"
  }
 ]
\ No newline at end of file
diff --git a/setup/page/setup/setup.html b/setup/page/setup/setup.html
deleted file mode 100644
index 33dd460..0000000
--- a/setup/page/setup/setup.html
+++ /dev/null
@@ -1,128 +0,0 @@
-<div class="layout-wrapper layout-wrapper-appframe">
-	<div class="appframe-area"></div>
-	<div class="layout-main">
-		<div class="setup-column">
-			<h3>Company</h3>
-			<p>
-				<b><a href="#List/Company">Companies</a></b><br>
-				<span class="help">List of companies (not customers / suppliers)</span>
-			</p>
-			<p>
-				<b><a href="#List/Fiscal Year">Fiscal Years</a></b><br>
-				<span class="help">Financial Years for books of accounts</span>
-			</p>
-			<p>
-				<b><a href="#List/Currency">Currencies</a></b><br>
-				<span class="help">Currency Master</span>
-			</p>
-		</div>
-		<div class="setup-column">
-			<h3>Users and Permissions</h3>
-			<p>
-				<b><a href="#List/Profile">Users</a></b><br>
-				<span class="help">Add/remove users, set roles, passwords etc</span>
-			</p>
-			<p>
-				<b><a href="#permission-manager">Permission Manager</a></b><br>
-				<span class="help">Set permissions on transactions / masters</span>
-			</p>
-			<p>
-				<b><a href="#user-properties">User Properties</a></b><br>
-				<span class="help">Set default values for users (also used for permissions).</span>
-			</p>
-			<p>
-				<b><a href="#List/Workflow">Workflow Manager</a></b><br>
-				<span class="help">Set workflow rules.</span>
-			</p>
-			<p>
-				<b><a href="#List/Authorization Rule">Amount based Authorization Rules</a></b><br>
-				<span class="help">Restrict submission rights based on amount</span>
-			</p>
-		</div>
-		<div class="setup-column">
-			<h3>Data</h3>
-			<p>
-				<b><a href="#data-import-tool">Data Import Tool</a></b><br>
-				<span class="help">Import data from spreadsheet (csv) files</span>
-			</p>
-			<p>
-				<b><a href="#Form/Global Defaults/Global Defaults">Global Defaults</a></b><br>
-				<span class="help">Set default values for entry</span>
-			</p>
-			<p>
-				<b><a href="#Trash">Recycle Bin</a></b><br>
-				<span class="help">Un-trash items</span>
-			</p>
-		</div>
-		<div class="setup-column">
-			<h3>Email and Notifications</h3>
-			<p>
-				<b><a href="#Form/Email Settings/Email Settings">Email Settings</a></b><br>
-				<span class="help">Out going mail server and support ticket mailbox</span>
-			</p>
-			<p>
-				<b><a href="#Form/Notification Control/Notification Control">Auto Notifications</a></b><br>
-				<span class="help">Automatic email sending to customers and suppliers</span>
-			</p>
-			<p>
-				<b><a href="#List/Email Digest">Email Digests</a></b><br>
-				<span class="help">Daily, weekly, monthly email Digests</span>
-			</p>
-			<p>
-				<b><a href="#Form/SMS Settings/SMS Settings">SMS Setup</a></b><br>
-				<span class="help">Setup outgoing SMS via your bulk SMS provider</span>
-			</p>
-			<p>
-				<b><a href="#Form/SMS Center/SMS Center">Send Bulk SMS</a></b><br>
-				<span class="help">Send bulk SMS to leads, customers, contacts</span>
-			</p>
-		</div>
-		<div class="setup-column">
-			<h3>Customize ERPNext</h3>
-			<p>
-				<b><a href="#Form/Customize Form/Customize Form">Customize Forms</a></b><br>
-				<span class="help">Change entry properties (hide fields, make mandatory etc)</span>
-			</p>
-			<p>
-				<b><a href="#List/Custom Field">Custom Fields</a></b><br>
-				<span class="help">Add fields to forms</span>
-			</p>
-			<p>
-				<b><a href="#List/Custom Script">Custom Scripts</a></b><br>
-				<span class="help">Add custom code to forms</span>
-			</p>
-			<p>
-				<b><a href="#Form/Features Setup/Features Setup">Disable Features</a></b><br>
-				<span class="help">Simplify entry forms by disabling features</span>
-			</p>
-			<p>
-				<b><a href="#modules_setup">Modules Setup</a></b><br>
-				<span class="help">Show, hide modules</span>
-			</p>
-			<p>
-				<b><a href="#Form/Naming Series/Naming Series">Numbering Series</a></b><br>
-				<span class="help">Set multiple numbering series for transactions</span>
-			</p>
-		</div>
-		<div class="setup-column">
-			<h3>Branding and Printing</h3>
-			<p>
-				<b><a href="#List/Letter Head">Letter Heads</a></b><br>
-				<span class="help">Letter heads for print</span>
-			</p>
-			<p>
-				<b><a href="#List/Print Format">Print Formats</a></b><br>
-				<span class="help">HTML print formats for quotes, invoices etc</span>
-			</p>
-			<p>
-				<b><a href="#List/Print Heading">Print Headings</a></b><br>
-				<span class="help">Add headers for standard print formats</span>
-			</p>
-			<p>
-				<b><a href="#Form/Style Settings/Style Settings">Style Settings</a></b><br>
-				<span class="help">Change background fonts etc</span>
-			</p>
-		</div>
-		<div style="clear: both"></div>
-	</div>
-</div>
diff --git a/setup/page/setup/setup.js b/setup/page/setup/setup.js
index a1b9f2d..a54b605 100644
--- a/setup/page/setup/setup.js
+++ b/setup/page/setup/setup.js
@@ -1,27 +1,185 @@
-// 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/>.
+// ERPNext: Copyright 2013 Web Notes Technologies Pvt Ltd
+// GNU General Public License. See "license.txt"
 
-pscript.onload_Setup = function(wrapper) {
-	wrapper.appframe = new wn.ui.AppFrame($(wrapper).find('.appframe-area'), 'Setup');
-	wrapper.appframe.add_home_breadcrumb();
-	wrapper.appframe.add_breadcrumb(wn.modules["Setup"].icon);
-	
-	erpnext.module_page.hide_links(wrapper);
+wn.module_page["Setup"] = [
+	{
+		title: wn._("Organization"),
+		icon: "icon-building",
+		items: [
+			{
+				"label":wn._("Company"),
+				"doctype":"Company",
+				"description":wn._("List of companies (not customers / suppliers)")
+			},
+			{
+				"doctype":"Fiscal Year",
+				"label": wn._("Fiscal Year"),
+				"description":wn._("Financial Years for books of accounts")
+			},
+			{
+				"doctype":"Currency",
+				"label": wn._("Currency"),
+				"description": wn._("Currency Master")
+			},
+		]
+	},
+	{
+		title: wn._("Users"),
+		icon: "icon-group",
+		right: true,
+		items: [
+			{
+				"doctype":"Profile",
+				"label": wn._("Profile"),
+				"description": wn._("Add/remove users, set roles, passwords etc")
+			},
+			{
+				"page":"permission-manager",
+				label: wn._("Permission Manager"),
+				"description": wn._("Set permissions on transactions / masters")
+			},
+			{
+				"page":"user-properties",
+				label: wn._("User Properties"),
+				"description":wn._("Set default values for users (also used for permissions).")
+			},
+			{
+				"doctype":"Workflow",
+				label:wn._("Workfow"),
+				"description":wn._("Set workflow rules.")
+			},
+			{
+				"doctype":"Authorization Rule",
+				label:wn._("Authorization Rule"),
+				"description":wn._("Restrict submission rights based on amount")
+			},
+		]
+	},
+	{
+		title: wn._("Data"),
+		icon: "icon-table",
+		items: [
+			{
+				"page":"data-import-tool",
+				label: wn._("Data Import"),
+				"description":wn._("Import data from spreadsheet (csv) files")
+			},
+			{
+				"route":"Form/Global Defaults",
+				doctype: "Global Defaults",
+				label: wn._("Global Defaults"),
+				"description":wn._("Set default values for entry"),
+			},
+			{
+				"route":"Form/Naming Series/Naming Series",
+				doctype: "Naming Series",
+				label: wn._("Manage numbering series"),
+				"description":wn._("Set multiple numbering series for transactions")
+			},
+		]
+	},
+	{
+		title: wn._("Branding and Printing"),
+		icon: "icon-printer",
+		right: true,
+		items: [
+			{
+				"doctype":"Letter Head",
+				label:wn._("Letter Head"),
+				"description":wn._("Letter heads for print")
+			},
+			{
+				"doctype":"Print Format",
+				label:wn._("Print Format"),
+				"description":wn._("HTML print formats for quotes, invoices etc")
+			},
+			{
+				"doctype":"Print Heading",
+				label:wn._("Print Heading"),
+				"description":wn._("Add headers for standard print formats")
+			},
+			{
+				"route":"Form/Style Settings/Style Settings",
+				doctype:wn._("Style Settings"),
+				label:wn._("Style Settings"),
+				"description":wn._("Change background fonts etc")
+			}
+		]
+	},
+	{
+		title: wn._("Email Settings"),
+		icon: "icon-envelope",
+		items: [
+			{
+				"route":"Form/Email Settings/Email Settings",
+				doctype:"Email Settings",
+				label: wn._("Email Settings"),
+				"description":wn._("Out going mail server and support ticket mailbox")
+			},
+			{
+				"route":"Form/Notification Control/Notification Control",
+				doctype:"Notification Control",
+				label: wn._("Notification Control"),
+				"description":wn._("Prompt email sending to customers and suppliers"),
+			},
+			{
+				"doctype":"Email Digest",
+				label: wn._("Email Digest"),
+				"description":wn._("Daily, weekly, monthly email Digests")
+			},
+			{
+				"route":"Form/SMS Settings/SMS Settings",
+				doctype:"SMS Settings",
+				label: wn._("SMS Settings"),
+				"description":wn._("Setup outgoing SMS via your bulk SMS provider")
+			},
+			{
+				"route":"Form/SMS Center/SMS Center",
+				doctype:"SMS Center",
+				label: wn._("SMS Center"),
+				"description":wn._("Send bulk SMS to leads, customers, contacts")
+			},
+		]
+	},
+	{
+		title: wn._("Customize"),
+		icon: "icon-wrench",
+		items: [			
+			{
+				"route":"Form/Customize Form/Customize Form",
+				doctype:"Customize Form",
+				label: wn._("Customize Form"),
+				"description":wn._("Change entry properties (hide fields, make mandatory etc)")
+			},
+			{
+				"doctype":"Custom Field",
+				label: wn._("Custom Field"),
+				"description":wn._("Add fields to forms")
+			},
+			{
+				"doctype":"Custom Script",
+				label: wn._("Custom Script"),
+				"description":wn._("Add custom code to forms")
+			},
+			{
+				"route":"Form/Features Setup/Features Setup",
+				"description":wn._("Simplify entry forms by disabling features"),
+				doctype:"Features Setup",
+				label: wn._("Features Setup"),
+			},
+			{
+				"page":"modules_setup",
+				label: wn._("Show / Hide Modules"),
+				"description":wn._("Show, hide modules")
+			},
+		]
+	},
+]
+
+pscript['onload_Setup'] = function(wrapper) {
+	wn.views.moduleview.make(wrapper, "Setup");
 	if(wn.boot.expires_on) {
-		$(wrapper).find(".layout-main")
+		$(wrapper).find(".main-section")
 			.prepend("<div class='alert'>Your ERPNext account will expire on "
 				+ wn.datetime.global_date_format(wn.boot.expires_on) + "</div>");
 	}
diff --git a/startup/event_handlers.py b/startup/event_handlers.py
index 16fb523..6b16f4c 100644
--- a/startup/event_handlers.py
+++ b/startup/event_handlers.py
@@ -1,18 +1,6 @@
-# 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/>.
+# ERPNext: Copyright 2013 Web Notes Technologies Pvt Ltd
+# GNU General Public License. See "license.txt"
+
 
 from __future__ import unicode_literals
 import webnotes
diff --git a/startup/observers.py b/startup/observers.py
index 7dad77a..46683f8 100644
--- a/startup/observers.py
+++ b/startup/observers.py
@@ -17,4 +17,5 @@
 observer_map = {
 	"*:on_update": "home.update_feed",
 	"*:on_submit": "home.update_feed",
+#	"*:on_update": "webnotes.widgets.moduleview.update_count"
 }
\ No newline at end of file
diff --git a/startup/open_count.py b/startup/open_count.py
new file mode 100644
index 0000000..e0767c3
--- /dev/null
+++ b/startup/open_count.py
@@ -0,0 +1,28 @@
+# ERPNext: Copyright 2013 Web Notes Technologies Pvt Ltd
+# GNU General Public Licnese. See "license.txt"
+
+from __future__ import unicode_literals
+import webnotes
+
+queries = {
+	"Support Ticket": {"status":"Open"},
+	"Customer Issue": {"status":"Open"},
+	"Task": {"status":"Open"},
+	"Lead": {"status":"Open"},
+	"Opportunity": {"docstatus":0},
+	"Quotation": {"docstatus":0},
+	"Sales Order": {"docstatus":0},
+	"Journal Voucher": {"docstatus":0},
+	"Sales Invoice": {"docstatus":0},
+	"Purchase Invoice": {"docstatus":0},
+	"Leave Application": {"status":"Open"},
+	"Expense Claim": {"approval_status":"Draft"},
+	"Purchase Receipt": {"docstatus":0},
+	"Delivery Note": {"docstatus":0},
+	"Stock Entry": {"docstatus":0},
+	"Purchase Request": {"docstatus":0},
+	"Purchase Order": {"docstatus":0},
+	"Production Order": {"docstatus":0},
+	"BOM": {"docstatus":0},
+	"Timesheet": {"docstatus":0},
+}
\ No newline at end of file
diff --git a/stock/doctype/delivery_note/delivery_note.js b/stock/doctype/delivery_note/delivery_note.js
index a80966a..223b064 100644
--- a/stock/doctype/delivery_note/delivery_note.js
+++ b/stock/doctype/delivery_note/delivery_note.js
@@ -37,7 +37,9 @@
 	if(!doc.posting_time) doc.posting_time = wn.datetime.get_cur_time()
 		
 	if(doc.__islocal){
-		hide_field(['customer_address','contact_person','customer_name','address_display','contact_display','contact_mobile','contact_email','territory','customer_group']);
+		hide_field(['customer_address', 'contact_person', 'customer_name', 
+			'address_display', 'contact_display', 'contact_mobile', 
+			'contact_email', 'territory', 'customer_group']);
 	}	
 }
 
@@ -69,8 +71,7 @@
 		cur_frm.add_custom_button('Make Packing Slip', cur_frm.cscript['Make Packing Slip']);
 	}
 	
-	if(doc.customer) $(cur_frm.fields_dict.contact_info.row.wrapper).toggle(true);
-	else $(cur_frm.fields_dict.contact_info.row.wrapper).toggle(false);
+	cur_frm.toggle_display("contact_info", doc.customer);
 	
 	set_print_hide(doc, cdt, cdn);
 }
@@ -78,38 +79,25 @@
 
 //customer
 cur_frm.cscript.customer = function(doc,dt,dn,onload) {	
+	cur_frm.toggle_display("contact_info", doc.customer);
+	
 	var pl = doc.price_list_name;
 	var callback = function(r,rt) {
 			var doc = locals[cur_frm.doctype][cur_frm.docname];
-			if(doc.customer) unhide_field(['customer_address','contact_person','territory','customer_group']);
+			if(doc.customer)
+			 	unhide_field(['customer_address','contact_person','territory','customer_group']);
 			cur_frm.refresh();
 			if(!onload && (pl != doc.price_list_name)) cur_frm.cscript.price_list_name(doc, dt, dn); 
 	} 
 	var args = onload ? 'onload':''
-	if(doc.customer) $c_obj(make_doclist(doc.doctype, doc.name), 'get_default_customer_shipping_address', args, callback);
+	if(doc.customer) $c_obj(make_doclist(doc.doctype, doc.name),
+	 	'get_default_customer_shipping_address', args, callback);
 }
 
 cur_frm.cscript.customer_address = cur_frm.cscript.contact_person = function(doc,dt,dn) {		
 	if(doc.customer) get_server_fields('get_customer_address', JSON.stringify({customer: doc.customer, address: doc.customer_address, contact: doc.contact_person}),'', doc, dt, dn, 1);
 }
 
-cur_frm.fields_dict.customer_address.on_new = function(dn) {
-	locals['Address'][dn].customer = locals[cur_frm.doctype][cur_frm.docname].customer;
-	locals['Address'][dn].customer_name = locals[cur_frm.doctype][cur_frm.docname].customer_name;
-}
-
-cur_frm.fields_dict.contact_person.on_new = function(dn) {
-	locals['Contact'][dn].customer = locals[cur_frm.doctype][cur_frm.docname].customer;
-	locals['Contact'][dn].customer_name = locals[cur_frm.doctype][cur_frm.docname].customer_name;
-}
-
-cur_frm.fields_dict['customer_address'].get_query = function(doc, cdt, cdn) {
-	return 'SELECT name,address_line1,city FROM tabAddress WHERE customer = "'+ doc.customer +'" AND docstatus != 2 AND name LIKE "%s" ORDER BY name ASC LIMIT 50';
-}
-
-cur_frm.fields_dict['contact_person'].get_query = function(doc, cdt, cdn) {
-	return 'SELECT name,CONCAT(first_name," ",ifnull(last_name,"")) As FullName,department,designation FROM tabContact WHERE customer = "'+ doc.customer +'" AND docstatus != 2 AND name LIKE "%s" ORDER BY name ASC LIMIT 50';
-}
 
 cur_frm.cscript.get_items = function(doc,dt,dn) {
 	var callback = function(r,rt){
@@ -117,9 +105,12 @@
 		if(r.message){							
 			doc.sales_order_no = r.message;			
 			if(doc.sales_order_no) {					
-					unhide_field(['customer_address','contact_person','territory','customer_group']);														
+				unhide_field(['customer_address','contact_person','territory','customer_group']);														
 			}			
-			refresh_many(['delivery_note_details','customer','customer_address','contact_person','customer_name','address_display','contact_display','contact_mobile','contact_email','territory','customer_group']);
+			
+			refresh_many(['delivery_note_details', 'customer', 'customer_address',
+			 	'contact_person', 'customer_name', 'address_display', 'contact_display',
+			 	'contact_mobile', 'contact_email', 'territory', 'customer_group']);
 		}
 	} 
  $c_obj(make_doclist(doc.doctype, doc.name),'pull_sales_order_details','',callback); 
diff --git a/stock/doctype/delivery_note/delivery_note.txt b/stock/doctype/delivery_note/delivery_note.txt
index d3e1642..215dd41 100644
--- a/stock/doctype/delivery_note/delivery_note.txt
+++ b/stock/doctype/delivery_note/delivery_note.txt
@@ -2,9 +2,9 @@
  {
   "owner": "Administrator", 
   "docstatus": 0, 
-  "creation": "2012-11-28 11:26:21", 
+  "creation": "2012-12-03 17:26:43", 
   "modified_by": "Administrator", 
-  "modified": "2012-12-03 17:10:41"
+  "modified": "2013-01-09 12:52:30"
  }, 
  {
   "is_submittable": 1, 
@@ -19,6 +19,7 @@
   "doctype": "DocType"
  }, 
  {
+  "read_only": 0, 
   "name": "__common__", 
   "parent": "Delivery Note", 
   "doctype": "DocField", 
@@ -38,10 +39,10 @@
   "doctype": "DocType"
  }, 
  {
+  "print_width": "50%", 
   "oldfieldtype": "Column Break", 
   "doctype": "DocField", 
   "width": "50%", 
-  "trigger": "Client", 
   "fieldname": "column_break0", 
   "fieldtype": "Column Break", 
   "permlevel": 0
@@ -51,7 +52,6 @@
   "description": "To manage multiple series please go to Setup > Manage Series", 
   "no_copy": 1, 
   "oldfieldtype": "Select", 
-  "colour": "White:FFF", 
   "doctype": "DocField", 
   "label": "Series", 
   "oldfieldname": "naming_series", 
@@ -68,7 +68,6 @@
   "label": "Customer", 
   "oldfieldname": "customer", 
   "permlevel": 0, 
-  "trigger": "Client", 
   "fieldname": "customer", 
   "fieldtype": "Link", 
   "search_index": 1, 
@@ -86,6 +85,7 @@
  }, 
  {
   "print_hide": 1, 
+  "depends_on": "customer", 
   "doctype": "DocField", 
   "label": "Select Shipping Address", 
   "options": "Address", 
@@ -136,11 +136,11 @@
  }, 
  {
   "print_hide": 0, 
+  "permlevel": 0, 
   "description": "The date at which current entry will get or has actually executed.", 
-  "width": "100px", 
+  "print_width": "100px", 
   "default": "Today", 
   "oldfieldtype": "Date", 
-  "colour": "White:FFF", 
   "doctype": "DocField", 
   "label": "Posting Date", 
   "oldfieldname": "posting_date", 
@@ -150,7 +150,7 @@
   "search_index": 1, 
   "reqd": 1, 
   "in_filter": 1, 
-  "permlevel": 0
+  "width": "100px"
  }, 
  {
   "print_hide": 1, 
@@ -176,6 +176,7 @@
  }, 
  {
   "print_hide": 1, 
+  "print_width": "100px", 
   "no_copy": 0, 
   "oldfieldtype": "Data", 
   "doctype": "DocField", 
@@ -189,9 +190,9 @@
  }, 
  {
   "print_hide": 1, 
+  "print_width": "100px", 
   "no_copy": 0, 
   "oldfieldtype": "Data", 
-  "colour": "White:FFF", 
   "doctype": "DocField", 
   "label": "P.O. Date", 
   "oldfieldname": "po_date", 
@@ -204,7 +205,6 @@
  }, 
  {
   "oldfieldtype": "Section Break", 
-  "colour": "White:FFF", 
   "doctype": "DocField", 
   "label": "Items", 
   "fieldname": "items", 
@@ -215,7 +215,6 @@
   "print_hide": 0, 
   "no_copy": 0, 
   "oldfieldtype": "Table", 
-  "colour": "White:FFF", 
   "allow_on_submit": 1, 
   "doctype": "DocField", 
   "label": "Delivery Note Items", 
@@ -248,6 +247,7 @@
  }, 
  {
   "print_hide": 0, 
+  "print_width": "150px", 
   "no_copy": 0, 
   "oldfieldtype": "Currency", 
   "doctype": "DocField", 
@@ -263,7 +263,6 @@
   "oldfieldtype": "Button", 
   "doctype": "DocField", 
   "label": "Re-Calculate Values", 
-  "trigger": "Client", 
   "fieldname": "recalculate_values", 
   "fieldtype": "Button", 
   "permlevel": 0
@@ -279,7 +278,6 @@
   "description": "You can make a delivery note from multiple sales orders. Select sales orders one by one and click on the button below.", 
   "no_copy": 0, 
   "oldfieldtype": "Link", 
-  "colour": "White:FFF", 
   "doctype": "DocField", 
   "label": "Sales Order No", 
   "oldfieldname": "sales_order_no", 
@@ -316,12 +314,10 @@
   "print_hide": 1, 
   "description": "Select the price list as entered in \"Price List\" master. This will pull the reference rates of items against this price list as specified in \"Item\" master.", 
   "oldfieldtype": "Select", 
-  "colour": "White:FFF", 
   "doctype": "DocField", 
   "label": "Price List", 
   "oldfieldname": "price_list_name", 
   "permlevel": 0, 
-  "trigger": "Client", 
   "fieldname": "price_list_name", 
   "fieldtype": "Select", 
   "reqd": 1, 
@@ -330,7 +326,6 @@
  {
   "print_hide": 1, 
   "description": "Select the currency in which price list is maintained", 
-  "colour": "White:FFF", 
   "doctype": "DocField", 
   "label": "Price List Currency", 
   "options": "link:Currency", 
@@ -342,7 +337,6 @@
  {
   "print_hide": 1, 
   "description": "Rate at which Price list currency is converted to company's base currency", 
-  "colour": "White:FFF", 
   "doctype": "DocField", 
   "label": "Price List Currency Conversion Rate", 
   "fieldname": "plc_conversion_rate", 
@@ -351,6 +345,7 @@
   "permlevel": 0
  }, 
  {
+  "print_width": "50%", 
   "doctype": "DocField", 
   "width": "50%", 
   "fieldname": "column_break2", 
@@ -361,7 +356,6 @@
   "print_hide": 1, 
   "description": "Customer's Currency", 
   "oldfieldtype": "Select", 
-  "colour": "White:FFF", 
   "doctype": "DocField", 
   "label": "Currency", 
   "oldfieldname": "currency", 
@@ -376,7 +370,6 @@
   "description": "Rate at which customer's currency is converted to company's base currency", 
   "no_copy": 0, 
   "oldfieldtype": "Currency", 
-  "colour": "White:FFF", 
   "doctype": "DocField", 
   "label": "Conversion Rate", 
   "oldfieldname": "conversion_rate", 
@@ -388,7 +381,6 @@
  }, 
  {
   "oldfieldtype": "Section Break", 
-  "colour": "White:FFF", 
   "doctype": "DocField", 
   "label": "Taxes", 
   "fieldname": "taxes", 
@@ -399,7 +391,6 @@
   "print_hide": 1, 
   "description": "If you have created a standard template in Sales Taxes and Charges Master, select one and click on the button below.", 
   "oldfieldtype": "Link", 
-  "colour": "White:FFF", 
   "doctype": "DocField", 
   "label": "Taxes and Charges", 
   "oldfieldname": "charge", 
@@ -413,7 +404,6 @@
   "oldfieldtype": "Button", 
   "doctype": "DocField", 
   "label": "Get Taxes and Charges", 
-  "trigger": "Client", 
   "fieldname": "get_charges", 
   "fieldtype": "Button", 
   "permlevel": 0
@@ -431,6 +421,7 @@
  }, 
  {
   "print_hide": 1, 
+  "print_width": "150px", 
   "oldfieldtype": "Currency", 
   "doctype": "DocField", 
   "label": "Taxes and Charges Total", 
@@ -445,7 +436,6 @@
   "oldfieldtype": "Button", 
   "doctype": "DocField", 
   "label": "Calculate Charges", 
-  "trigger": "Client", 
   "fieldname": "calculate_charges", 
   "fieldtype": "Button", 
   "permlevel": 0
@@ -461,7 +451,6 @@
  {
   "print_hide": 0, 
   "oldfieldtype": "Section Break", 
-  "colour": "White:FFF", 
   "doctype": "DocField", 
   "label": "Totals", 
   "fieldname": "totals", 
@@ -470,6 +459,7 @@
  }, 
  {
   "print_hide": 1, 
+  "print_width": "150px", 
   "no_copy": 0, 
   "oldfieldtype": "Currency", 
   "doctype": "DocField", 
@@ -483,6 +473,7 @@
  }, 
  {
   "print_hide": 1, 
+  "print_width": "150px", 
   "no_copy": 0, 
   "oldfieldtype": "Currency", 
   "doctype": "DocField", 
@@ -496,9 +487,9 @@
  {
   "print_hide": 1, 
   "description": "In Words will be visible once you save the Delivery Note.", 
+  "print_width": "200px", 
   "no_copy": 0, 
   "oldfieldtype": "Data", 
-  "colour": "White:FFF", 
   "doctype": "DocField", 
   "label": "In Words", 
   "oldfieldname": "in_words", 
@@ -516,6 +507,7 @@
  }, 
  {
   "print_hide": 0, 
+  "print_width": "150px", 
   "no_copy": 0, 
   "oldfieldtype": "Currency", 
   "doctype": "DocField", 
@@ -529,6 +521,7 @@
  }, 
  {
   "print_hide": 0, 
+  "print_width": "150px", 
   "no_copy": 0, 
   "oldfieldtype": "Currency", 
   "doctype": "DocField", 
@@ -542,9 +535,9 @@
  {
   "print_hide": 0, 
   "description": "In Words (Export) will be visible once you save the Delivery Note.", 
+  "print_width": "150px", 
   "no_copy": 0, 
   "oldfieldtype": "Data", 
-  "colour": "White:FFF", 
   "doctype": "DocField", 
   "label": "In Words (Export)", 
   "oldfieldname": "in_words_export", 
@@ -575,19 +568,16 @@
  {
   "print_hide": 1, 
   "oldfieldtype": "Button", 
-  "colour": "White:FFF", 
   "doctype": "DocField", 
   "label": "Get Terms and Conditions", 
-  "trigger": "Server", 
+  "options": "get_tc_details", 
   "fieldname": "get_terms", 
   "fieldtype": "Button", 
-  "options": "get_tc_details", 
   "permlevel": 0
  }, 
  {
   "print_hide": 1, 
   "oldfieldtype": "HTML", 
-  "colour": "White:FFF", 
   "doctype": "DocField", 
   "label": "Terms and Conditions HTML", 
   "options": "You can add Terms and Notes that will be printed in the Transaction", 
@@ -597,7 +587,6 @@
  }, 
  {
   "oldfieldtype": "Text Editor", 
-  "colour": "White:FFF", 
   "doctype": "DocField", 
   "label": "Terms and Conditions Details", 
   "oldfieldname": "terms", 
@@ -615,6 +604,7 @@
  }, 
  {
   "print_hide": 1, 
+  "print_width": "50%", 
   "doctype": "DocField", 
   "width": "50%", 
   "fieldname": "column_break4", 
@@ -623,20 +613,20 @@
  }, 
  {
   "print_hide": 1, 
+  "print_width": "150px", 
   "no_copy": 0, 
   "oldfieldtype": "Data", 
-  "colour": "White:FFF", 
   "doctype": "DocField", 
   "label": "Transporter Name", 
   "oldfieldname": "transporter_name", 
   "width": "150px", 
-  "trigger": "Client", 
   "fieldname": "transporter_name", 
   "fieldtype": "Data", 
   "reqd": 0, 
   "permlevel": 0
  }, 
  {
+  "print_width": "50%", 
   "doctype": "DocField", 
   "width": "50%", 
   "fieldname": "col_break34", 
@@ -646,9 +636,9 @@
  {
   "print_hide": 1, 
   "description": "Transporter lorry number", 
+  "print_width": "100px", 
   "no_copy": 0, 
   "oldfieldtype": "Data", 
-  "colour": "White:FFF", 
   "doctype": "DocField", 
   "label": "LR No", 
   "oldfieldname": "lr_no", 
@@ -660,18 +650,18 @@
  }, 
  {
   "print_hide": 1, 
+  "permlevel": 0, 
   "description": "Date on which lorry started from your warehouse", 
-  "width": "100px", 
+  "print_width": "100px", 
   "default": "Today", 
   "oldfieldtype": "Date", 
-  "colour": "White:FFF", 
   "doctype": "DocField", 
   "label": "LR Date", 
   "oldfieldname": "lr_date", 
   "no_copy": 0, 
   "fieldname": "lr_date", 
   "fieldtype": "Date", 
-  "permlevel": 0
+  "width": "100px"
  }, 
  {
   "doctype": "DocField", 
@@ -681,6 +671,7 @@
   "permlevel": 0
  }, 
  {
+  "print_width": "50%", 
   "doctype": "DocField", 
   "width": "50%", 
   "fieldname": "col_break20", 
@@ -698,6 +689,7 @@
   "in_filter": 1
  }, 
  {
+  "print_width": "50%", 
   "doctype": "DocField", 
   "width": "50%", 
   "fieldname": "col_break21", 
@@ -709,12 +701,12 @@
   "search_index": 1, 
   "doctype": "DocField", 
   "label": "Territory", 
-  "options": "Territory", 
+  "permlevel": 0, 
   "fieldname": "territory", 
   "fieldtype": "Link", 
   "reqd": 1, 
   "hidden": 0, 
-  "permlevel": 0, 
+  "options": "Territory", 
   "in_filter": 1
  }, 
  {
@@ -732,7 +724,6 @@
   "print_hide": 1, 
   "description": "Filling in Additional Information about the Delivery Note will help you analyze your data better.", 
   "oldfieldtype": "Section Break", 
-  "colour": "White:FFF", 
   "doctype": "DocField", 
   "label": "More Info", 
   "fieldname": "more_info", 
@@ -742,8 +733,8 @@
  {
   "print_hide": 1, 
   "description": "Time at which items were delivered from warehouse", 
+  "print_width": "100px", 
   "oldfieldtype": "Time", 
-  "colour": "White:FFF", 
   "doctype": "DocField", 
   "label": "Posting Time", 
   "oldfieldname": "posting_time", 
@@ -758,24 +749,25 @@
  {
   "print_hide": 1, 
   "permlevel": 1, 
-  "width": "150px", 
+  "print_width": "150px", 
   "default": "Draft", 
   "oldfieldtype": "Select", 
   "doctype": "DocField", 
   "label": "Status", 
   "oldfieldname": "status", 
   "no_copy": 1, 
+  "options": "\nDraft\nSubmitted\nCancelled", 
   "fieldname": "status", 
   "fieldtype": "Select", 
   "search_index": 1, 
   "reqd": 1, 
-  "options": "\nDraft\nSubmitted\nCancelled", 
+  "width": "150px", 
   "in_filter": 1
  }, 
  {
   "print_hide": 1, 
-  "allow_on_submit": 1, 
   "oldfieldtype": "Link", 
+  "allow_on_submit": 1, 
   "doctype": "DocField", 
   "label": "Letter Head", 
   "oldfieldname": "letter_head", 
@@ -788,13 +780,11 @@
   "print_hide": 1, 
   "no_copy": 1, 
   "oldfieldtype": "Link", 
-  "colour": "White:FFF", 
   "allow_on_submit": 1, 
   "doctype": "DocField", 
   "label": "Select Print Heading", 
   "oldfieldname": "select_print_heading", 
   "permlevel": 0, 
-  "trigger": "Client", 
   "fieldname": "select_print_heading", 
   "fieldtype": "Link", 
   "options": "Print Heading", 
@@ -803,12 +793,10 @@
  {
   "description": "Track this Delivery Note against any Project", 
   "oldfieldtype": "Link", 
-  "colour": "White:FFF", 
   "doctype": "DocField", 
   "label": "Project Name", 
   "oldfieldname": "project_name", 
   "permlevel": 0, 
-  "trigger": "Client", 
   "fieldname": "project_name", 
   "fieldtype": "Link", 
   "search_index": 1, 
@@ -829,7 +817,6 @@
  {
   "print_hide": 1, 
   "oldfieldtype": "Link", 
-  "colour": "White:FFF", 
   "doctype": "DocField", 
   "label": "Campaign", 
   "oldfieldname": "campaign", 
@@ -841,18 +828,18 @@
  }, 
  {
   "print_hide": 1, 
-  "allow_on_submit": 1, 
   "oldfieldtype": "Check", 
+  "allow_on_submit": 1, 
   "doctype": "DocField", 
   "label": "Print Without Amount", 
   "oldfieldname": "print_without_amount", 
-  "trigger": "Client", 
   "fieldname": "print_without_amount", 
   "fieldtype": "Check", 
   "permlevel": 0
  }, 
  {
   "print_hide": 1, 
+  "print_width": "50%", 
   "oldfieldtype": "Column Break", 
   "doctype": "DocField", 
   "width": "50%", 
@@ -866,7 +853,6 @@
   "description": "% of materials billed against this Delivery Note", 
   "no_copy": 1, 
   "search_index": 1, 
-  "colour": "White:FFF", 
   "doctype": "DocField", 
   "label": "% Amount Billed", 
   "oldfieldname": "per_billed", 
@@ -893,7 +879,6 @@
   "description": "% of materials delivered against this Delivery Note", 
   "no_copy": 1, 
   "search_index": 1, 
-  "colour": "White:FFF", 
   "doctype": "DocField", 
   "label": "% Installed", 
   "oldfieldname": "per_installed", 
@@ -914,9 +899,10 @@
  }, 
  {
   "print_hide": 1, 
-  "allow_on_submit": 0, 
+  "print_width": "150px", 
   "no_copy": 1, 
   "oldfieldtype": "Data", 
+  "allow_on_submit": 0, 
   "doctype": "DocField", 
   "label": "Amended From", 
   "oldfieldname": "amended_from", 
@@ -928,6 +914,7 @@
  {
   "print_hide": 1, 
   "description": "The date at which current entry is corrected in the system.", 
+  "print_width": "100px", 
   "no_copy": 1, 
   "oldfieldtype": "Date", 
   "doctype": "DocField", 
@@ -943,7 +930,6 @@
   "description": "Required only for sample item.", 
   "no_copy": 1, 
   "oldfieldtype": "Link", 
-  "colour": "White:FFF", 
   "doctype": "DocField", 
   "label": "To Warehouse", 
   "oldfieldname": "to_warehouse", 
@@ -956,7 +942,6 @@
  {
   "print_hide": 1, 
   "oldfieldtype": "Data", 
-  "colour": "White:FFF", 
   "doctype": "DocField", 
   "label": "Excise Page Number", 
   "oldfieldname": "excise_page", 
@@ -977,9 +962,9 @@
  {
   "print_hide": 1, 
   "description": "Select the relevant company name if you have multiple companies", 
+  "print_width": "150px", 
   "permlevel": 0, 
   "oldfieldtype": "Link", 
-  "colour": "White:FFF", 
   "doctype": "DocField", 
   "label": "Company", 
   "oldfieldname": "company", 
@@ -993,6 +978,7 @@
  }, 
  {
   "print_hide": 1, 
+  "print_width": "150px", 
   "permlevel": 0, 
   "oldfieldtype": "Select", 
   "doctype": "DocField", 
@@ -1010,7 +996,6 @@
   "print_hide": 1, 
   "no_copy": 1, 
   "oldfieldtype": "Data", 
-  "colour": "White:FFF", 
   "doctype": "DocField", 
   "label": "Cancel Reason", 
   "oldfieldname": "cancel_reason", 
@@ -1043,7 +1028,6 @@
  {
   "print_hide": 1, 
   "oldfieldtype": "Section Break", 
-  "colour": "White:FFF", 
   "doctype": "DocField", 
   "label": "Sales Team", 
   "fieldname": "sales_team_section_break", 
@@ -1052,6 +1036,7 @@
  }, 
  {
   "print_hide": 1, 
+  "print_width": "50%", 
   "doctype": "DocField", 
   "width": "50%", 
   "fieldname": "column_break6", 
@@ -1061,19 +1046,20 @@
  {
   "print_hide": 1, 
   "permlevel": 0, 
+  "print_width": "150px", 
   "no_copy": 0, 
   "oldfieldtype": "Link", 
   "doctype": "DocField", 
   "label": "Sales Partner", 
   "oldfieldname": "sales_partner", 
   "width": "150px", 
-  "trigger": "Client", 
   "fieldname": "sales_partner", 
   "fieldtype": "Link", 
   "options": "Sales Partner"
  }, 
  {
   "print_hide": 1, 
+  "print_width": "50%", 
   "doctype": "DocField", 
   "width": "50%", 
   "fieldname": "column_break7", 
@@ -1082,13 +1068,13 @@
  }, 
  {
   "print_hide": 1, 
+  "print_width": "100px", 
   "no_copy": 0, 
   "oldfieldtype": "Currency", 
   "doctype": "DocField", 
   "label": "Commission Rate (%)", 
   "oldfieldname": "commission_rate", 
   "width": "100px", 
-  "trigger": "Client", 
   "fieldname": "commission_rate", 
   "fieldtype": "Currency", 
   "permlevel": 0
@@ -1097,11 +1083,9 @@
   "print_hide": 1, 
   "no_copy": 0, 
   "oldfieldtype": "Currency", 
-  "colour": "White:FFF", 
   "doctype": "DocField", 
   "label": "Total Commission", 
   "oldfieldname": "total_commission", 
-  "trigger": "Client", 
   "fieldname": "total_commission", 
   "fieldtype": "Currency", 
   "permlevel": 0
@@ -1145,8 +1129,12 @@
   "permlevel": 0
  }, 
  {
+  "amend": 0, 
+  "create": 0, 
   "doctype": "DocPerm", 
+  "submit": 0, 
   "role": "Accounts User", 
+  "cancel": 0, 
   "permlevel": 1
  }, 
  {
@@ -1157,8 +1145,7 @@
   "write": 1, 
   "role": "Sales User", 
   "cancel": 1, 
-  "permlevel": 0, 
-  "match": ""
+  "permlevel": 0
  }, 
  {
   "amend": 0, 
@@ -1173,13 +1160,17 @@
  {
   "doctype": "DocPerm", 
   "role": "Customer", 
-  "match": "customer_name", 
-  "permlevel": 0
+  "permlevel": 0, 
+  "match": "customer_name"
  }, 
  {
-  "write": 1, 
+  "amend": 0, 
+  "create": 0, 
   "doctype": "DocPerm", 
+  "submit": 0, 
+  "write": 1, 
   "role": "All", 
+  "cancel": 0, 
   "permlevel": 2
  }, 
  {
diff --git a/stock/page/stock_balance/stock_balance.txt b/stock/page/stock_balance/stock_balance.txt
index 0f8e7fa..24fffc2 100644
--- a/stock/page/stock_balance/stock_balance.txt
+++ b/stock/page/stock_balance/stock_balance.txt
@@ -2,9 +2,9 @@
  {
   "owner": "Administrator", 
   "docstatus": 0, 
-  "creation": "2012-12-25 13:02:32", 
+  "creation": "2012-12-27 18:57:47", 
   "modified_by": "Administrator", 
-  "modified": "2012-12-25 13:02:32"
+  "modified": "2013-01-09 17:16:51"
  }, 
  {
   "name": "__common__", 
@@ -15,7 +15,22 @@
   "page_name": "stock-balance"
  }, 
  {
+  "name": "__common__", 
+  "parent": "stock-balance", 
+  "doctype": "Page Role", 
+  "parenttype": "Page", 
+  "parentfield": "roles"
+ }, 
+ {
   "name": "stock-balance", 
   "doctype": "Page"
+ }, 
+ {
+  "role": "Material Manager", 
+  "doctype": "Page Role"
+ }, 
+ {
+  "role": "Analytics", 
+  "doctype": "Page Role"
  }
 ]
\ No newline at end of file
diff --git a/stock/page/stock_home/stock_home.html b/stock/page/stock_home/stock_home.html
deleted file mode 100644
index d4dfd4c..0000000
--- a/stock/page/stock_home/stock_home.html
+++ /dev/null
@@ -1,143 +0,0 @@
-<div class="layout-wrapper layout-wrapper-background">
-	<div class="appframe-area"></div>
-	<div class="layout-main-section">
-		<div style="width: 48%; float: left;">
-			<h5><a href="#List/Stock Entry">Stock Entry</a></h5>
-			<p class="help">Transfer stock from one warehouse to another</p>
-			<br>
-			<h5><a href="#List/Delivery Note">Delivery Note</a></h5>
-			<p class="help">Delivery (shipment) to customers</p>
-			<br>
-			<h5><a href="#List/Purchase Receipt">Purchase Receipt</a></h5>
-			<p class="help">Goods received from Suppliers</p>
-		</div>
-		<div style="width: 48%; float: right;">
-			<h5><a href="#List/Item">Item</a></h5>
-			<p class="help">Item Master</p>
-			<br>
-			<h5><a href="#List/Serial No">Serial No</a></h5>
-			<p class="help">Single unit of an Item</p>
-			<br>
-			<h5><a href="#List/Batch">Batch</a></h5>
-			<p class="help">Batch of units of an Item</p>
-			<br>
-			<h5><a href="#List/Warehouse">Warehouse</a></h5>
-			<p class="help">Warehouse is where items are stored</p>
-		</div>
-		<div style="clear: both"></div>
-		<hr>
-		<h4>Reports</h4>
-		<div style="width: 48%; float: left;">
-			<h5><a href="#stock-ledger" data-role="Analytics, Material Manager,
-					Material User">Stock Ledger</a>
-			</h5>
-			<p class="help">Log of stock movements</p>
-			<br>
-			<h5><a href="#stock-balance" data-role="Analytics, Material Manager">
-					Stock Balance</a>
-			</h5>
-			<p class="help">Inflow, outflow and balance of stock</p>
-			<br>
-			<h5><a href="#stock-level" data-role="Analytics, Material Manager">
-					Stock Level</a>
-			</h5>
-			<p class="help">Available and estimated qty of stock, as of now</p>
-		</div>
-		<div style="width: 48%; float: right;">
-			<h5><a href="#stock-analytics" data-role="Analytics, Material Manager">
-					Stock Analytics</a>
-			</h5>
-			<p class="help">Visual representation of stock trends</p>
-			<br>
-			<h5><a href="#stock-ageing" data-role="Analytics, Material Manager">
-					Stock Ageing</a>
-			</h5>
-			<p class="help">Analysis of slow moving stock</p>
-		</div>
-		<div style="clear: both;"></div>
-		<hr>
-		<div class="reports-list"></div>
-	</div>
-	<div class="layout-side-section">
-		<div class="psidebar">
-			<div class="section">
-				<div class="section-head">Tools</div>
-				<div class="section-body">
-					<div class="section-item">
-						<a class="section-link" 
-							title = "Update stock by uploading a spreadsheet (csv) file"
-							href="#List/Stock Reconciliation">Stock Reconciliation</a>
-					</div>
-					<div class="section-item">
-						<a class="section-link" 
-							title = "Details of item installations"
-							href="#List/Installation Note">Installation Note</a>
-					</div>
-					<div class="section-item">
-						<a class="section-link" 
-							title = "Details packages against a delivery"
-							href="#List/Packing Slip">Packing Slip</a>
-					</div>
-					<div class="section-item">
-						<a class="section-link" 
-							title = "Multiple prices lists for items"
-							href="#List/Price List">Price List</a>
-					</div>
-					<div class="section-item">
-						<a class="section-link" 
-							title = "Readings of incoming quality inspections"
-							href="#List/Quality Inspection">Quality Inspection</a>
-					</div>
-					<div class="section-item">
-						<a class="section-link" 
-							title = "List of expense heads (Account) that will be distributed across incoming purchases (costs that you find out some time after you receive goods, like Custom Duty, but are a part of item valuation)"
-							href="#List/Landed Cost Master">Landed Cost Master</a>
-					</div>
-					<div class="section-item">
-						<a class="section-link" 
-							title = "Distribute costs on Purchase Receipts and add them to item value"
-							href="#Form/Landed Cost Wizard/Landed Cost Wizard">Landed Cost Wizard</a>
-					</div>
-					<div class="section-item">
-						<a class="section-link" 
-							title = "Change Unit of Measure (UOM) of an item"
-							href="#Form/Stock UOM Replace Utility/Stock UOM Replace Utility">UOM Replace Utility</a>
-					</div>
-					<div class="section-item">
-						<a class="section-link" 
-							title = "Helper for managing return of goods (sales or purchase)"
-							href="#Form/Sales and Purchase Return Tool/Sales and Purchase Return Tool">Sales or Purchase Returns</a>
-					</div>
-				</div>
-			</div>
-			<div class="section">
-				<div class="section-head">Setup</div>
-				<div class="section-body">
-					<div class="section-item">
-						<a class="section-link" 
-							title = "Tree of item classification"
-							href="#Sales Browser/Item Group"
-							data-role="Material Master Master, Material Manager,
-								Accounts Manager">Item Group</a>
-					</div>
-					<div class="section-item">
-						<a class="section-link" 
-							title = "Unit of Measure (UOM) master"
-							href="#List/UOM">Unit of Measure (UOM)</a>
-					</div>
-					<div class="section-item">
-						<a class="section-link" 
-							title = "List of Item Brands (optional)"
-							href="#List/Brand">Brand</a>
-					</div>
-					<div class="section-item">
-						<a class="section-link" 
-							title = "Types of warehouses"
-							href="#List/Warehouse Type">Warehouse Type</a>
-					</div>
-				</div>
-			</div>
-		</div>
-	</div>
-	<div style="clear: both;"></div>
-</div>
diff --git a/stock/page/stock_home/stock_home.js b/stock/page/stock_home/stock_home.js
index 97f5ec9..7ea62de 100644
--- a/stock/page/stock_home/stock_home.js
+++ b/stock/page/stock_home/stock_home.js
@@ -1,20 +1,207 @@
-// 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/>.
+// ERPNext: Copyright 2013 Web Notes Technologies Pvt Ltd
+// GNU General Public License. See "license.txt"
+
+wn.module_page["Stock"] = [
+	{
+		title: wn._("Documents"),
+		icon: "icon-copy",
+		items: [
+			{
+				label: wn._("Stock Entry"),
+				description: wn._("Transfer stock from one warehouse to another."),
+				doctype:"Stock Entry"
+			},
+			{
+				label: wn._("Delivery Note"),
+				description: wn._("Delivery (shipment) to customers."),
+				doctype:"Delivery Note"
+			},
+			{
+				label: wn._("Purchase Receipt"),
+				description: wn._("Goods received from Suppliers."),
+				doctype:"Purchase Receipt"
+			},
+		]
+	},
+	{
+		title: wn._("Masters"),
+		icon: "icon-book",
+		items: [
+			{
+				label: wn._("Item"),
+				description: wn._("All Products or Services."),
+				doctype:"Item"
+			},
+			{
+				label: wn._("Serial No"),
+				description: wn._("Single unit of an Item."),
+				doctype:"Serial No"
+			},
+			{
+				label: wn._("Batch"),
+				description: wn._("Batch (lot) of an Item."),
+				doctype:"Batch"
+			},
+			{
+				label: wn._("Warehouse"),
+				description: wn._("Where items are stored."),
+				doctype:"Warehouse"
+			},
+		]
+	},
+	{
+		title: wn._("Tools"),
+		icon: "icon-wrench",
+		items: [
+			{
+				"doctype":"Stock Reconciliation",
+				"label": wn._("Stock Reconciliation"),
+				description: wn._("Upload stock balance via csv.")
+			},
+			{
+				"doctype":"Installation Note",
+				"label": wn._("Installation Note"),
+				description: wn._("Installation record for a Serial No.")
+			},
+			{
+				"label": wn._("Packing Slip"),
+				"doctype":"Packing Slip",
+				description: wn._("Split Delivery Note into packages.")
+			},
+			{
+				"doctype":"Price List",
+				"label": wn._("Price List"),
+				"description": wn._("Multiple Item Prices")
+			},
+			{
+				"doctype":"Quality Inspection",
+				"label": wn._("Quality Inspection"),
+				description: wn._("Incoming quality inspection.")
+			},
+			{
+				"doctype":"Landed Cost Master",
+				"label":"Landed Cost Master",
+				description: wn._("Transportatoin cost distribution template.")
+			},
+			{
+				"route":"Form/Landed Cost Wizard/Landed Cost Wizard",
+				"label": wn._("Landed Cost Wizard"),
+				description: wn._("Distribute transport overhead across items."),
+				doctype: "Landed Cost Wizard"
+			},
+			{
+				"route":"Form/Stock UOM Replace Utility/Stock UOM Replace Utility",
+				"label": wn._("UOM Replace Utility"),
+				description: wn._("Change UOM for an Item."),
+				"doctype": "Stock UOM Replace Utility"
+			},
+			{
+				"route":"Form/Sales and Purchase Return Tool/Sales and Purchase Return Tool",
+				"label": wn._("Sales and Purchase Return Tool"),
+				doctype: "Sales and Purchase Return Tool",
+				description: wn._("Manage sales or purchase returns")
+			},
+		]
+	},
+	{
+		title: wn._("Setup"),
+		icon: "icon-cog",
+		items: [
+			{
+				"route":"Sales Browser/Item Group",
+				"label": wn._("Item Group"),
+				"description": wn._("Item classification.")
+			},
+			{
+				"doctype":"UOM",
+				"label": wn._("Unit of Measure") + " (UOM)",
+				"description": wn._("e.g. Kg, Unit, Nos, m")
+			},
+			{
+				"doctype":"Brand",
+				"label": wn._("Brand"),
+				"description": wn._("Brand master.")
+			},
+			{
+				"label": wn._("Warehouse Type"),
+				"doctype":"Warehouse Type",
+				"description": wn._("Types of warehouse")
+			}
+		]
+	},
+	{
+		title: wn._("Main Reports"),
+		right: true,
+		icon: "icon-table",
+		items: [
+			{
+				"label":wn._("Stock Ledger"),
+				page: "stock-ledger"
+			},
+			{
+				"label":wn._("Stock Balance"),
+				page: "stock-balance"
+			},
+			{
+				"page":"stock-level",
+				"label": wn._("Stock Level")
+			},
+			{
+				"page":"stock-ageing",
+				"label": wn._("Stock Ageing")
+			},
+		]
+	},
+	{
+		title: wn._("Analytics"),
+		right: true,
+		icon: "icon-bar-chart",
+		items: [
+			{
+				"label":wn._("Stock Analytics"),
+				page: "stock-analytics"
+			},
+		]
+	},
+	{
+		title: wn._("Reports"),
+		right: true,
+		icon: "icon-list",
+		items: [
+			{
+				"label":wn._("Stock Ledger"),
+				route: "Report2/Stock Ledger Entry/Stock Ledger",
+				doctype: "Stock Ledger Entry"
+			},
+			{
+				"label":wn._("Ordered Items To Be Delivered"),
+				route: "query-report/Ordered Items To Be Delivered",
+				doctype: "Delivery Note"
+			},
+			{
+				"label":wn._("Serial No Service Contract Expiry"),
+				route: "Report2/Serial No/Serial No Service Contract Expiry",
+				doctype: "Serial No"
+			},
+			{
+				"label":wn._("Serial No Status"),
+				route: "Report2/Serial No/Serial No Status",
+				doctype: "Serial No"
+			},
+			{
+				"label":wn._("Serial No Warranty Expiry"),
+				route: "Report2/Serial No/Serial No Warranty Expiry",
+				doctype: "Serial No"
+			},
+			{
+				"label":wn._("Item-Wise Price List"),
+				route: "query-report/Item-Wise Price List",
+				doctype: "Item"
+			},
+		]
+	}
+]
 
 pscript['onload_stock-home'] = function(wrapper) {
-	wrapper.appframe = new wn.ui.AppFrame($(wrapper).find('.appframe-area'), 'Stock');
-	erpnext.module_page.setup_page('Stock', wrapper);
+	wn.views.moduleview.make(wrapper, "Stock");
 }
\ No newline at end of file
diff --git a/stock/page/stock_level/stock_level.txt b/stock/page/stock_level/stock_level.txt
index 6bf5c41..4b56713 100644
--- a/stock/page/stock_level/stock_level.txt
+++ b/stock/page/stock_level/stock_level.txt
@@ -2,9 +2,9 @@
  {
   "owner": "Administrator", 
   "docstatus": 0, 
-  "creation": "2012-12-28 11:02:23", 
+  "creation": "2012-12-31 10:52:14", 
   "modified_by": "Administrator", 
-  "modified": "2012-12-28 11:02:23"
+  "modified": "2013-01-09 17:16:57"
  }, 
  {
   "name": "__common__", 
@@ -15,7 +15,22 @@
   "page_name": "stock-level"
  }, 
  {
+  "name": "__common__", 
+  "parent": "stock-level", 
+  "doctype": "Page Role", 
+  "parenttype": "Page", 
+  "parentfield": "roles"
+ }, 
+ {
   "name": "stock-level", 
   "doctype": "Page"
+ }, 
+ {
+  "role": "Material Manager", 
+  "doctype": "Page Role"
+ }, 
+ {
+  "role": "Analytics", 
+  "doctype": "Page Role"
  }
 ]
\ No newline at end of file
diff --git a/support/page/support_home/support_home.html b/support/page/support_home/support_home.html
deleted file mode 100644
index 59eff10..0000000
--- a/support/page/support_home/support_home.html
+++ /dev/null
@@ -1,58 +0,0 @@
-<div class="layout-wrapper layout-wrapper-background">
-	<div class="appframe-area"></div>
-	<div class="layout-main-section">
-		<div style="width: 48%; float: left;">
-			<h5><a href="#List/Support Ticket">Support Ticket</a></h5>
-			<p class="help">Support queries from customers via email or website</p>
-			<br>
-			<h5><a href="#List/Customer Issue">Customer Issue</a></h5>
-			<p class="help">Customer Issue against a Serial No (warranty)</p>
-			<br>
-			<h5><a href="#List/Maintenance Schedule">Maintenance Schedule</a></h5>
-			<p class="help">Plan for scheduled maintenance contracts</p>
-			<br>
-			<h5><a href="#List/Maintenance Visit">Maintenance Visit</a></h5>
-			<p class="help">Visit report for maintenance visit</p>
-			<br>
-			<h5><a href="#List/Newsletter">Newsletter</a></h5>
-			<p class="help">Send Newsletters to your contacts</p>
-			<br>
-			<h5><a href="#List/Communication">Communication</a></h5>
-			<p class="help">Communication Log</p>
-		</div>
-		<div style="width: 48%; float: right;">
-			<h5><a href="#List/Serial No">Serial No</a></h5>
-			<p class="help">Single unit of an Item</p>
-		</div>
-		<div style="clear: both"></div>
-		<hr>
-		<div style="width: 48%; float: left;">
-			<h5><a href="#support-analytics" data-role="Analytics, Support Manager">
-					Support Analytics</a>
-			</h5>
-			<p class="help">Support Ticket trends and response.</p>
-		</div>
-		<div style="width: 48%; float: right;">
-		</div>
-		<div style="clear: both;"></div>
-		<hr>
-		<h4>Reports</h4>
-		<div class="reports-list"></div>
-	</div>
-	<div class="layout-side-section">
-		<div class="psidebar">
-			<div class="section">
-				<div class="section-head">Tools</div>
-				<div class="section-body">
-					<div class="section-item">
-						<a class="section-link" 
-							title = "Pull support issue from support email account"
-							href="#Form/Email Settings/Email Settings">Email Settings</a>
-					</div>
-				</div>
-			</div>
-		</div>
-
-	</div>
-	<div style="clear: both;"></div>
-</div>
\ No newline at end of file
diff --git a/support/page/support_home/support_home.js b/support/page/support_home/support_home.js
index 99b109f..d397daa 100644
--- a/support/page/support_home/support_home.js
+++ b/support/page/support_home/support_home.js
@@ -1,20 +1,79 @@
-// 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/>.
+// ERPNext: Copyright 2013 Web Notes Technologies Pvt Ltd
+// GNU General Public License. See "license.txt"
+
+wn.module_page["Support"] = [
+	{
+		title: wn._("Documents"),
+		icon: "icon-copy",
+		items: [
+			{
+				label: wn._("Support Ticket"),
+				description: wn._("Support queries from customers via email or website."),
+				doctype:"Support Ticket"
+			},
+			{
+				label: wn._("Customer Issue"),
+				description: wn._("Customer Issue against a Serial No (warranty)."),
+				doctype:"Customer Issue"
+			},
+			{
+				label: wn._("Maintenance Schedule"),
+				description: wn._("Plan for scheduled maintenance contracts."),
+				doctype:"Maintenance Schedule"
+			},
+			{
+				label: wn._("Maintenance Visit"),
+				description: wn._("Visit report for maintenance call."),
+				doctype:"Maintenance Visit"
+			},
+			{
+				label: wn._("Newsletter"),
+				description: wn._("Send Newsletters to your contacts, leads."),
+				doctype:"Newsletter"
+			},
+			{
+				label: wn._("Communication"),
+				description: wn._("Communication log."),
+				doctype:"Communication"
+			},
+		]
+	},
+	{
+		title: wn._("Masters"),
+		icon: "icon-book",
+		items: [
+			{
+				label: wn._("Serial No"),
+				description: wn._("Single unit of an Item."),
+				doctype:"Serial No"
+			},
+		]
+	},
+	{
+		title: wn._("Setup"),
+		icon: "icon-cog",
+		items: [
+			{
+				"route":"Form/Email Settings/Email Settings",
+				"label":wn._("Email Settings"),
+				"description":wn._("Setup to pull emails from support email account"),
+				doctype: "Email Settings"
+			},
+		]
+	},
+	{
+		title: wn._("Analytics"),
+		right: true,
+		icon: "icon-bar-chart",
+		items: [
+			{
+				"label":wn._("Support Analytics"),
+				page: "support-analytics"
+			},
+		]
+	},
+]
 
 pscript['onload_support-home'] = function(wrapper) {
-	wrapper.appframe = new wn.ui.AppFrame($(wrapper).find('.appframe-area'), 'Support');
-	erpnext.module_page.setup_page('Support', wrapper);
-}
\ No newline at end of file
+	wn.views.moduleview.make(wrapper, "Support");
+}
diff --git a/website/doctype/style_settings/style_settings.txt b/website/doctype/style_settings/style_settings.txt
index cd9d256..a3e81eb 100644
--- a/website/doctype/style_settings/style_settings.txt
+++ b/website/doctype/style_settings/style_settings.txt
@@ -2,23 +2,18 @@
  {
   "owner": "Administrator", 
   "docstatus": 0, 
-  "creation": "2012-04-02 16:02:43", 
+  "creation": "2012-07-03 13:30:57", 
   "modified_by": "Administrator", 
-  "modified": "2012-05-01 15:58:16"
+  "modified": "2013-01-08 12:00:51"
  }, 
  {
-  "section_style": "Simple", 
-  "allow_attach": 1, 
-  "module": "Website", 
-  "doctype": "DocType", 
-  "description": "Set your background color, font and image (tiled)", 
   "issingle": 1, 
+  "allow_attach": 1, 
   "name": "__common__", 
-  "colour": "White:FFF", 
-  "_last_update": "1330594969", 
-  "show_in_menu": 0, 
+  "doctype": "DocType", 
+  "module": "Website", 
   "max_attachments": 1, 
-  "version": 1
+  "description": "Set your background color, font and image (tiled)"
  }, 
  {
   "name": "__common__", 
@@ -41,28 +36,16 @@
   "doctype": "DocType"
  }, 
  {
-  "write": 1, 
-  "create": 1, 
-  "permlevel": 0, 
-  "doctype": "DocPerm"
- }, 
- {
-  "permlevel": 1, 
-  "doctype": "DocPerm"
- }, 
- {
   "description": "If image is selected, color will be ignored (attach first)", 
-  "colour": "White:FFF", 
   "doctype": "DocField", 
   "label": "Background Image", 
-  "permlevel": 0, 
+  "options": "attach_files:", 
   "fieldname": "background_image", 
   "fieldtype": "Select", 
-  "options": "attach_files:"
+  "permlevel": 0
  }, 
  {
   "description": "Solid background color (default light gray)", 
-  "colour": "White:FFF", 
   "doctype": "DocField", 
   "label": "Background Color", 
   "fieldname": "background_color", 
@@ -70,33 +53,35 @@
   "permlevel": 0
  }, 
  {
-  "width": "50%", 
+  "print_width": "50%", 
   "doctype": "DocField", 
+  "width": "50%", 
+  "fieldname": "cb0", 
   "fieldtype": "Column Break", 
   "permlevel": 0
  }, 
  {
   "doctype": "DocField", 
-  "options": "\nHelvetica Neue\nLucida Grande\nVerdana\nArial\nGeorgia\nTahoma\nLato\nOpen Sans", 
+  "label": "Font", 
+  "options": "\nHelvetica Neue\nLucida Grande\nVerdana\nArial\nGeorgia\nTahoma", 
   "fieldname": "font", 
   "fieldtype": "Select", 
-  "label": "Font", 
   "permlevel": 0
  }, 
  {
   "doctype": "DocField", 
+  "label": "Font Size", 
   "options": "\n12px\n13px\n14px\n15px\n16px", 
   "fieldname": "font_size", 
   "fieldtype": "Select", 
-  "label": "Font Size", 
   "permlevel": 0
  }, 
  {
   "doctype": "DocField", 
+  "label": "Heading Font", 
   "options": "\nHelvetica Neue\nLucida Grande\nVerdana\nArial\nGeorgia\nTahoma\nLato\nOpen Sans", 
   "fieldname": "heading_font", 
   "fieldtype": "Select", 
-  "label": "Heading Font", 
   "permlevel": 0
  }, 
  {
@@ -108,7 +93,6 @@
  }, 
  {
   "description": "add your own CSS (careful!)", 
-  "colour": "White:FFF", 
   "doctype": "DocField", 
   "label": "Add CSS", 
   "fieldname": "add_css", 
@@ -117,7 +101,6 @@
  }, 
  {
   "description": "Auto generated", 
-  "colour": "White:FFF", 
   "doctype": "DocField", 
   "label": "Custom CSS", 
   "fieldname": "custom_css", 
@@ -133,5 +116,19 @@
   "fieldtype": "Text", 
   "hidden": 1, 
   "permlevel": 0
+ }, 
+ {
+  "create": 1, 
+  "doctype": "DocPerm", 
+  "write": 1, 
+  "permlevel": 0
+ }, 
+ {
+  "amend": 0, 
+  "create": 0, 
+  "doctype": "DocPerm", 
+  "submit": 0, 
+  "cancel": 0, 
+  "permlevel": 1
  }
 ]
\ No newline at end of file
diff --git a/website/page/website_home/website_home.html b/website/page/website_home/website_home.html
deleted file mode 100644
index 0fde113..0000000
--- a/website/page/website_home/website_home.html
+++ /dev/null
@@ -1,47 +0,0 @@
-<div class="layout-wrapper layout-wrapper-background">
-	<div class="appframe-area"></div>
-	<div class="layout-main-section">
-		<div style="width: 48%; float: left;">
-			<h5><a href="#List/Web Page">Web Page</a></h5>
-			<p class="help">Static (content) web page.</p>
-			<br>
-			<h5><a href="#List/Blog">Blog</a></h5>
-			<p class="help">Weblog (blog) entry.</p>
-			<br>
-			<h5><a href="#List/Website Slideshow">Website Slideshow</a></h5>
-			<p class="help">Slideshows for adding in website pages.</p>
-		</div>
-		<div style="width: 48%; float: right;">
-			<h5><a href="#Form/Website Settings">Website Settings</a></h5>
-			<p class="help">Setup of top navigation bar, footer and logo.</p>
-			<br>
-			<h5><a href="#Form/Style Settings">Style Settings</a></h5>
-			<p class="help">Setup of fonts and background.</p>
-			<br>
-			<h5><a href="#Form/Product Settings">Product Settings</a></h5>
-			<p class="help">Settings for Product Catalog on the website.</p>
-			<br>
-			<h5><a href="#Form/About Us Settings">About Us Settings</a></h5>
-			<p class="help">Settings for About Us Page.</p>
-			<br>
-			<h5><a href="#Form/Contact Us Settings">Contact Us Settings</a></h5>
-			<p class="help">Settings for the Contact Us Page.</p>
-		</div>
-		<div style="clear: both"></div>
-	</div>
-	<div class="layout-side-section">
-		<div class="psidebar">
-			<div class="section">
-				<div class="section-head">Advanced</div>
-				<div class="section-body">
-					<div class="section-item">
-						<a class="section-link" 
-							title = "Javascript to append to the head section of the page."
-							href="#Form/Website Script">Website Script</a>
-					</div>
-				</div>
-			</div>
-		</div>
-	</div>
-	<div style="clear: both;"></div>
-</div>
\ No newline at end of file
diff --git a/website/page/website_home/website_home.js b/website/page/website_home/website_home.js
index 15391ec..c6b2253 100644
--- a/website/page/website_home/website_home.js
+++ b/website/page/website_home/website_home.js
@@ -1,20 +1,85 @@
-// 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/>.
+// ERPNext: Copyright 2013 Web Notes Technologies Pvt Ltd
+// GNU General Public License. See "license.txt"
+
+wn.module_page["Website"] = [
+	{
+		title: wn._("Web Content"),
+		icon: "icon-copy",
+		items: [
+			{
+				label: wn._("Web Page"),
+				description: wn._("Content web page."),
+				doctype:"Web Page"
+			},
+			{
+				label: wn._("Blog"),
+				description: wn._("Blog entry."),
+				doctype:"Blog"
+			},
+			{
+				label: wn._("Website Slideshow"),
+				description: wn._("Embed image slideshows in website pages."),
+				doctype:"Website Slideshow"
+			},
+		]
+	},
+	{
+		title: wn._("Website Overall Settings"),
+		icon: "icon-wrench",
+		right: true,
+		items: [
+			{
+				"route":"Form/Website Settings",
+				"label":wn._("Website Settings"),
+				"description":wn._("Setup of top navigation bar, footer and logo."),
+				doctype:"Website Settings"
+			},
+			{
+				"route":"Form/Style Settings",
+				"label":wn._("Style Settings"),
+				"description":wn._("Setup of fonts and background."),
+				doctype:"Style Settings"
+			},
+		]
+	},
+	{
+		title: wn._("Special Page Settings"),
+		icon: "icon-wrench",
+		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."),
+				doctype:"About Us Settings"
+			},
+			{
+				"route":"Form/Contact Us Settings",
+				"label":wn._("Contact Us Settings"),
+				"description":wn._("Settings for Contact Us Page."),
+				doctype:"Contact Us Settings"
+			},
+		]
+	},
+	{
+		title: wn._("Advanced Scripting"),
+		icon: "icon-wrench",
+		items: [
+			{
+				"route":"Form/Website Script",
+				"label":wn._("Website Script"),
+				"description":wn._("Javascript to append to the head section of the page."),
+				doctype:"Website Script"
+			},
+		]
+	}
+]
 
 pscript['onload_website-home'] = function(wrapper) {
-	wrapper.appframe = new wn.ui.AppFrame($(wrapper).find('.appframe-area'), 'Website');
-	erpnext.module_page.setup_page('Website', wrapper);
+	wn.views.moduleview.make(wrapper, "Website");
 }
\ No newline at end of file