Merge pull request #5534 from KanchanChauhan/itemprice-update-in-pricelist

Item Price update in Price List
diff --git a/.travis.yml b/.travis.yml
index eac53fd..287fe2d 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -25,7 +25,6 @@
   - bench use test_site
   - bench reinstall
   - bench build
-  - bench build-website
   - bench start &
   - sleep 10
   - bench --verbose run-tests --driver Firefox
diff --git a/erpnext/accounts/doctype/account/account.js b/erpnext/accounts/doctype/account/account.js
index 703397e..b2eef20 100644
--- a/erpnext/accounts/doctype/account/account.js
+++ b/erpnext/accounts/doctype/account/account.js
@@ -1,7 +1,6 @@
 // Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors
 // License: GNU General Public License v3. See license.txt
 
-cur_frm.list_route = "Accounts Browser/Account";
 
 cur_frm.cscript.refresh = function(doc, cdt, cdn) {
 	if(doc.__islocal) {
@@ -48,7 +47,7 @@
 
 cur_frm.cscript.add_toolbar_buttons = function(doc) {
 	cur_frm.add_custom_button(__('Chart of Accounts'),
-		function() { frappe.set_route("Accounts Browser", "Account"); }, __("View"))
+		function() { frappe.set_route("Tree", "Account"); }, __("View"))
 
 	if (doc.is_group == 1) {
 		cur_frm.add_custom_button(__('Group to Non-Group'),
diff --git a/erpnext/accounts/doctype/account/account.py b/erpnext/accounts/doctype/account/account.py
index 718ba31..83517ce 100644
--- a/erpnext/accounts/doctype/account/account.py
+++ b/erpnext/accounts/doctype/account/account.py
@@ -169,8 +169,8 @@
 			if not self.warehouse:
 				throw(_("Warehouse is mandatory if account type is Warehouse"))
 
-			old_warehouse = cstr(frappe.db.get_value("Account", self.name, "warehouse"))
-			if old_warehouse != cstr(self.warehouse):
+			old_warehouse = frappe.db.get_value("Account", self.name, "warehouse")
+			if old_warehouse != self.warehouse:
 				if old_warehouse:
 					self.validate_warehouse(old_warehouse)
 				if self.warehouse:
@@ -179,8 +179,12 @@
 			self.warehouse = None
 
 	def validate_warehouse(self, warehouse):
-		if frappe.db.get_value("Stock Ledger Entry", {"warehouse": warehouse}):
-			throw(_("Stock entries exist against warehouse {0}, hence you cannot re-assign or modify Warehouse").format(warehouse))
+		lft, rgt = frappe.db.get_value("Warehouse", warehouse, ["lft", "rgt"])
+
+		if lft and rgt:
+			if frappe.db.sql_list("""select sle.name from `tabStock Ledger Entry` sle where exists (select wh.name from
+				tabWarehouse wh where lft >= %s and rgt <= %s and sle.warehouse = wh.name)""", (lft, rgt)):
+				throw(_("Stock entries exist against Warehouse {0}, hence you cannot re-assign or modify it").format(warehouse))
 
 	def update_nsm_model(self):
 		"""update lft, rgt indices for nested set model"""
diff --git a/erpnext/accounts/doctype/account/account_tree.js b/erpnext/accounts/doctype/account/account_tree.js
new file mode 100644
index 0000000..3252788
--- /dev/null
+++ b/erpnext/accounts/doctype/account/account_tree.js
@@ -0,0 +1,52 @@
+frappe.treeview_settings["Account"] = {
+	breadcrumbs: "Accounts",
+	title: __("Chart Of Accounts"),
+	get_tree_root: false,
+	filters: [{
+		fieldname: "company",
+		fieldtype:"Select",
+		options: $.map(locals[':Company'], function(c) { return c.name; }).sort(),
+		label: __("Company"),
+		default: frappe.defaults.get_default('company') ? frappe.defaults.get_default('company'): ""
+	}],
+	root_label: "Accounts",
+	get_tree_nodes: 'erpnext.accounts.utils.get_children',
+	add_tree_node: 'erpnext.accounts.utils.add_ac',
+	menu_items:[
+		{
+			label: __('New Company'),
+			action: function() { newdoc('Company'); },
+			condition: 'frappe.boot.user.can_create.indexOf("Company") === -1'
+		}
+	],
+	fields: [
+		{fieldtype:'Data', fieldname:'account_name', label:__('New Account Name'), reqd:true,
+			description: __("Name of new Account. Note: Please don't create accounts for Customers and Suppliers")},
+		{fieldtype:'Check', fieldname:'is_group', label:__('Is Group'),
+			description: __('Further accounts can be made under Groups, but entries can be made against non-Groups')},
+		{fieldtype:'Select', fieldname:'root_type', label:__('Root Type'),
+			options: ['Asset', 'Liability', 'Equity', 'Income', 'Expense'].join('\n')},
+		{fieldtype:'Select', fieldname:'account_type', label:__('Account Type'),
+			options: ['', 'Bank', 'Cash', 'Warehouse', 'Tax', 'Chargeable'].join('\n'),
+			description: __("Optional. This setting will be used to filter in various transactions."),
+			depends_on: 'eval:doc.is_group==1'},
+		{fieldtype:'Float', fieldname:'tax_rate', label:__('Tax Rate'),
+			depends_on: 'eval:doc.is_group==1&&doc.account_type=="Tax"'},
+		{fieldtype:'Link', fieldname:'warehouse', label:__('Warehouse'), options:"Warehouse",
+			depends_on: 'eval:(doc.is_group==1&&doc.account_type=="Warehouse")'},
+		{fieldtype:'Link', fieldname:'account_currency', label:__('Currency'), options:"Currency",
+			description: __("Optional. Sets company's default currency, if not specified.")}
+	],
+	onrender: function(node) {
+		var dr_or_cr = node.data.balance < 0 ? "Cr" : "Dr";
+		if (node.data && node.data.balance!==undefined) {
+			$('<span class="balance-area pull-right text-muted small">'
+				+ (node.data.balance_in_account_currency ?
+					(format_currency(Math.abs(node.data.balance_in_account_currency),
+						node.data.account_currency) + " / ") : "")
+				+ format_currency(Math.abs(node.data.balance), node.data.company_currency)
+				+ " " + dr_or_cr
+				+ '</span>').insertBefore(node.$ul);
+		}
+	}
+}
\ No newline at end of file
diff --git a/erpnext/accounts/doctype/cheque_print_template/cheque_print_template.js b/erpnext/accounts/doctype/cheque_print_template/cheque_print_template.js
index dea3af6..6a430eb 100644
--- a/erpnext/accounts/doctype/cheque_print_template/cheque_print_template.js
+++ b/erpnext/accounts/doctype/cheque_print_template/cheque_print_template.js
@@ -17,7 +17,6 @@
 			var template = '<div style="position: relative; overflow-x: scroll;">\
 				<div id="cheque_preview" style="width: {{ cheque_width }}cm; \
 					height: {{ cheque_height }}cm;\
-					background-image: url({{ scanned_cheque }});\
 					background-repeat: no-repeat;\
 					background-size: cover;">\
 					<span style="top: {{ acc_pay_dist_from_top_edge }}cm;\
@@ -50,6 +49,10 @@
 			</div>';
 			
 			$(frappe.render(template, frm.doc)).appendTo(frm.fields_dict.cheque_print_preview.wrapper)
+			
+			if (frm.doc.scanned_cheque) {
+				$(frm.fields_dict.cheque_print_preview.wrapper).find("#cheque_preview").css('background-image', 'url(' + frm.doc.scanned_cheque + ')');
+			}
 		}
 	}
 });
diff --git a/erpnext/accounts/doctype/cheque_print_template/cheque_print_template.json b/erpnext/accounts/doctype/cheque_print_template/cheque_print_template.json
index 9cec920..51da9c0 100644
--- a/erpnext/accounts/doctype/cheque_print_template/cheque_print_template.json
+++ b/erpnext/accounts/doctype/cheque_print_template/cheque_print_template.json
@@ -116,6 +116,7 @@
    "allow_on_submit": 0, 
    "bold": 0, 
    "collapsible": 0, 
+   "default": "Regular", 
    "fieldname": "cheque_size", 
    "fieldtype": "Select", 
    "hidden": 0, 
@@ -168,6 +169,7 @@
    "allow_on_submit": 0, 
    "bold": 0, 
    "collapsible": 0, 
+   "default": "20.00", 
    "fieldname": "cheque_width", 
    "fieldtype": "Float", 
    "hidden": 0, 
@@ -193,6 +195,7 @@
    "allow_on_submit": 0, 
    "bold": 0, 
    "collapsible": 0, 
+   "default": "9.00", 
    "fieldname": "cheque_height", 
    "fieldtype": "Float", 
    "hidden": 0, 
@@ -218,6 +221,7 @@
    "allow_on_submit": 0, 
    "bold": 0, 
    "collapsible": 0, 
+   "default": "", 
    "fieldname": "scanned_cheque", 
    "fieldtype": "Attach", 
    "hidden": 0, 
@@ -267,6 +271,7 @@
    "allow_on_submit": 0, 
    "bold": 0, 
    "collapsible": 0, 
+   "default": "1", 
    "fieldname": "is_account_payable", 
    "fieldtype": "Check", 
    "hidden": 0, 
@@ -292,6 +297,7 @@
    "allow_on_submit": 0, 
    "bold": 0, 
    "collapsible": 0, 
+   "default": "1.00", 
    "depends_on": "eval:doc.is_account_payable", 
    "fieldname": "acc_pay_dist_from_top_edge", 
    "fieldtype": "Float", 
@@ -318,6 +324,7 @@
    "allow_on_submit": 0, 
    "bold": 0, 
    "collapsible": 0, 
+   "default": "9.00", 
    "depends_on": "eval:doc.is_account_payable", 
    "fieldname": "acc_pay_dist_from_left_edge", 
    "fieldtype": "Float", 
@@ -344,6 +351,7 @@
    "allow_on_submit": 0, 
    "bold": 0, 
    "collapsible": 0, 
+   "default": "Acc. Payee", 
    "depends_on": "eval:doc.is_account_payable", 
    "fieldname": "message_to_show", 
    "fieldtype": "Data", 
@@ -421,6 +429,7 @@
    "allow_on_submit": 0, 
    "bold": 0, 
    "collapsible": 0, 
+   "default": "1.00", 
    "fieldname": "date_dist_from_top_edge", 
    "fieldtype": "Float", 
    "hidden": 0, 
@@ -446,6 +455,7 @@
    "allow_on_submit": 0, 
    "bold": 0, 
    "collapsible": 0, 
+   "default": "15.00", 
    "depends_on": "", 
    "fieldname": "date_dist_from_left_edge", 
    "fieldtype": "Float", 
@@ -497,6 +507,7 @@
    "allow_on_submit": 0, 
    "bold": 0, 
    "collapsible": 0, 
+   "default": "2.00", 
    "fieldname": "payer_name_from_top_edge", 
    "fieldtype": "Float", 
    "hidden": 0, 
@@ -522,6 +533,7 @@
    "allow_on_submit": 0, 
    "bold": 0, 
    "collapsible": 0, 
+   "default": "3.00", 
    "fieldname": "payer_name_from_left_edge", 
    "fieldtype": "Float", 
    "hidden": 0, 
@@ -597,6 +609,7 @@
    "allow_on_submit": 0, 
    "bold": 0, 
    "collapsible": 0, 
+   "default": "3.00", 
    "fieldname": "amt_in_words_from_top_edge", 
    "fieldtype": "Float", 
    "hidden": 0, 
@@ -622,6 +635,7 @@
    "allow_on_submit": 0, 
    "bold": 0, 
    "collapsible": 0, 
+   "default": "4.00", 
    "fieldname": "amt_in_words_from_left_edge", 
    "fieldtype": "Float", 
    "hidden": 0, 
@@ -647,6 +661,7 @@
    "allow_on_submit": 0, 
    "bold": 0, 
    "collapsible": 0, 
+   "default": "15.00", 
    "fieldname": "amt_in_word_width", 
    "fieldtype": "Float", 
    "hidden": 0, 
@@ -672,6 +687,7 @@
    "allow_on_submit": 0, 
    "bold": 0, 
    "collapsible": 0, 
+   "default": "0.50", 
    "fieldname": "amt_in_words_line_spacing", 
    "fieldtype": "Float", 
    "hidden": 0, 
@@ -722,6 +738,7 @@
    "allow_on_submit": 0, 
    "bold": 0, 
    "collapsible": 0, 
+   "default": "3.50", 
    "fieldname": "amt_in_figures_from_top_edge", 
    "fieldtype": "Float", 
    "hidden": 0, 
@@ -747,6 +764,7 @@
    "allow_on_submit": 0, 
    "bold": 0, 
    "collapsible": 0, 
+   "default": "16.00", 
    "fieldname": "amt_in_figures_from_left_edge", 
    "fieldtype": "Float", 
    "hidden": 0, 
@@ -822,6 +840,7 @@
    "allow_on_submit": 0, 
    "bold": 0, 
    "collapsible": 0, 
+   "default": "5.00", 
    "fieldname": "acc_no_dist_from_top_edge", 
    "fieldtype": "Float", 
    "hidden": 0, 
@@ -847,6 +866,7 @@
    "allow_on_submit": 0, 
    "bold": 0, 
    "collapsible": 0, 
+   "default": "4.00", 
    "fieldname": "acc_no_dist_from_left_edge", 
    "fieldtype": "Float", 
    "hidden": 0, 
@@ -897,6 +917,7 @@
    "allow_on_submit": 0, 
    "bold": 0, 
    "collapsible": 0, 
+   "default": "6.00", 
    "fieldname": "signatory_from_top_edge", 
    "fieldtype": "Float", 
    "hidden": 0, 
@@ -922,6 +943,7 @@
    "allow_on_submit": 0, 
    "bold": 0, 
    "collapsible": 0, 
+   "default": "15.00", 
    "fieldname": "signatory_from_left_edge", 
    "fieldtype": "Float", 
    "hidden": 0, 
@@ -996,13 +1018,14 @@
  "hide_heading": 0, 
  "hide_toolbar": 0, 
  "idx": 0, 
+ "image_view": 0, 
  "in_create": 0, 
  "in_dialog": 0, 
  "is_submittable": 0, 
  "issingle": 0, 
  "istable": 0, 
  "max_attachments": 1, 
- "modified": "2016-05-19 13:30:26.754096", 
+ "modified": "2016-06-23 20:19:11.694932", 
  "modified_by": "Administrator", 
  "module": "Accounts", 
  "name": "Cheque Print Template", 
diff --git a/erpnext/accounts/doctype/cost_center/cost_center.js b/erpnext/accounts/doctype/cost_center/cost_center.js
index 85a6052..dea87f3 100644
--- a/erpnext/accounts/doctype/cost_center/cost_center.js
+++ b/erpnext/accounts/doctype/cost_center/cost_center.js
@@ -3,7 +3,6 @@
 
 frappe.provide("erpnext.accounts");
 
-cur_frm.list_route = "Accounts Browser/Cost Center";
 
 
 frappe.ui.form.on('Cost Center', {
@@ -34,7 +33,7 @@
 	cur_frm.set_intro(intro_txt);
 
 	cur_frm.add_custom_button(__('Chart of Cost Centers'),
-		function() { frappe.set_route("Accounts Browser", "Cost Center"); }, __("View"))
+		function() { frappe.set_route("Tree", "Cost Center"); }, __("View"))
 }
 
 cur_frm.cscript.parent_cost_center = function(doc, cdt, cdn) {
diff --git a/erpnext/accounts/doctype/cost_center/cost_center_tree.js b/erpnext/accounts/doctype/cost_center/cost_center_tree.js
new file mode 100644
index 0000000..ac82f23
--- /dev/null
+++ b/erpnext/accounts/doctype/cost_center/cost_center_tree.js
@@ -0,0 +1,26 @@
+frappe.treeview_settings["Cost Center"] = {
+	breadcrumbs: "Accounts",
+	get_tree_root: false,
+	filters: [{
+		fieldname: "company",
+		fieldtype:"Select",
+		options: $.map(locals[':Company'], function(c) { return c.name; }).sort(),
+		label: __("Company"),
+		default: frappe.defaults.get_default('company') ? frappe.defaults.get_default('company'): ""
+	}],
+	root_label: "Cost Centers",
+	get_tree_nodes: 'erpnext.accounts.utils.get_children',
+	add_tree_node: 'erpnext.accounts.utils.add_cc',
+	menu_items:[
+		{
+			label: __('New Company'),
+			action: function() { newdoc('Company'); },
+			condition: 'frappe.boot.user.can_create.indexOf("Company") === -1'
+		}
+	],
+	fields:[
+		{fieldtype:'Data', fieldname:'cost_center_name', label:__('New Cost Center Name'), reqd:true},
+		{fieldtype:'Check', fieldname:'is_group', label:__('Is Group'),
+			description:__('Further cost centers can be made under Groups but entries can be made against non-Groups')}
+	]
+}
\ No newline at end of file
diff --git a/erpnext/accounts/page/accounts_browser/README.md b/erpnext/accounts/page/accounts_browser/README.md
deleted file mode 100644
index b879561..0000000
--- a/erpnext/accounts/page/accounts_browser/README.md
+++ /dev/null
@@ -1 +0,0 @@
-Tree view browser for Chart of Accounts and Chart of Cost Centers
\ No newline at end of file
diff --git a/erpnext/accounts/page/accounts_browser/__init__.py b/erpnext/accounts/page/accounts_browser/__init__.py
deleted file mode 100644
index baffc48..0000000
--- a/erpnext/accounts/page/accounts_browser/__init__.py
+++ /dev/null
@@ -1 +0,0 @@
-from __future__ import unicode_literals
diff --git a/erpnext/accounts/page/accounts_browser/accounts_browser.js b/erpnext/accounts/page/accounts_browser/accounts_browser.js
deleted file mode 100644
index ec906f8..0000000
--- a/erpnext/accounts/page/accounts_browser/accounts_browser.js
+++ /dev/null
@@ -1,334 +0,0 @@
-// Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors
-// License: GNU General Public License v3. See license.txt
-
-// tree of chart of accounts / cost centers
-// multiple companies
-// add node
-// edit node
-// see ledger
-
-frappe.pages["Accounts Browser"].on_page_load  = function(wrapper){
-	frappe.ui.make_app_page({
-		parent: wrapper,
-		single_column: true
-	})
-
-	frappe.breadcrumbs.add("Accounts");
-
-	var main = wrapper.page.main,
-		chart_area = $("<div>")
-			.css({"margin-bottom": "15px", "min-height": "200px"})
-			.appendTo(main),
-		help_area = $('<hr><div style="padding: 0px 15px;">'+
-		'<h4>'+__('Quick Help')+'</h4>'+
-		'<ol>'+
-			'<li>'+__('To add child nodes, explore tree and click on the node under which you want to add more nodes.')+'</li>'+
-			'<li>'+
-			      __('Accounting Entries can be made against leaf nodes. Entries against Groups are not allowed.')+
-		    '</li>'+
-			'<li>'+__('Please do NOT create Accounts for Customers and Suppliers. They are created directly from the Customer / Supplier masters.')+'</li>'+
-			'<li>'+
-			     '<b>'+__('To create a Bank Account')+'</b>: '+
-			      __('Go to the appropriate group (usually Application of Funds > Current Assets > Bank Accounts and create a new Account (by clicking on Add Child) of type "Bank"')+
-			'</li>'+
-			'<li>'+
-			      '<b>'+__('To create a Tax Account') +'</b>: '+
-			      __('Go to the appropriate group (usually Source of Funds > Current Liabilities > Taxes and Duties and create a new Account (by clicking on Add Child) of type "Tax" and do mention the Tax rate.')+
-			'</li>'+
-		'</ol>'+
-		'<p>'+__('Please setup your chart of accounts before you start Accounting Entries')+'</p></div>').appendTo(main);
-
-	if (frappe.boot.user.can_create.indexOf("Company") !== -1) {
-		wrapper.page.add_menu_item(__('New Company'), function() { newdoc('Company'); }, true);
-	}
-
-	wrapper.page.add_menu_item(__('Refresh'), function() {
-			wrapper.$company_select.change();
-		});
-
-	wrapper.page.set_primary_action(__('New'), function() {
-		erpnext.account_chart && erpnext.account_chart.make_new();
-	}, "octicon octicon-plus");
-
-	var company_list = $.map(locals[':Company'], function(c) { return c.name; }).sort();
-
-	// company-select
-	wrapper.$company_select = wrapper.page.add_select("Company", company_list)
-		.change(function() {
-			var ctype = frappe.get_route()[1] || 'Account';
-			erpnext.account_chart = new erpnext.AccountsChart(ctype, $(this).val(),
-				chart_area.get(0), wrapper.page);
-		})
-
-	if(frappe.defaults.get_default('company')) {
-		wrapper.$company_select.val(frappe.defaults.get_default('company'));
-	}
-	wrapper.$company_select.change();
-}
-
-frappe.pages["Accounts Browser"].on_page_show = function(wrapper){
-	// set route
-	var ctype = frappe.get_route()[1] || 'Account';
-
-	if(frappe.route_options) {
-		if(frappe.route_options.company) {
-			wrapper.$company_select.val(frappe.route_options.company).change();
-		}
-		frappe.route_options = null;
-	} else if(erpnext.account_chart && erpnext.account_chart.ctype != ctype) {
-		wrapper.$company_select.change();
-	}
-
-}
-
-erpnext.AccountsChart = Class.extend({
-	init: function(ctype, company, wrapper, page) {
-		$(wrapper).empty();
-		var me = this;
-		me.ctype = ctype;
-		me.can_create = frappe.model.can_create(this.ctype);
-		me.can_delete = frappe.model.can_delete(this.ctype);
-		me.can_write = frappe.model.can_write(this.ctype);
-		me.page = page;
-		me.set_title();
-
-		// __("Accounts"), __("Cost Centers")
-
-		me.company = company;
-		this.tree = new frappe.ui.Tree({
-			parent: $(wrapper),
-			label: ctype==="Account" ? "Accounts" : "Cost Centers",
-			args: {ctype: ctype, comp: company},
-			method: 'erpnext.accounts.page.accounts_browser.accounts_browser.get_children',
-			click: function(link) {
-				// bold
-				$('.bold').removeClass('bold'); // deselect
-				$(link).parent().find('.balance-area:first').addClass('bold'); // select
-
-			},
-			toolbar: [
-				{ toggle_btn: true },
-				{
-					label: __("Open"),
-					condition: function(node) { return !node.root },
-					click: function(node, btn) {
-						 frappe.set_route("Form", me.ctype, node.label);
-					}
-				},
-				{
-					condition: function(node) { return node.expandable; },
-					label: __("Add Child"),
-					click: function() {
-						me.make_new()
-					},
-					btnClass: "hidden-xs"
-				},
-				{
-					condition: function(node) {
-						return !node.root && me.ctype === 'Account'
-							&& frappe.boot.user.can_read.indexOf("GL Entry") !== -1
-					},
-					label: __("View Ledger"),
-					click: function(node, btn) {
-						frappe.route_options = {
-							"account": node.label,
-							"from_date": sys_defaults.year_start_date,
-							"to_date": sys_defaults.year_end_date,
-							"company": me.company
-						};
-						frappe.set_route("query-report", "General Ledger");
-					},
-					btnClass: "hidden-xs"
-				},
-				{
-					condition: function(node) { return !node.root && me.can_write },
-					label: __("Rename"),
-					click: function(node) {
-						frappe.model.rename_doc(me.ctype, node.label, function(new_name) {
-							node.reload_parent();
-						});
-					},
-					btnClass: "hidden-xs"
-				},
-				{
-					condition: function(node) { return !node.root && me.can_delete },
-					label: __("Delete"),
-					click: function(node) {
-						frappe.model.delete_doc(me.ctype, node.label, function() {
-							node.parent.remove();
-						});
-					},
-					btnClass: "hidden-xs"
-				}
-			],
-			onrender: function(node) {
-				var dr_or_cr = node.data.balance < 0 ? "Cr" : "Dr";
-				if (me.ctype == 'Account' && node.data && node.data.balance!==undefined) {
-					$('<span class="balance-area pull-right text-muted small">'
-						+ (node.data.balance_in_account_currency ?
-							(format_currency(Math.abs(node.data.balance_in_account_currency),
-								node.data.account_currency) + " / ") : "")
-						+ format_currency(Math.abs(node.data.balance), node.data.company_currency)
-						+ " " + dr_or_cr
-						+ '</span>').insertBefore(node.$ul);
-				}
-			}
-		});
-	},
-	set_title: function(val) {
-		var chart_str = this.ctype=="Account" ? __("Chart of Accounts") : __("Chart of Cost Centers");
-		if(val) {
-			this.page.set_title(chart_str + " - " + cstr(val));
-		} else {
-			this.page.set_title(chart_str);
-		}
-	},
-
-	make_new: function() {
-		if(this.ctype=='Account') {
-			this.new_account();
-		} else {
-			this.new_cost_center();
-		}
-	},
-
-	new_account: function() {
-		var me = this;
-
-		var node = me.tree.get_selected_node();
-
-		if(!(node && node.expandable)) {
-			frappe.msgprint(__("Select a group node first."));
-			return;
-		}
-
-		// the dialog
-		var d = new frappe.ui.Dialog({
-			title:__('New Account'),
-			fields: [
-				{fieldtype:'Data', fieldname:'account_name', label:__('New Account Name'), reqd:true,
-					description: __("Name of new Account. Note: Please don't create accounts for Customers and Suppliers")},
-				{fieldtype:'Check', fieldname:'is_group', label:__('Is Group'),
-					description: __('Further accounts can be made under Groups, but entries can be made against non-Groups')},
-				{fieldtype:'Select', fieldname:'root_type', label:__('Root Type'),
-					options: ['Asset', 'Liability', 'Equity', 'Income', 'Expense'].join('\n'),
-				},
-				{fieldtype:'Select', fieldname:'account_type', label:__('Account Type'),
-					options: ['', 'Bank', 'Cash', 'Warehouse', 'Tax', 'Chargeable'].join('\n'),
-					description: __("Optional. This setting will be used to filter in various transactions.") },
-				{fieldtype:'Float', fieldname:'tax_rate', label:__('Tax Rate')},
-				{fieldtype:'Link', fieldname:'warehouse', label:__('Warehouse'), options:"Warehouse"},
-				{fieldtype:'Link', fieldname:'account_currency', label:__('Currency'), options:"Currency",
-					description: __("Optional. Sets company's default currency, if not specified.")}
-			]
-		})
-
-		var fd = d.fields_dict;
-
-		// account type if ledger
-		$(fd.is_group.input).change(function() {
-			if($(this).prop("checked")) {
-				$(fd.account_type.wrapper).toggle(false);
-				$(fd.tax_rate.wrapper).toggle(false);
-				$(fd.warehouse.wrapper).toggle(false);
-			} else {
-				$(fd.account_type.wrapper).toggle(node.root ? false : true);
-				fd.account_type.$input.trigger("change");
-			}
-		});
-
-		// tax rate if tax
-		$(fd.account_type.input).change(function() {
-			$(fd.tax_rate.wrapper).toggle(fd.account_type.get_value()==='Tax');
-			$(fd.warehouse.wrapper).toggle(fd.account_type.get_value()==='Warehouse');
-		})
-
-		// create
-		d.set_primary_action(__("Create New"), function() {
-			var btn = this;
-			var v = d.get_values();
-			if(!v) return;
-
-			if(v.account_type==="Warehouse" && !v.warehouse) {
-				msgprint(__("Warehouse is required"));
-				return;
-			}
-
-			var node = me.tree.get_selected_node();
-			v.parent_account = node.label;
-			v.company = me.company;
-
-			if(node.root) {
-				v.is_root = 1;
-				v.parent_account = null;
-			} else {
-				v.is_root = 0;
-				v.root_type = null;
-			}
-
-			return frappe.call({
-				args: v,
-				method: 'erpnext.accounts.utils.add_ac',
-				callback: function(r) {
-					d.hide();
-					if(node.expanded) {
-						node.toggle_node();
-					}
-					node.load();
-				}
-			});
-		});
-
-		// show
-		d.on_page_show = function() {
-			$(fd.is_group.input).change();
-			$(fd.account_type.input).change();
-		}
-
-		$(fd.is_group.input).prop("checked", false).change();
-		
-		// In case of root, show root type and hide account_type, is_group
-		$(fd.root_type.wrapper).toggle(node.root);
-		$(fd.is_group.wrapper).toggle(!node.root);
-		
-		d.show();
-	},
-
-	new_cost_center: function(){
-		var me = this;
-		// the dialog
-		var d = new frappe.ui.Dialog({
-			title:__('New Cost Center'),
-			fields: [
-				{fieldtype:'Data', fieldname:'cost_center_name', label:__('New Cost Center Name'), reqd:true},
-				{fieldtype:'Check', fieldname:'is_group', label:__('Is Group'),
-					description:__('Further cost centers can be made under Groups but entries can be made against non-Groups')},
-				{fieldtype:'Button', fieldname:'create_new', label:__('Create New') }
-			]
-		});
-
-		// create
-		$(d.fields_dict.create_new.input).click(function() {
-			var v = d.get_values();
-			if(!v) return;
-
-			var node = me.tree.get_selected_node();
-
-			v.parent_cost_center = node.label;
-			v.company = me.company;
-
-			return frappe.call({
-				args: v,
-				method: 'erpnext.accounts.utils.add_cc',
-				callback: function(r) {
-					d.hide();
-					if(node.expanded) {
-						node.toggle_node();
-					}
-					node.load();
-				}
-			});
-		});
-		d.show();
-	}
-});
diff --git a/erpnext/accounts/page/accounts_browser/accounts_browser.json b/erpnext/accounts/page/accounts_browser/accounts_browser.json
deleted file mode 100644
index f0fe2e8..0000000
--- a/erpnext/accounts/page/accounts_browser/accounts_browser.json
+++ /dev/null
@@ -1,22 +0,0 @@
-{
- "creation": "2012-06-14 15:07:28.000000",
- "docstatus": 0,
- "doctype": "Page",
- "icon": "icon-sitemap",
- "idx": 1,
- "modified": "2013-07-11 14:39:42.000000",
- "modified_by": "Administrator",
- "module": "Accounts",
- "name": "accounts-browser",
- "owner": "Administrator",
- "page_name": "Accounts Browser",
- "roles": [
-  {
-   "role": "Accounts User"
-  },
-  {
-   "role": "Accounts Manager"
-  }
- ],
- "standard": "Yes"
-}
diff --git a/erpnext/accounts/page/accounts_browser/accounts_browser.py b/erpnext/accounts/page/accounts_browser/accounts_browser.py
deleted file mode 100644
index d96b213..0000000
--- a/erpnext/accounts/page/accounts_browser/accounts_browser.py
+++ /dev/null
@@ -1,57 +0,0 @@
-# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors
-# License: GNU General Public License v3. See license.txt
-
-from __future__ import unicode_literals
-import frappe
-import frappe.defaults
-from frappe.utils import flt
-from erpnext.accounts.utils import get_balance_on
-from erpnext.accounts.report.financial_statements import sort_root_accounts
-
-@frappe.whitelist()
-def get_companies():
-	"""get a list of companies based on permission"""
-	return [d.name for d in frappe.get_list("Company", fields=["name"],
-		order_by="name")]
-
-@frappe.whitelist()
-def get_children():
-	args = frappe.local.form_dict
-	ctype, company = args['ctype'], args['comp']
-	fieldname = frappe.db.escape(ctype.lower().replace(' ','_'))
-	doctype = frappe.db.escape(ctype)
-
-	# root
-	if args['parent'] in ("Accounts", "Cost Centers"):
-		fields = ", root_type, report_type, account_currency" if ctype=="Account" else ""
-		acc = frappe.db.sql(""" select
-			name as value, is_group as expandable {fields}
-			from `tab{doctype}`
-			where ifnull(`parent_{fieldname}`,'') = ''
-			and `company` = %s	and docstatus<2
-			order by name""".format(fields=fields, fieldname = fieldname, doctype=doctype),
-				company, as_dict=1)
-
-		if args["parent"]=="Accounts":
-			sort_root_accounts(acc)
-	else:
-		# other
-		fields = ", account_currency" if ctype=="Account" else ""
-		acc = frappe.db.sql("""select
-			name as value, is_group as expandable, parent_{fieldname} as parent {fields}
-	 		from `tab{doctype}`
-			where ifnull(`parent_{fieldname}`,'') = %s
-			and docstatus<2
-			order by name""".format(fields=fields, fieldname=fieldname, doctype=doctype),
-				args['parent'], as_dict=1)
-
-	if ctype == 'Account':
-		company_currency = frappe.db.get_value("Company", company, "default_currency")
-		for each in acc:
-			each["company_currency"] = company_currency
-			each["balance"] = flt(get_balance_on(each.get("value"), in_account_currency=False))
-
-			if each.account_currency != company_currency:
-				each["balance_in_account_currency"] = flt(get_balance_on(each.get("value")))
-
-	return acc
diff --git a/erpnext/accounts/utils.py b/erpnext/accounts/utils.py
index 27f1394..fbead26 100644
--- a/erpnext/accounts/utils.py
+++ b/erpnext/accounts/utils.py
@@ -10,6 +10,8 @@
 
 # imported to enable erpnext.accounts.utils.get_account_currency
 from erpnext.accounts.doctype.account.account import get_account_currency
+import frappe.defaults
+from erpnext.accounts.report.financial_statements import sort_root_accounts
 
 class FiscalYearError(frappe.ValidationError): pass
 
@@ -127,7 +129,7 @@
 	if not args:
 		args = frappe.local.form_dict
 		args.pop("cmd")
-
+	
 	ac = frappe.new_doc("Account")
 
 	if args.get("ignore_permissions"):
@@ -135,6 +137,10 @@
 		args.pop("ignore_permissions")
 
 	ac.update(args)
+
+	if not ac.parent_account:
+		ac.parent_account = args.get("parent")
+	
 	ac.old_parent = ""
 	ac.freeze_account = "No"
 	if cint(ac.get("is_root")):
@@ -153,6 +159,10 @@
 
 	cc = frappe.new_doc("Cost Center")
 	cc.update(args)
+
+	if not cc.parent_cost_center:
+		cc.parent_cost_center = args.get("parent")
+
 	cc.old_parent = ""
 	cc.insert()
 	return cc.name
@@ -428,3 +438,51 @@
 		"account_currency": account_currency or frappe.defaults.get_defaults().currency,
 		"company": company or frappe.defaults.get_defaults().company
 	}, "name")
+
+@frappe.whitelist()
+def get_companies():
+	"""get a list of companies based on permission"""
+	return [d.name for d in frappe.get_list("Company", fields=["name"],
+		order_by="name")]
+
+@frappe.whitelist()
+def get_children():
+	args = frappe.local.form_dict
+	doctype, company = args['doctype'], args['company']
+	fieldname = frappe.db.escape(doctype.lower().replace(' ','_'))
+	doctype = frappe.db.escape(doctype)
+
+	# root
+	if args['parent'] in ("Accounts", "Cost Centers"):
+		fields = ", root_type, report_type, account_currency" if doctype=="Account" else ""
+		acc = frappe.db.sql(""" select
+			name as value, is_group as expandable {fields}
+			from `tab{doctype}`
+			where ifnull(`parent_{fieldname}`,'') = ''
+			and `company` = %s	and docstatus<2
+			order by name""".format(fields=fields, fieldname = fieldname, doctype=doctype),
+				company, as_dict=1)
+
+		if args["parent"]=="Accounts":
+			sort_root_accounts(acc)
+	else:
+		# other
+		fields = ", account_currency" if doctype=="Account" else ""
+		acc = frappe.db.sql("""select
+			name as value, is_group as expandable, parent_{fieldname} as parent {fields}
+			from `tab{doctype}`
+			where ifnull(`parent_{fieldname}`,'') = %s
+			and docstatus<2
+			order by name""".format(fields=fields, fieldname=fieldname, doctype=doctype),
+				args['parent'], as_dict=1)
+
+	if doctype == 'Account':
+		company_currency = frappe.db.get_value("Company", company, "default_currency")
+		for each in acc:
+			each["company_currency"] = company_currency
+			each["balance"] = flt(get_balance_on(each.get("value"), in_account_currency=False))
+
+			if each.account_currency != company_currency:
+				each["balance_in_account_currency"] = flt(get_balance_on(each.get("value")))
+
+	return acc
diff --git a/erpnext/buying/doctype/request_for_quotation/request_for_quotation.js b/erpnext/buying/doctype/request_for_quotation/request_for_quotation.js
index 5fb8b80..aab006f 100644
--- a/erpnext/buying/doctype/request_for_quotation/request_for_quotation.js
+++ b/erpnext/buying/doctype/request_for_quotation/request_for_quotation.js
@@ -103,6 +103,22 @@
 erpnext.buying.RequestforQuotationController = erpnext.buying.BuyingController.extend({
 	refresh: function() {
 		this._super();
+		if (this.frm.doc.docstatus===0) {
+			cur_frm.add_custom_button(__('Material Request'),
+				function() {
+					frappe.model.map_current_doc({
+						method: "erpnext.stock.doctype.material_request.material_request.make_request_for_quotation",
+						source_doctype: "Material Request",
+						get_query_filters: {
+							material_request_type: "Purchase",
+							docstatus: 1,
+							status: ["!=", "Stopped"],
+							per_ordered: ["<", 99.99],
+							company: cur_frm.doc.company
+						}
+					})
+				}, __("Get items from"));
+		}
 	},
 
 	calculate_taxes_and_totals: function() {
diff --git a/erpnext/config/accounts.py b/erpnext/config/accounts.py
index e11544a..b6b1480 100644
--- a/erpnext/config/accounts.py
+++ b/erpnext/config/accounts.py
@@ -51,10 +51,10 @@
 				},
 				{
 					"type": "page",
-					"name": "Accounts Browser",
+					"name": "Tree",
 					"icon": "icon-sitemap",
 					"label": _("Chart of Accounts"),
-					"route": "Accounts Browser/Account",
+					"route": "Tree/Account",
 					"description": _("Tree of financial accounts."),
 					"doctype": "Account",
 				},
@@ -193,10 +193,10 @@
 			"items": [
 				{
 					"type": "page",
-					"name": "Accounts Browser",
+					"name": "Tree",
 					"icon": "icon-sitemap",
 					"label": _("Chart of Cost Centers"),
-					"route": "Accounts Browser/Cost Center",
+					"route": "Tree/Cost Center",
 					"description": _("Tree of financial Cost Centers."),
 					"doctype": "Cost Center",
 				},
diff --git a/erpnext/config/buying.py b/erpnext/config/buying.py
index 0dc51f6..b423ee9 100644
--- a/erpnext/config/buying.py
+++ b/erpnext/config/buying.py
@@ -97,10 +97,10 @@
 				},
 				{
 					"type": "page",
-					"name": "Sales Browser",
+					"name": "Tree",
 					"icon": "icon-sitemap",
 					"label": _("Item Group"),
-					"link": "Sales Browser/Item Group",
+					"link": "Tree/Item Group",
 					"description": _("Tree of Item Groups."),
 					"doctype": "Item Group",
 				},
diff --git a/erpnext/config/crm.py b/erpnext/config/crm.py
index dfefb75..52958e3 100644
--- a/erpnext/config/crm.py
+++ b/erpnext/config/crm.py
@@ -92,27 +92,27 @@
 				{
 					"type": "page",
 					"label": _("Customer Group"),
-					"name": "Sales Browser",
+					"name": "Tree",
 					"icon": "icon-sitemap",
-					"link": "Sales Browser/Customer Group",
+					"link": "Tree/Customer Group",
 					"description": _("Manage Customer Group Tree."),
 					"doctype": "Customer Group",
 				},
 				{
 					"type": "page",
 					"label": _("Territory"),
-					"name": "Sales Browser",
+					"name": "Tree",
 					"icon": "icon-sitemap",
-					"link": "Sales Browser/Territory",
+					"link": "Tree/Territory",
 					"description": _("Manage Territory Tree."),
 					"doctype": "Territory",
 				},
 				{
 					"type": "page",
 					"label": _("Sales Person"),
-					"name": "Sales Browser",
+					"name": "Tree",
 					"icon": "icon-sitemap",
-					"link": "Sales Browser/Sales Person",
+					"link": "Tree/Sales Person",
 					"description": _("Manage Sales Person Tree."),
 					"doctype": "Sales Person",
 				},
diff --git a/erpnext/config/selling.py b/erpnext/config/selling.py
index 771a0d7..1a725e2 100644
--- a/erpnext/config/selling.py
+++ b/erpnext/config/selling.py
@@ -30,9 +30,9 @@
 				{
 					"type": "page",
 					"label": _("Customer Group"),
-					"name": "Sales Browser",
+					"name": "Tree",
 					"icon": "icon-sitemap",
-					"link": "Sales Browser/Customer Group",
+					"link": "Tree/Customer Group",
 					"description": _("Manage Customer Group Tree."),
 					"doctype": "Customer Group",
 				},
@@ -69,10 +69,10 @@
 				},
 				{
 					"type": "page",
-					"name": "Sales Browser",
+					"name": "Tree",
 					"icon": "icon-sitemap",
 					"label": _("Item Group"),
-					"link": "Sales Browser/Item Group",
+					"link": "Tree/Item Group",
 					"description": _("Tree of Item Groups."),
 					"doctype": "Item Group",
 				},
@@ -101,9 +101,9 @@
 				{
 					"type": "page",
 					"label": _("Territory"),
-					"name": "Sales Browser",
+					"name": "Tree",
 					"icon": "icon-sitemap",
-					"link": "Sales Browser/Territory",
+					"link": "Tree/Territory",
 					"description": _("Manage Territory Tree."),
 					"doctype": "Territory",
 				},
@@ -115,9 +115,9 @@
 				{
 					"type": "page",
 					"label": _("Sales Person"),
-					"name": "Sales Browser",
+					"name": "Tree",
 					"icon": "icon-sitemap",
-					"link": "Sales Browser/Sales Person",
+					"link": "Tree/Sales Person",
 					"description": _("Manage Sales Person Tree."),
 					"doctype": "Sales Person",
 				},
diff --git a/erpnext/config/stock.py b/erpnext/config/stock.py
index cf3a7ba..320d906 100644
--- a/erpnext/config/stock.py
+++ b/erpnext/config/stock.py
@@ -78,10 +78,10 @@
 				},
 				{
 					"type": "page",
-					"name": "Sales Browser",
+					"name": "Tree",
 					"icon": "icon-sitemap",
 					"label": _("Item Group"),
-					"link": "Sales Browser/Item Group",
+					"link": "Tree/Item Group",
 					"description": _("Tree of Item Groups."),
 					"doctype": "Item Group",
 				},
diff --git a/erpnext/controllers/stock_controller.py b/erpnext/controllers/stock_controller.py
index 1976cc6..1e685e5 100644
--- a/erpnext/controllers/stock_controller.py
+++ b/erpnext/controllers/stock_controller.py
@@ -321,6 +321,7 @@
 	warehouse_account = frappe._dict()
 
 	for d in frappe.db.sql("""select warehouse, name, account_currency from tabAccount
-		where account_type = 'Warehouse' and (warehouse is not null and warehouse != '')""", as_dict=1):
+		where account_type = 'Warehouse' and (warehouse is not null and warehouse != ''
+		and is_group != 1)""", as_dict=1):
 			warehouse_account.setdefault(d.warehouse, d)
 	return warehouse_account
diff --git a/erpnext/controllers/website_list_for_contact.py b/erpnext/controllers/website_list_for_contact.py
index 6b514b2..30f9172 100644
--- a/erpnext/controllers/website_list_for_contact.py
+++ b/erpnext/controllers/website_list_for_contact.py
@@ -19,7 +19,7 @@
 	}
 
 def get_transaction_list(doctype, txt=None, filters=None, limit_start=0, limit_page_length=20):
-	from frappe.templates.pages.list import get_list
+	from frappe.www.list import get_list
 	user = frappe.session.user
 	key = None
 
diff --git a/erpnext/crm/doctype/opportunity/opportunity.py b/erpnext/crm/doctype/opportunity/opportunity.py
index b977e26..ad8eea6 100644
--- a/erpnext/crm/doctype/opportunity/opportunity.py
+++ b/erpnext/crm/doctype/opportunity/opportunity.py
@@ -48,13 +48,16 @@
 			if not lead_name:
 				sender_name = get_fullname(self.contact_email)
 				if sender_name == self.contact_email:
-					sender_name = None 
-				
-				account = ''
-				email_name = self.contact_email[0:self.contact_email.index('@')]
-				email_split = email_name.split('.')
-				for s in email_split:
-					account = account + s.capitalize() + ' '
+					sender_name = None
+
+				account = _('Unknown')
+
+				if self.contact_email.index('@'):
+					email_name = self.contact_email[0:self.contact_email.index('@')]
+
+					email_split = email_name.split('.')
+					for s in email_split:
+						account = account + s.capitalize() + ' '
 
 				lead = frappe.get_doc({
 					"doctype": "Lead",
diff --git a/erpnext/manufacturing/page/bom_browser/__init__.py b/erpnext/docs/__init__.py
similarity index 100%
copy from erpnext/manufacturing/page/bom_browser/__init__.py
copy to erpnext/docs/__init__.py
diff --git a/erpnext/manufacturing/page/bom_browser/__init__.py b/erpnext/docs/assets/__init__.py
similarity index 100%
copy from erpnext/manufacturing/page/bom_browser/__init__.py
copy to erpnext/docs/assets/__init__.py
diff --git a/erpnext/manufacturing/page/bom_browser/__init__.py b/erpnext/docs/assets/img/__init__.py
similarity index 100%
copy from erpnext/manufacturing/page/bom_browser/__init__.py
copy to erpnext/docs/assets/img/__init__.py
diff --git a/erpnext/manufacturing/page/bom_browser/__init__.py b/erpnext/docs/assets/img/accounts/__init__.py
similarity index 100%
copy from erpnext/manufacturing/page/bom_browser/__init__.py
copy to erpnext/docs/assets/img/accounts/__init__.py
diff --git a/erpnext/manufacturing/page/bom_browser/__init__.py b/erpnext/docs/assets/img/accounts/multi-currency/__init__.py
similarity index 100%
copy from erpnext/manufacturing/page/bom_browser/__init__.py
copy to erpnext/docs/assets/img/accounts/multi-currency/__init__.py
diff --git a/erpnext/manufacturing/page/bom_browser/__init__.py b/erpnext/docs/assets/img/articles/__init__.py
similarity index 100%
copy from erpnext/manufacturing/page/bom_browser/__init__.py
copy to erpnext/docs/assets/img/articles/__init__.py
diff --git a/erpnext/manufacturing/page/bom_browser/__init__.py b/erpnext/docs/assets/img/buying/__init__.py
similarity index 100%
copy from erpnext/manufacturing/page/bom_browser/__init__.py
copy to erpnext/docs/assets/img/buying/__init__.py
diff --git a/erpnext/manufacturing/page/bom_browser/__init__.py b/erpnext/docs/assets/img/crm/__init__.py
similarity index 100%
copy from erpnext/manufacturing/page/bom_browser/__init__.py
copy to erpnext/docs/assets/img/crm/__init__.py
diff --git a/erpnext/manufacturing/page/bom_browser/__init__.py b/erpnext/docs/assets/img/customize/__init__.py
similarity index 100%
copy from erpnext/manufacturing/page/bom_browser/__init__.py
copy to erpnext/docs/assets/img/customize/__init__.py
diff --git a/erpnext/manufacturing/page/bom_browser/__init__.py b/erpnext/docs/assets/img/human-resources/__init__.py
similarity index 100%
copy from erpnext/manufacturing/page/bom_browser/__init__.py
copy to erpnext/docs/assets/img/human-resources/__init__.py
diff --git a/erpnext/manufacturing/page/bom_browser/__init__.py b/erpnext/docs/assets/img/manufacturing/__init__.py
similarity index 100%
copy from erpnext/manufacturing/page/bom_browser/__init__.py
copy to erpnext/docs/assets/img/manufacturing/__init__.py
diff --git a/erpnext/manufacturing/page/bom_browser/__init__.py b/erpnext/docs/assets/img/multilingual_print_format/__init__.py
similarity index 100%
copy from erpnext/manufacturing/page/bom_browser/__init__.py
copy to erpnext/docs/assets/img/multilingual_print_format/__init__.py
diff --git a/erpnext/manufacturing/page/bom_browser/__init__.py b/erpnext/docs/assets/img/pos-setting/__init__.py
similarity index 100%
copy from erpnext/manufacturing/page/bom_browser/__init__.py
copy to erpnext/docs/assets/img/pos-setting/__init__.py
diff --git a/erpnext/manufacturing/page/bom_browser/__init__.py b/erpnext/docs/assets/img/price-list/__init__.py
similarity index 100%
copy from erpnext/manufacturing/page/bom_browser/__init__.py
copy to erpnext/docs/assets/img/price-list/__init__.py
diff --git a/erpnext/manufacturing/page/bom_browser/__init__.py b/erpnext/docs/assets/img/project/__init__.py
similarity index 100%
copy from erpnext/manufacturing/page/bom_browser/__init__.py
copy to erpnext/docs/assets/img/project/__init__.py
diff --git a/erpnext/manufacturing/page/bom_browser/__init__.py b/erpnext/docs/assets/img/selling/__init__.py
similarity index 100%
copy from erpnext/manufacturing/page/bom_browser/__init__.py
copy to erpnext/docs/assets/img/selling/__init__.py
diff --git a/erpnext/manufacturing/page/bom_browser/__init__.py b/erpnext/docs/assets/img/setup-wizard/__init__.py
similarity index 100%
copy from erpnext/manufacturing/page/bom_browser/__init__.py
copy to erpnext/docs/assets/img/setup-wizard/__init__.py
diff --git a/erpnext/manufacturing/page/bom_browser/__init__.py b/erpnext/docs/assets/img/setup/__init__.py
similarity index 100%
copy from erpnext/manufacturing/page/bom_browser/__init__.py
copy to erpnext/docs/assets/img/setup/__init__.py
diff --git a/erpnext/manufacturing/page/bom_browser/__init__.py b/erpnext/docs/assets/img/setup/customize/__init__.py
similarity index 100%
copy from erpnext/manufacturing/page/bom_browser/__init__.py
copy to erpnext/docs/assets/img/setup/customize/__init__.py
diff --git a/erpnext/manufacturing/page/bom_browser/__init__.py b/erpnext/docs/assets/img/setup/data-import/__init__.py
similarity index 100%
copy from erpnext/manufacturing/page/bom_browser/__init__.py
copy to erpnext/docs/assets/img/setup/data-import/__init__.py
diff --git a/erpnext/manufacturing/page/bom_browser/__init__.py b/erpnext/docs/assets/img/setup/data/__init__.py
similarity index 100%
copy from erpnext/manufacturing/page/bom_browser/__init__.py
copy to erpnext/docs/assets/img/setup/data/__init__.py
diff --git a/erpnext/manufacturing/page/bom_browser/__init__.py b/erpnext/docs/assets/img/setup/email/__init__.py
similarity index 100%
copy from erpnext/manufacturing/page/bom_browser/__init__.py
copy to erpnext/docs/assets/img/setup/email/__init__.py
diff --git a/erpnext/manufacturing/page/bom_browser/__init__.py b/erpnext/docs/assets/img/setup/print/__init__.py
similarity index 100%
copy from erpnext/manufacturing/page/bom_browser/__init__.py
copy to erpnext/docs/assets/img/setup/print/__init__.py
diff --git a/erpnext/manufacturing/page/bom_browser/__init__.py b/erpnext/docs/assets/img/setup/settings/__init__.py
similarity index 100%
copy from erpnext/manufacturing/page/bom_browser/__init__.py
copy to erpnext/docs/assets/img/setup/settings/__init__.py
diff --git a/erpnext/manufacturing/page/bom_browser/__init__.py b/erpnext/docs/assets/img/setup/users/__init__.py
similarity index 100%
copy from erpnext/manufacturing/page/bom_browser/__init__.py
copy to erpnext/docs/assets/img/setup/users/__init__.py
diff --git a/erpnext/manufacturing/page/bom_browser/__init__.py b/erpnext/docs/assets/img/stock/__init__.py
similarity index 100%
copy from erpnext/manufacturing/page/bom_browser/__init__.py
copy to erpnext/docs/assets/img/stock/__init__.py
diff --git a/erpnext/manufacturing/page/bom_browser/__init__.py b/erpnext/docs/assets/img/support/__init__.py
similarity index 100%
copy from erpnext/manufacturing/page/bom_browser/__init__.py
copy to erpnext/docs/assets/img/support/__init__.py
diff --git a/erpnext/manufacturing/page/bom_browser/__init__.py b/erpnext/docs/assets/img/taxes/__init__.py
similarity index 100%
copy from erpnext/manufacturing/page/bom_browser/__init__.py
copy to erpnext/docs/assets/img/taxes/__init__.py
diff --git a/erpnext/manufacturing/page/bom_browser/__init__.py b/erpnext/docs/assets/img/users-and-permissions/__init__.py
similarity index 100%
copy from erpnext/manufacturing/page/bom_browser/__init__.py
copy to erpnext/docs/assets/img/users-and-permissions/__init__.py
diff --git a/erpnext/manufacturing/page/bom_browser/__init__.py b/erpnext/docs/assets/img/videos/__init__.py
similarity index 100%
copy from erpnext/manufacturing/page/bom_browser/__init__.py
copy to erpnext/docs/assets/img/videos/__init__.py
diff --git a/erpnext/manufacturing/page/bom_browser/__init__.py b/erpnext/docs/assets/img/website/__init__.py
similarity index 100%
copy from erpnext/manufacturing/page/bom_browser/__init__.py
copy to erpnext/docs/assets/img/website/__init__.py
diff --git a/erpnext/manufacturing/page/bom_browser/__init__.py b/erpnext/docs/assets/old_images/__init__.py
similarity index 100%
copy from erpnext/manufacturing/page/bom_browser/__init__.py
copy to erpnext/docs/assets/old_images/__init__.py
diff --git a/erpnext/manufacturing/page/bom_browser/__init__.py b/erpnext/docs/assets/old_images/erpnext/__init__.py
similarity index 100%
copy from erpnext/manufacturing/page/bom_browser/__init__.py
copy to erpnext/docs/assets/old_images/erpnext/__init__.py
diff --git a/erpnext/manufacturing/page/bom_browser/__init__.py b/erpnext/docs/user/__init__.py
similarity index 100%
rename from erpnext/manufacturing/page/bom_browser/__init__.py
rename to erpnext/docs/user/__init__.py
diff --git a/erpnext/manufacturing/page/bom_browser/__init__.py b/erpnext/docs/user/manual/__init__.py
similarity index 100%
copy from erpnext/manufacturing/page/bom_browser/__init__.py
copy to erpnext/docs/user/manual/__init__.py
diff --git a/erpnext/manufacturing/page/bom_browser/__init__.py b/erpnext/docs/user/manual/de/Beispiel/__init__.py
similarity index 100%
copy from erpnext/manufacturing/page/bom_browser/__init__.py
copy to erpnext/docs/user/manual/de/Beispiel/__init__.py
diff --git a/erpnext/manufacturing/page/bom_browser/__init__.py b/erpnext/docs/user/manual/de/CRM/__init__.py
similarity index 100%
copy from erpnext/manufacturing/page/bom_browser/__init__.py
copy to erpnext/docs/user/manual/de/CRM/__init__.py
diff --git a/erpnext/manufacturing/page/bom_browser/__init__.py b/erpnext/docs/user/manual/de/CRM/setup/__init__.py
similarity index 100%
copy from erpnext/manufacturing/page/bom_browser/__init__.py
copy to erpnext/docs/user/manual/de/CRM/setup/__init__.py
diff --git a/erpnext/manufacturing/page/bom_browser/__init__.py b/erpnext/docs/user/manual/de/__init__.py
similarity index 100%
copy from erpnext/manufacturing/page/bom_browser/__init__.py
copy to erpnext/docs/user/manual/de/__init__.py
diff --git a/erpnext/manufacturing/page/bom_browser/__init__.py b/erpnext/docs/user/manual/de/accounts/__init__.py
similarity index 100%
copy from erpnext/manufacturing/page/bom_browser/__init__.py
copy to erpnext/docs/user/manual/de/accounts/__init__.py
diff --git a/erpnext/manufacturing/page/bom_browser/__init__.py b/erpnext/docs/user/manual/de/accounts/setup/__init__.py
similarity index 100%
copy from erpnext/manufacturing/page/bom_browser/__init__.py
copy to erpnext/docs/user/manual/de/accounts/setup/__init__.py
diff --git a/erpnext/manufacturing/page/bom_browser/__init__.py b/erpnext/docs/user/manual/de/accounts/tools/__init__.py
similarity index 100%
copy from erpnext/manufacturing/page/bom_browser/__init__.py
copy to erpnext/docs/user/manual/de/accounts/tools/__init__.py
diff --git a/erpnext/manufacturing/page/bom_browser/__init__.py b/erpnext/docs/user/manual/de/buying/__init__.py
similarity index 100%
copy from erpnext/manufacturing/page/bom_browser/__init__.py
copy to erpnext/docs/user/manual/de/buying/__init__.py
diff --git a/erpnext/manufacturing/page/bom_browser/__init__.py b/erpnext/docs/user/manual/de/buying/setup/__init__.py
similarity index 100%
copy from erpnext/manufacturing/page/bom_browser/__init__.py
copy to erpnext/docs/user/manual/de/buying/setup/__init__.py
diff --git a/erpnext/manufacturing/page/bom_browser/__init__.py b/erpnext/docs/user/manual/de/customer-portal/__init__.py
similarity index 100%
copy from erpnext/manufacturing/page/bom_browser/__init__.py
copy to erpnext/docs/user/manual/de/customer-portal/__init__.py
diff --git a/erpnext/manufacturing/page/bom_browser/__init__.py b/erpnext/docs/user/manual/de/customize-erpnext/__init__.py
similarity index 100%
copy from erpnext/manufacturing/page/bom_browser/__init__.py
copy to erpnext/docs/user/manual/de/customize-erpnext/__init__.py
diff --git a/erpnext/manufacturing/page/bom_browser/__init__.py b/erpnext/docs/user/manual/de/customize-erpnext/custom-scripts/__init__.py
similarity index 100%
copy from erpnext/manufacturing/page/bom_browser/__init__.py
copy to erpnext/docs/user/manual/de/customize-erpnext/custom-scripts/__init__.py
diff --git a/erpnext/manufacturing/page/bom_browser/__init__.py b/erpnext/docs/user/manual/de/customize-erpnext/custom-scripts/custom-script-examples/__init__.py
similarity index 100%
copy from erpnext/manufacturing/page/bom_browser/__init__.py
copy to erpnext/docs/user/manual/de/customize-erpnext/custom-scripts/custom-script-examples/__init__.py
diff --git a/erpnext/manufacturing/page/bom_browser/__init__.py b/erpnext/docs/user/manual/de/human-resources/__init__.py
similarity index 100%
copy from erpnext/manufacturing/page/bom_browser/__init__.py
copy to erpnext/docs/user/manual/de/human-resources/__init__.py
diff --git a/erpnext/manufacturing/page/bom_browser/__init__.py b/erpnext/docs/user/manual/de/human-resources/setup/__init__.py
similarity index 100%
copy from erpnext/manufacturing/page/bom_browser/__init__.py
copy to erpnext/docs/user/manual/de/human-resources/setup/__init__.py
diff --git a/erpnext/manufacturing/page/bom_browser/__init__.py b/erpnext/docs/user/manual/de/human-resources/tools/__init__.py
similarity index 100%
copy from erpnext/manufacturing/page/bom_browser/__init__.py
copy to erpnext/docs/user/manual/de/human-resources/tools/__init__.py
diff --git a/erpnext/manufacturing/page/bom_browser/__init__.py b/erpnext/docs/user/manual/de/introduction/__init__.py
similarity index 100%
copy from erpnext/manufacturing/page/bom_browser/__init__.py
copy to erpnext/docs/user/manual/de/introduction/__init__.py
diff --git a/erpnext/manufacturing/page/bom_browser/__init__.py b/erpnext/docs/user/manual/de/manufacturing/__init__.py
similarity index 100%
copy from erpnext/manufacturing/page/bom_browser/__init__.py
copy to erpnext/docs/user/manual/de/manufacturing/__init__.py
diff --git a/erpnext/manufacturing/page/bom_browser/__init__.py b/erpnext/docs/user/manual/de/manufacturing/setup/__init__.py
similarity index 100%
copy from erpnext/manufacturing/page/bom_browser/__init__.py
copy to erpnext/docs/user/manual/de/manufacturing/setup/__init__.py
diff --git a/erpnext/manufacturing/page/bom_browser/__init__.py b/erpnext/docs/user/manual/de/manufacturing/tools/__init__.py
similarity index 100%
copy from erpnext/manufacturing/page/bom_browser/__init__.py
copy to erpnext/docs/user/manual/de/manufacturing/tools/__init__.py
diff --git a/erpnext/manufacturing/page/bom_browser/__init__.py b/erpnext/docs/user/manual/de/projects/__init__.py
similarity index 100%
copy from erpnext/manufacturing/page/bom_browser/__init__.py
copy to erpnext/docs/user/manual/de/projects/__init__.py
diff --git a/erpnext/manufacturing/page/bom_browser/__init__.py b/erpnext/docs/user/manual/de/selling/__init__.py
similarity index 100%
copy from erpnext/manufacturing/page/bom_browser/__init__.py
copy to erpnext/docs/user/manual/de/selling/__init__.py
diff --git a/erpnext/manufacturing/page/bom_browser/__init__.py b/erpnext/docs/user/manual/de/selling/setup/__init__.py
similarity index 100%
copy from erpnext/manufacturing/page/bom_browser/__init__.py
copy to erpnext/docs/user/manual/de/selling/setup/__init__.py
diff --git a/erpnext/manufacturing/page/bom_browser/__init__.py b/erpnext/docs/user/manual/de/setting-up/__init__.py
similarity index 100%
copy from erpnext/manufacturing/page/bom_browser/__init__.py
copy to erpnext/docs/user/manual/de/setting-up/__init__.py
diff --git a/erpnext/manufacturing/page/bom_browser/__init__.py b/erpnext/docs/user/manual/de/setting-up/data/__init__.py
similarity index 100%
copy from erpnext/manufacturing/page/bom_browser/__init__.py
copy to erpnext/docs/user/manual/de/setting-up/data/__init__.py
diff --git a/erpnext/manufacturing/page/bom_browser/__init__.py b/erpnext/docs/user/manual/de/setting-up/email/__init__.py
similarity index 100%
copy from erpnext/manufacturing/page/bom_browser/__init__.py
copy to erpnext/docs/user/manual/de/setting-up/email/__init__.py
diff --git a/erpnext/manufacturing/page/bom_browser/__init__.py b/erpnext/docs/user/manual/de/setting-up/print/__init__.py
similarity index 100%
copy from erpnext/manufacturing/page/bom_browser/__init__.py
copy to erpnext/docs/user/manual/de/setting-up/print/__init__.py
diff --git a/erpnext/manufacturing/page/bom_browser/__init__.py b/erpnext/docs/user/manual/de/setting-up/settings/__init__.py
similarity index 100%
copy from erpnext/manufacturing/page/bom_browser/__init__.py
copy to erpnext/docs/user/manual/de/setting-up/settings/__init__.py
diff --git a/erpnext/manufacturing/page/bom_browser/__init__.py b/erpnext/docs/user/manual/de/setting-up/setup-wizard/__init__.py
similarity index 100%
copy from erpnext/manufacturing/page/bom_browser/__init__.py
copy to erpnext/docs/user/manual/de/setting-up/setup-wizard/__init__.py
diff --git a/erpnext/manufacturing/page/bom_browser/__init__.py b/erpnext/docs/user/manual/de/setting-up/users-and-permissions/__init__.py
similarity index 100%
copy from erpnext/manufacturing/page/bom_browser/__init__.py
copy to erpnext/docs/user/manual/de/setting-up/users-and-permissions/__init__.py
diff --git a/erpnext/manufacturing/page/bom_browser/__init__.py b/erpnext/docs/user/manual/de/stock/__init__.py
similarity index 100%
copy from erpnext/manufacturing/page/bom_browser/__init__.py
copy to erpnext/docs/user/manual/de/stock/__init__.py
diff --git a/erpnext/manufacturing/page/bom_browser/__init__.py b/erpnext/docs/user/manual/de/stock/accounting-of-inventory-stock/__init__.py
similarity index 100%
copy from erpnext/manufacturing/page/bom_browser/__init__.py
copy to erpnext/docs/user/manual/de/stock/accounting-of-inventory-stock/__init__.py
diff --git a/erpnext/manufacturing/page/bom_browser/__init__.py b/erpnext/docs/user/manual/de/stock/articles/__init__.py
similarity index 100%
copy from erpnext/manufacturing/page/bom_browser/__init__.py
copy to erpnext/docs/user/manual/de/stock/articles/__init__.py
diff --git a/erpnext/manufacturing/page/bom_browser/__init__.py b/erpnext/docs/user/manual/de/stock/setup/__init__.py
similarity index 100%
copy from erpnext/manufacturing/page/bom_browser/__init__.py
copy to erpnext/docs/user/manual/de/stock/setup/__init__.py
diff --git a/erpnext/manufacturing/page/bom_browser/__init__.py b/erpnext/docs/user/manual/de/stock/tools/__init__.py
similarity index 100%
copy from erpnext/manufacturing/page/bom_browser/__init__.py
copy to erpnext/docs/user/manual/de/stock/tools/__init__.py
diff --git a/erpnext/manufacturing/page/bom_browser/__init__.py b/erpnext/docs/user/manual/de/support/__init__.py
similarity index 100%
copy from erpnext/manufacturing/page/bom_browser/__init__.py
copy to erpnext/docs/user/manual/de/support/__init__.py
diff --git a/erpnext/manufacturing/page/bom_browser/__init__.py b/erpnext/docs/user/manual/de/using-erpnext/__init__.py
similarity index 100%
copy from erpnext/manufacturing/page/bom_browser/__init__.py
copy to erpnext/docs/user/manual/de/using-erpnext/__init__.py
diff --git a/erpnext/manufacturing/page/bom_browser/__init__.py b/erpnext/docs/user/manual/de/website/__init__.py
similarity index 100%
copy from erpnext/manufacturing/page/bom_browser/__init__.py
copy to erpnext/docs/user/manual/de/website/__init__.py
diff --git a/erpnext/manufacturing/page/bom_browser/__init__.py b/erpnext/docs/user/manual/de/website/setup/__init__.py
similarity index 100%
copy from erpnext/manufacturing/page/bom_browser/__init__.py
copy to erpnext/docs/user/manual/de/website/setup/__init__.py
diff --git a/erpnext/manufacturing/page/bom_browser/__init__.py b/erpnext/docs/user/manual/en/CRM/__init__.py
similarity index 100%
copy from erpnext/manufacturing/page/bom_browser/__init__.py
copy to erpnext/docs/user/manual/en/CRM/__init__.py
diff --git a/erpnext/docs/user/manual/en/CRM/contact.md b/erpnext/docs/user/manual/en/CRM/contact.md
index 83757e0..f87f82c 100644
--- a/erpnext/docs/user/manual/en/CRM/contact.md
+++ b/erpnext/docs/user/manual/en/CRM/contact.md
@@ -1,7 +1,6 @@
 # Contact and Address
 
-Contacts are not necessarily linked to another document. They can be stand alone, just a Contact with a First Name not linked to any other document or 
-Contacts can be linked to a Party, that is either a Customer or a Supplier.
+Contacts do not need to be linked to another document, they can be stand alone.  You can even create a contact with only a first name, not linked to any other document or party (Customer/Supplier).
 
 The Contact_ID is automatically created:
 
@@ -36,7 +35,7 @@
 
 ### Address Titles
 
-The Address Title (Name of person or organization that this address belongs to) is a free format unlinked field. The ID is automatically created from the Address Title upper score Address Type. (AdressTitle-AddressType).
+The Address Title (Name of person or organization that this address belongs to) is a free format unlinked field. The ID is automatically created from the Address Title and Address Type. (AddressTitle-AddressType).
 
 ### Address Linking
 
diff --git a/erpnext/manufacturing/page/bom_browser/__init__.py b/erpnext/docs/user/manual/en/CRM/setup/__init__.py
similarity index 100%
copy from erpnext/manufacturing/page/bom_browser/__init__.py
copy to erpnext/docs/user/manual/en/CRM/setup/__init__.py
diff --git a/erpnext/manufacturing/page/bom_browser/__init__.py b/erpnext/docs/user/manual/en/__init__.py
similarity index 100%
copy from erpnext/manufacturing/page/bom_browser/__init__.py
copy to erpnext/docs/user/manual/en/__init__.py
diff --git a/erpnext/manufacturing/page/bom_browser/__init__.py b/erpnext/docs/user/manual/en/accounts/__init__.py
similarity index 100%
copy from erpnext/manufacturing/page/bom_browser/__init__.py
copy to erpnext/docs/user/manual/en/accounts/__init__.py
diff --git a/erpnext/manufacturing/page/bom_browser/__init__.py b/erpnext/docs/user/manual/en/accounts/articles/__init__.py
similarity index 100%
copy from erpnext/manufacturing/page/bom_browser/__init__.py
copy to erpnext/docs/user/manual/en/accounts/articles/__init__.py
diff --git a/erpnext/manufacturing/page/bom_browser/__init__.py b/erpnext/docs/user/manual/en/accounts/setup/__init__.py
similarity index 100%
copy from erpnext/manufacturing/page/bom_browser/__init__.py
copy to erpnext/docs/user/manual/en/accounts/setup/__init__.py
diff --git a/erpnext/manufacturing/page/bom_browser/__init__.py b/erpnext/docs/user/manual/en/accounts/tools/__init__.py
similarity index 100%
copy from erpnext/manufacturing/page/bom_browser/__init__.py
copy to erpnext/docs/user/manual/en/accounts/tools/__init__.py
diff --git a/erpnext/manufacturing/page/bom_browser/__init__.py b/erpnext/docs/user/manual/en/buying/__init__.py
similarity index 100%
copy from erpnext/manufacturing/page/bom_browser/__init__.py
copy to erpnext/docs/user/manual/en/buying/__init__.py
diff --git a/erpnext/manufacturing/page/bom_browser/__init__.py b/erpnext/docs/user/manual/en/buying/articles/__init__.py
similarity index 100%
copy from erpnext/manufacturing/page/bom_browser/__init__.py
copy to erpnext/docs/user/manual/en/buying/articles/__init__.py
diff --git a/erpnext/manufacturing/page/bom_browser/__init__.py b/erpnext/docs/user/manual/en/buying/setup/__init__.py
similarity index 100%
copy from erpnext/manufacturing/page/bom_browser/__init__.py
copy to erpnext/docs/user/manual/en/buying/setup/__init__.py
diff --git a/erpnext/manufacturing/page/bom_browser/__init__.py b/erpnext/docs/user/manual/en/customer-portal/__init__.py
similarity index 100%
copy from erpnext/manufacturing/page/bom_browser/__init__.py
copy to erpnext/docs/user/manual/en/customer-portal/__init__.py
diff --git a/erpnext/manufacturing/page/bom_browser/__init__.py b/erpnext/docs/user/manual/en/customize-erpnext/__init__.py
similarity index 100%
copy from erpnext/manufacturing/page/bom_browser/__init__.py
copy to erpnext/docs/user/manual/en/customize-erpnext/__init__.py
diff --git a/erpnext/manufacturing/page/bom_browser/__init__.py b/erpnext/docs/user/manual/en/customize-erpnext/articles/__init__.py
similarity index 100%
copy from erpnext/manufacturing/page/bom_browser/__init__.py
copy to erpnext/docs/user/manual/en/customize-erpnext/articles/__init__.py
diff --git a/erpnext/manufacturing/page/bom_browser/__init__.py b/erpnext/docs/user/manual/en/customize-erpnext/custom-scripts/__init__.py
similarity index 100%
copy from erpnext/manufacturing/page/bom_browser/__init__.py
copy to erpnext/docs/user/manual/en/customize-erpnext/custom-scripts/__init__.py
diff --git a/erpnext/manufacturing/page/bom_browser/__init__.py b/erpnext/docs/user/manual/en/customize-erpnext/custom-scripts/custom-script-examples/__init__.py
similarity index 100%
copy from erpnext/manufacturing/page/bom_browser/__init__.py
copy to erpnext/docs/user/manual/en/customize-erpnext/custom-scripts/custom-script-examples/__init__.py
diff --git a/erpnext/manufacturing/page/bom_browser/__init__.py b/erpnext/docs/user/manual/en/human-resources/__init__.py
similarity index 100%
copy from erpnext/manufacturing/page/bom_browser/__init__.py
copy to erpnext/docs/user/manual/en/human-resources/__init__.py
diff --git a/erpnext/manufacturing/page/bom_browser/__init__.py b/erpnext/docs/user/manual/en/human-resources/articles/__init__.py
similarity index 100%
copy from erpnext/manufacturing/page/bom_browser/__init__.py
copy to erpnext/docs/user/manual/en/human-resources/articles/__init__.py
diff --git a/erpnext/manufacturing/page/bom_browser/__init__.py b/erpnext/docs/user/manual/en/human-resources/setup/__init__.py
similarity index 100%
copy from erpnext/manufacturing/page/bom_browser/__init__.py
copy to erpnext/docs/user/manual/en/human-resources/setup/__init__.py
diff --git a/erpnext/manufacturing/page/bom_browser/__init__.py b/erpnext/docs/user/manual/en/human-resources/tools/__init__.py
similarity index 100%
copy from erpnext/manufacturing/page/bom_browser/__init__.py
copy to erpnext/docs/user/manual/en/human-resources/tools/__init__.py
diff --git a/erpnext/manufacturing/page/bom_browser/__init__.py b/erpnext/docs/user/manual/en/introduction/__init__.py
similarity index 100%
copy from erpnext/manufacturing/page/bom_browser/__init__.py
copy to erpnext/docs/user/manual/en/introduction/__init__.py
diff --git a/erpnext/manufacturing/page/bom_browser/__init__.py b/erpnext/docs/user/manual/en/manufacturing/__init__.py
similarity index 100%
copy from erpnext/manufacturing/page/bom_browser/__init__.py
copy to erpnext/docs/user/manual/en/manufacturing/__init__.py
diff --git a/erpnext/manufacturing/page/bom_browser/__init__.py b/erpnext/docs/user/manual/en/manufacturing/articles/__init__.py
similarity index 100%
copy from erpnext/manufacturing/page/bom_browser/__init__.py
copy to erpnext/docs/user/manual/en/manufacturing/articles/__init__.py
diff --git a/erpnext/manufacturing/page/bom_browser/__init__.py b/erpnext/docs/user/manual/en/manufacturing/setup/__init__.py
similarity index 100%
copy from erpnext/manufacturing/page/bom_browser/__init__.py
copy to erpnext/docs/user/manual/en/manufacturing/setup/__init__.py
diff --git a/erpnext/manufacturing/page/bom_browser/__init__.py b/erpnext/docs/user/manual/en/manufacturing/tools/__init__.py
similarity index 100%
copy from erpnext/manufacturing/page/bom_browser/__init__.py
copy to erpnext/docs/user/manual/en/manufacturing/tools/__init__.py
diff --git a/erpnext/manufacturing/page/bom_browser/__init__.py b/erpnext/docs/user/manual/en/projects/__init__.py
similarity index 100%
copy from erpnext/manufacturing/page/bom_browser/__init__.py
copy to erpnext/docs/user/manual/en/projects/__init__.py
diff --git a/erpnext/manufacturing/page/bom_browser/__init__.py b/erpnext/docs/user/manual/en/projects/articles/__init__.py
similarity index 100%
copy from erpnext/manufacturing/page/bom_browser/__init__.py
copy to erpnext/docs/user/manual/en/projects/articles/__init__.py
diff --git a/erpnext/manufacturing/page/bom_browser/__init__.py b/erpnext/docs/user/manual/en/selling/__init__.py
similarity index 100%
copy from erpnext/manufacturing/page/bom_browser/__init__.py
copy to erpnext/docs/user/manual/en/selling/__init__.py
diff --git a/erpnext/manufacturing/page/bom_browser/__init__.py b/erpnext/docs/user/manual/en/selling/articles/__init__.py
similarity index 100%
copy from erpnext/manufacturing/page/bom_browser/__init__.py
copy to erpnext/docs/user/manual/en/selling/articles/__init__.py
diff --git a/erpnext/manufacturing/page/bom_browser/__init__.py b/erpnext/docs/user/manual/en/selling/setup/__init__.py
similarity index 100%
copy from erpnext/manufacturing/page/bom_browser/__init__.py
copy to erpnext/docs/user/manual/en/selling/setup/__init__.py
diff --git a/erpnext/manufacturing/page/bom_browser/__init__.py b/erpnext/docs/user/manual/en/setting-up/__init__.py
similarity index 100%
copy from erpnext/manufacturing/page/bom_browser/__init__.py
copy to erpnext/docs/user/manual/en/setting-up/__init__.py
diff --git a/erpnext/manufacturing/page/bom_browser/__init__.py b/erpnext/docs/user/manual/en/setting-up/articles/__init__.py
similarity index 100%
copy from erpnext/manufacturing/page/bom_browser/__init__.py
copy to erpnext/docs/user/manual/en/setting-up/articles/__init__.py
diff --git a/erpnext/manufacturing/page/bom_browser/__init__.py b/erpnext/docs/user/manual/en/setting-up/data/__init__.py
similarity index 100%
copy from erpnext/manufacturing/page/bom_browser/__init__.py
copy to erpnext/docs/user/manual/en/setting-up/data/__init__.py
diff --git a/erpnext/manufacturing/page/bom_browser/__init__.py b/erpnext/docs/user/manual/en/setting-up/email/__init__.py
similarity index 100%
copy from erpnext/manufacturing/page/bom_browser/__init__.py
copy to erpnext/docs/user/manual/en/setting-up/email/__init__.py
diff --git a/erpnext/manufacturing/page/bom_browser/__init__.py b/erpnext/docs/user/manual/en/setting-up/print/__init__.py
similarity index 100%
copy from erpnext/manufacturing/page/bom_browser/__init__.py
copy to erpnext/docs/user/manual/en/setting-up/print/__init__.py
diff --git a/erpnext/manufacturing/page/bom_browser/__init__.py b/erpnext/docs/user/manual/en/setting-up/settings/__init__.py
similarity index 100%
copy from erpnext/manufacturing/page/bom_browser/__init__.py
copy to erpnext/docs/user/manual/en/setting-up/settings/__init__.py
diff --git a/erpnext/manufacturing/page/bom_browser/__init__.py b/erpnext/docs/user/manual/en/setting-up/setup-wizard/__init__.py
similarity index 100%
copy from erpnext/manufacturing/page/bom_browser/__init__.py
copy to erpnext/docs/user/manual/en/setting-up/setup-wizard/__init__.py
diff --git a/erpnext/manufacturing/page/bom_browser/__init__.py b/erpnext/docs/user/manual/en/setting-up/users-and-permissions/__init__.py
similarity index 100%
copy from erpnext/manufacturing/page/bom_browser/__init__.py
copy to erpnext/docs/user/manual/en/setting-up/users-and-permissions/__init__.py
diff --git a/erpnext/manufacturing/page/bom_browser/__init__.py b/erpnext/docs/user/manual/en/stock/__init__.py
similarity index 100%
copy from erpnext/manufacturing/page/bom_browser/__init__.py
copy to erpnext/docs/user/manual/en/stock/__init__.py
diff --git a/erpnext/manufacturing/page/bom_browser/__init__.py b/erpnext/docs/user/manual/en/stock/accounting-of-inventory-stock/__init__.py
similarity index 100%
copy from erpnext/manufacturing/page/bom_browser/__init__.py
copy to erpnext/docs/user/manual/en/stock/accounting-of-inventory-stock/__init__.py
diff --git a/erpnext/manufacturing/page/bom_browser/__init__.py b/erpnext/docs/user/manual/en/stock/articles/__init__.py
similarity index 100%
copy from erpnext/manufacturing/page/bom_browser/__init__.py
copy to erpnext/docs/user/manual/en/stock/articles/__init__.py
diff --git a/erpnext/manufacturing/page/bom_browser/__init__.py b/erpnext/docs/user/manual/en/stock/item/__init__.py
similarity index 100%
copy from erpnext/manufacturing/page/bom_browser/__init__.py
copy to erpnext/docs/user/manual/en/stock/item/__init__.py
diff --git a/erpnext/manufacturing/page/bom_browser/__init__.py b/erpnext/docs/user/manual/en/stock/setup/__init__.py
similarity index 100%
copy from erpnext/manufacturing/page/bom_browser/__init__.py
copy to erpnext/docs/user/manual/en/stock/setup/__init__.py
diff --git a/erpnext/manufacturing/page/bom_browser/__init__.py b/erpnext/docs/user/manual/en/stock/tools/__init__.py
similarity index 100%
copy from erpnext/manufacturing/page/bom_browser/__init__.py
copy to erpnext/docs/user/manual/en/stock/tools/__init__.py
diff --git a/erpnext/manufacturing/page/bom_browser/__init__.py b/erpnext/docs/user/manual/en/support/__init__.py
similarity index 100%
copy from erpnext/manufacturing/page/bom_browser/__init__.py
copy to erpnext/docs/user/manual/en/support/__init__.py
diff --git a/erpnext/manufacturing/page/bom_browser/__init__.py b/erpnext/docs/user/manual/en/using-erpnext/__init__.py
similarity index 100%
copy from erpnext/manufacturing/page/bom_browser/__init__.py
copy to erpnext/docs/user/manual/en/using-erpnext/__init__.py
diff --git a/erpnext/manufacturing/page/bom_browser/__init__.py b/erpnext/docs/user/manual/en/using-erpnext/articles/__init__.py
similarity index 100%
copy from erpnext/manufacturing/page/bom_browser/__init__.py
copy to erpnext/docs/user/manual/en/using-erpnext/articles/__init__.py
diff --git a/erpnext/manufacturing/page/bom_browser/__init__.py b/erpnext/docs/user/manual/en/website/__init__.py
similarity index 100%
copy from erpnext/manufacturing/page/bom_browser/__init__.py
copy to erpnext/docs/user/manual/en/website/__init__.py
diff --git a/erpnext/manufacturing/page/bom_browser/__init__.py b/erpnext/docs/user/manual/en/website/articles/__init__.py
similarity index 100%
copy from erpnext/manufacturing/page/bom_browser/__init__.py
copy to erpnext/docs/user/manual/en/website/articles/__init__.py
diff --git a/erpnext/manufacturing/page/bom_browser/__init__.py b/erpnext/docs/user/manual/en/website/setup/__init__.py
similarity index 100%
copy from erpnext/manufacturing/page/bom_browser/__init__.py
copy to erpnext/docs/user/manual/en/website/setup/__init__.py
diff --git a/erpnext/manufacturing/page/bom_browser/__init__.py b/erpnext/docs/user/manual/es/__init__.py
similarity index 100%
copy from erpnext/manufacturing/page/bom_browser/__init__.py
copy to erpnext/docs/user/manual/es/__init__.py
diff --git a/erpnext/manufacturing/page/bom_browser/__init__.py b/erpnext/docs/user/manual/es/accounts/__init__.py
similarity index 100%
copy from erpnext/manufacturing/page/bom_browser/__init__.py
copy to erpnext/docs/user/manual/es/accounts/__init__.py
diff --git a/erpnext/manufacturing/page/bom_browser/__init__.py b/erpnext/docs/user/videos/__init__.py
similarity index 100%
copy from erpnext/manufacturing/page/bom_browser/__init__.py
copy to erpnext/docs/user/videos/__init__.py
diff --git a/erpnext/manufacturing/page/bom_browser/__init__.py b/erpnext/docs/user/videos/learn/__init__.py
similarity index 100%
copy from erpnext/manufacturing/page/bom_browser/__init__.py
copy to erpnext/docs/user/videos/learn/__init__.py
diff --git a/erpnext/fixtures/web_form.json b/erpnext/fixtures/web_form.json
deleted file mode 100644
index d8b79f3..0000000
--- a/erpnext/fixtures/web_form.json
+++ /dev/null
@@ -1,535 +0,0 @@
-[
- {
-  "allow_comments": 1, 
-  "allow_delete": 1, 
-  "allow_edit": 1, 
-  "allow_multiple": 1, 
-  "breadcrumbs": "[{\"title\":\"Collaborative Project Management\", \"name\":\"projects?project=Collaborative Project Management\"}]", 
-  "doc_type": "Task", 
-  "docstatus": 0, 
-  "doctype": "Web Form", 
-  "introduction_text": null, 
-  "is_standard": 1, 
-  "login_required": 1, 
-  "modified": "2016-03-30 01:27:27.469840", 
-  "name": "tasks", 
-  "page_name": "tasks", 
-  "published": 1, 
-  "success_message": null, 
-  "success_url": "/projects?project=Collaborative Project Management", 
-  "title": "Task", 
-  "web_form_fields": [
-   {
-    "default": null, 
-    "description": null, 
-    "fieldname": "project", 
-    "fieldtype": "Link", 
-    "hidden": 0, 
-    "label": "Project", 
-    "options": "Project", 
-    "read_only": 1, 
-    "reqd": 1
-   }, 
-   {
-    "default": null, 
-    "description": null, 
-    "fieldname": "subject", 
-    "fieldtype": "Data", 
-    "hidden": 0, 
-    "label": "Subject", 
-    "options": null, 
-    "read_only": 0, 
-    "reqd": 1
-   }, 
-   {
-    "default": null, 
-    "description": null, 
-    "fieldname": "status", 
-    "fieldtype": "Select", 
-    "hidden": 0, 
-    "label": "Status", 
-    "options": "Open\nClosed\nCancelled", 
-    "read_only": 0, 
-    "reqd": 0
-   }, 
-   {
-    "default": null, 
-    "description": null, 
-    "fieldname": "description", 
-    "fieldtype": "Text", 
-    "hidden": 0, 
-    "label": "Details", 
-    "options": null, 
-    "read_only": 0, 
-    "reqd": 0
-   }, 
-   {
-    "default": null, 
-    "description": null, 
-    "fieldname": "priority", 
-    "fieldtype": "Select", 
-    "hidden": 0, 
-    "label": "Priority", 
-    "options": "Low\nMedium\nHigh\nUrgent", 
-    "read_only": 0, 
-    "reqd": 0
-   }, 
-   {
-    "default": null, 
-    "description": null, 
-    "fieldname": "exp_start_date", 
-    "fieldtype": "Date", 
-    "hidden": 0, 
-    "label": "Expected Start Date", 
-    "options": null, 
-    "read_only": 0, 
-    "reqd": 0
-   }, 
-   {
-    "default": null, 
-    "description": null, 
-    "fieldname": "exp_end_date", 
-    "fieldtype": "Date", 
-    "hidden": 0, 
-    "label": "Expected End Date", 
-    "options": null, 
-    "read_only": 0, 
-    "reqd": 0
-   }
-  ], 
-  "web_page_link_text": null
- }, 
- {
-  "allow_comments": 0, 
-  "allow_delete": 1, 
-  "allow_edit": 0, 
-  "allow_multiple": 0, 
-  "breadcrumbs": "[{\"title\":\"Collaborative Project Management\", \"name\":\"project?project=Collaborative Project Management\"}]", 
-  "doc_type": "Time Log", 
-  "docstatus": 0, 
-  "doctype": "Web Form", 
-  "introduction_text": null, 
-  "is_standard": 0, 
-  "login_required": 1, 
-  "modified": "2016-03-30 01:28:00.061700", 
-  "name": "time-log", 
-  "page_name": "time-log", 
-  "published": 1, 
-  "success_message": null, 
-  "success_url": "/test?project=Collaborative Project Management", 
-  "title": "Time Log", 
-  "web_form_fields": [
-   {
-    "default": null, 
-    "description": null, 
-    "fieldname": "project", 
-    "fieldtype": "Link", 
-    "hidden": 0, 
-    "label": "Project", 
-    "options": "Project", 
-    "read_only": 1, 
-    "reqd": 1
-   }, 
-   {
-    "default": null, 
-    "description": null, 
-    "fieldname": "title", 
-    "fieldtype": "Data", 
-    "hidden": 0, 
-    "label": "Title", 
-    "options": null, 
-    "read_only": 1, 
-    "reqd": 0
-   }, 
-   {
-    "default": "Open", 
-    "description": null, 
-    "fieldname": "status", 
-    "fieldtype": "Select", 
-    "hidden": 0, 
-    "label": "Status", 
-    "options": "Open\nWorking\nPending Review\nClosed\nCancelled", 
-    "read_only": 1, 
-    "reqd": 1
-   }, 
-   {
-    "default": null, 
-    "description": null, 
-    "fieldname": "employee", 
-    "fieldtype": "Link", 
-    "hidden": 0, 
-    "label": "Employee", 
-    "options": "Employee", 
-    "read_only": 1, 
-    "reqd": 0
-   }, 
-   {
-    "default": null, 
-    "description": null, 
-    "fieldname": "from_time", 
-    "fieldtype": "Date", 
-    "hidden": 0, 
-    "label": "From Time", 
-    "options": null, 
-    "read_only": 1, 
-    "reqd": 1
-   }, 
-   {
-    "default": null, 
-    "description": null, 
-    "fieldname": "to_time", 
-    "fieldtype": "Date", 
-    "hidden": 0, 
-    "label": "To Time", 
-    "options": null, 
-    "read_only": 1, 
-    "reqd": 1
-   }, 
-   {
-    "default": "0", 
-    "description": null, 
-    "fieldname": "hours", 
-    "fieldtype": "Data", 
-    "hidden": 0, 
-    "label": "Hours", 
-    "options": null, 
-    "read_only": 1, 
-    "reqd": 0
-   }, 
-   {
-    "default": null, 
-    "description": "Will be updated when batched.", 
-    "fieldname": "time_log_batch", 
-    "fieldtype": "Link", 
-    "hidden": 0, 
-    "label": "Time Log Batch", 
-    "options": "Time Log Batch", 
-    "read_only": 0, 
-    "reqd": 0
-   }, 
-   {
-    "default": null, 
-    "description": null, 
-    "fieldname": "note", 
-    "fieldtype": "Text", 
-    "hidden": 0, 
-    "label": "Note", 
-    "options": null, 
-    "read_only": 1, 
-    "reqd": 0
-   }
-  ], 
-  "web_page_link_text": null
- }, 
- {
-  "allow_comments": 1, 
-  "allow_delete": 1, 
-  "allow_edit": 1, 
-  "allow_multiple": 1, 
-  "breadcrumbs": "[{\"title\":\"Issues\", \"name\":\"issues\"}]", 
-  "doc_type": "Issue", 
-  "docstatus": 0, 
-  "doctype": "Web Form", 
-  "introduction_text": null, 
-  "is_standard": 1, 
-  "login_required": 1, 
-  "modified": "2016-03-30 01:22:09.921515", 
-  "name": "issues", 
-  "page_name": "issues", 
-  "published": 1, 
-  "success_message": "", 
-  "success_url": "/issues", 
-  "title": "Issue", 
-  "web_form_fields": [
-   {
-    "default": null, 
-    "description": null, 
-    "fieldname": "subject", 
-    "fieldtype": "Data", 
-    "hidden": 0, 
-    "label": "Subject", 
-    "options": null, 
-    "read_only": 0, 
-    "reqd": 1
-   }, 
-   {
-    "default": "Open", 
-    "description": null, 
-    "fieldname": "status", 
-    "fieldtype": "Select", 
-    "hidden": 0, 
-    "label": "Status", 
-    "options": "Open\nReplied\nHold\nClosed", 
-    "read_only": 1, 
-    "reqd": 0
-   }, 
-   {
-    "default": null, 
-    "description": null, 
-    "fieldname": "description", 
-    "fieldtype": "Text", 
-    "hidden": 0, 
-    "label": "Description", 
-    "options": null, 
-    "read_only": 0, 
-    "reqd": 0
-   }, 
-   {
-    "default": null, 
-    "description": null, 
-    "fieldname": "attachment", 
-    "fieldtype": "Attach", 
-    "hidden": 0, 
-    "label": "Attachment", 
-    "options": null, 
-    "read_only": 0, 
-    "reqd": 0
-   }
-  ], 
-  "web_page_link_text": null
- }, 
- {
-  "allow_comments": 0, 
-  "allow_delete": 0, 
-  "allow_edit": 1, 
-  "allow_multiple": 1, 
-  "breadcrumbs": null, 
-  "doc_type": "Address", 
-  "docstatus": 0, 
-  "doctype": "Web Form", 
-  "introduction_text": null, 
-  "is_standard": 1, 
-  "login_required": 1, 
-  "modified": "2016-03-30 01:22:04.728685", 
-  "name": "addresses", 
-  "page_name": "addresses", 
-  "published": 1, 
-  "success_message": null, 
-  "success_url": "/addresses", 
-  "title": "Address", 
-  "web_form_fields": [
-   {
-    "default": null, 
-    "description": "", 
-    "fieldname": "address_title", 
-    "fieldtype": "Data", 
-    "hidden": 0, 
-    "label": "Address Title", 
-    "options": null, 
-    "read_only": 0, 
-    "reqd": 0
-   }, 
-   {
-    "default": null, 
-    "description": null, 
-    "fieldname": "address_type", 
-    "fieldtype": "Select", 
-    "hidden": 0, 
-    "label": "Address Type", 
-    "options": "Billing\nShipping\nOffice\nPersonal\nPlant\nPostal\nShop\nSubsidiary\nWarehouse\nOther", 
-    "read_only": 0, 
-    "reqd": 1
-   }, 
-   {
-    "default": null, 
-    "description": null, 
-    "fieldname": "address_line1", 
-    "fieldtype": "Data", 
-    "hidden": 0, 
-    "label": "Address Line 1", 
-    "options": null, 
-    "read_only": 0, 
-    "reqd": 1
-   }, 
-   {
-    "default": null, 
-    "description": null, 
-    "fieldname": "address_line2", 
-    "fieldtype": "Data", 
-    "hidden": 0, 
-    "label": "Address Line 2", 
-    "options": null, 
-    "read_only": 0, 
-    "reqd": 0
-   }, 
-   {
-    "default": null, 
-    "description": null, 
-    "fieldname": "city", 
-    "fieldtype": "Data", 
-    "hidden": 0, 
-    "label": "City/Town", 
-    "options": null, 
-    "read_only": 0, 
-    "reqd": 1
-   }, 
-   {
-    "default": null, 
-    "description": null, 
-    "fieldname": "state", 
-    "fieldtype": "Data", 
-    "hidden": 0, 
-    "label": "State", 
-    "options": null, 
-    "read_only": 0, 
-    "reqd": 0
-   }, 
-   {
-    "default": null, 
-    "description": null, 
-    "fieldname": "pincode", 
-    "fieldtype": "Data", 
-    "hidden": 0, 
-    "label": "Postal Code", 
-    "options": null, 
-    "read_only": 0, 
-    "reqd": 0
-   }, 
-   {
-    "default": null, 
-    "description": null, 
-    "fieldname": "country", 
-    "fieldtype": "Link", 
-    "hidden": 0, 
-    "label": "Country", 
-    "options": "Country", 
-    "read_only": 0, 
-    "reqd": 1
-   }, 
-   {
-    "default": null, 
-    "description": null, 
-    "fieldname": null, 
-    "fieldtype": "Column Break", 
-    "hidden": 0, 
-    "label": null, 
-    "options": null, 
-    "read_only": 0, 
-    "reqd": 0
-   }, 
-   {
-    "default": null, 
-    "description": null, 
-    "fieldname": "email_id", 
-    "fieldtype": "Data", 
-    "hidden": 0, 
-    "label": "Email Id", 
-    "options": null, 
-    "read_only": 0, 
-    "reqd": 0
-   }, 
-   {
-    "default": null, 
-    "description": null, 
-    "fieldname": "phone", 
-    "fieldtype": "Data", 
-    "hidden": 0, 
-    "label": "Phone", 
-    "options": null, 
-    "read_only": 0, 
-    "reqd": 1
-   }, 
-   {
-    "default": "0", 
-    "description": "", 
-    "fieldname": "is_primary_address", 
-    "fieldtype": "Check", 
-    "hidden": 0, 
-    "label": "Preferred Billing Address", 
-    "options": null, 
-    "read_only": 0, 
-    "reqd": 0
-   }, 
-   {
-    "default": "0", 
-    "description": "", 
-    "fieldname": "is_shipping_address", 
-    "fieldtype": "Check", 
-    "hidden": 0, 
-    "label": "Preferred Shipping Address", 
-    "options": null, 
-    "read_only": 0, 
-    "reqd": 0
-   }
-  ], 
-  "web_page_link_text": null
- }, 
- {
-  "allow_comments": 0, 
-  "allow_delete": 0, 
-  "allow_edit": 0, 
-  "allow_multiple": 0, 
-  "breadcrumbs": "[{\"title\":\"Jobs\", \"name\":\"jobs\"}]", 
-  "doc_type": "Job Applicant", 
-  "docstatus": 0, 
-  "doctype": "Web Form", 
-  "introduction_text": null, 
-  "is_standard": 0, 
-  "login_required": 0, 
-  "modified": "2016-03-30 01:21:57.425828", 
-  "name": "job_application", 
-  "page_name": "job_application", 
-  "published": 1, 
-  "success_message": "Thank you for applying.", 
-  "success_url": "/jobs", 
-  "title": "Job Applicant", 
-  "web_form_fields": [
-   {
-    "default": null, 
-    "description": null, 
-    "fieldname": "job_title", 
-    "fieldtype": "Data", 
-    "hidden": 0, 
-    "label": "Job Title", 
-    "options": "", 
-    "read_only": 1, 
-    "reqd": 0
-   }, 
-   {
-    "default": null, 
-    "description": null, 
-    "fieldname": "applicant_name", 
-    "fieldtype": "Data", 
-    "hidden": 0, 
-    "label": "Applicant Name", 
-    "options": null, 
-    "read_only": 0, 
-    "reqd": 1
-   }, 
-   {
-    "default": null, 
-    "description": null, 
-    "fieldname": "email_id", 
-    "fieldtype": "Data", 
-    "hidden": 0, 
-    "label": "Email Id", 
-    "options": "Email", 
-    "read_only": 0, 
-    "reqd": 0
-   }, 
-   {
-    "default": "Cover Letter/Message", 
-    "description": null, 
-    "fieldname": "message", 
-    "fieldtype": "Text", 
-    "hidden": 0, 
-    "label": "Message", 
-    "options": null, 
-    "read_only": 0, 
-    "reqd": 1
-   }, 
-   {
-    "default": null, 
-    "description": null, 
-    "fieldname": "upload_cv", 
-    "fieldtype": "Attach", 
-    "hidden": 0, 
-    "label": "Upload CV", 
-    "options": null, 
-    "read_only": 0, 
-    "reqd": 0
-   }
-  ], 
-  "web_page_link_text": null
- }
-]
\ No newline at end of file
diff --git a/erpnext/hooks.py b/erpnext/hooks.py
index 0c8de2a..047ec8d 100644
--- a/erpnext/hooks.py
+++ b/erpnext/hooks.py
@@ -33,6 +33,7 @@
 on_logout = "erpnext.shopping_cart.utils.clear_cart_count"
 
 remember_selected = ['Company', 'Cost Center', 'Project']
+treeviews = ['Account', 'Cost Center', 'Warehouse', 'Item Group', 'Customer Group', 'Sales Person', 'Territory']
 
 # website
 update_website_context = "erpnext.shopping_cart.utils.update_website_context"
@@ -180,3 +181,5 @@
 bot_parsers = [
 	'erpnext.utilities.bot.FindItemBot',
 ]
+
+get_site_info = 'erpnext.utilities.get_site_info'
diff --git a/erpnext/hr/doctype/job_opening/job_opening.json b/erpnext/hr/doctype/job_opening/job_opening.json
index 3cf1431..4556ed3 100644
--- a/erpnext/hr/doctype/job_opening/job_opening.json
+++ b/erpnext/hr/doctype/job_opening/job_opening.json
@@ -3,6 +3,7 @@
  "allow_import": 0, 
  "allow_rename": 0, 
  "autoname": "field:job_title", 
+ "beta": 0, 
  "creation": "2013-01-15 16:13:36", 
  "custom": 0, 
  "description": "Description of a Job Opening", 
@@ -63,6 +64,32 @@
    "allow_on_submit": 0, 
    "bold": 0, 
    "collapsible": 0, 
+   "depends_on": "publish", 
+   "fieldname": "route", 
+   "fieldtype": "Data", 
+   "hidden": 0, 
+   "ignore_user_permissions": 0, 
+   "ignore_xss_filter": 0, 
+   "in_filter": 0, 
+   "in_list_view": 0, 
+   "label": "Route", 
+   "length": 0, 
+   "no_copy": 0, 
+   "permlevel": 0, 
+   "precision": "", 
+   "print_hide": 0, 
+   "print_hide_if_no_value": 0, 
+   "read_only": 0, 
+   "report_hide": 0, 
+   "reqd": 0, 
+   "search_index": 0, 
+   "set_only_once": 0, 
+   "unique": 1
+  }, 
+  {
+   "allow_on_submit": 0, 
+   "bold": 0, 
+   "collapsible": 0, 
    "fieldname": "status", 
    "fieldtype": "Select", 
    "hidden": 0, 
@@ -108,71 +135,20 @@
    "search_index": 0, 
    "set_only_once": 0, 
    "unique": 0
-  }, 
-  {
-   "allow_on_submit": 0, 
-   "bold": 0, 
-   "collapsible": 0, 
-   "depends_on": "publish", 
-   "fieldname": "page_name", 
-   "fieldtype": "Data", 
-   "hidden": 0, 
-   "ignore_user_permissions": 0, 
-   "ignore_xss_filter": 0, 
-   "in_filter": 0, 
-   "in_list_view": 0, 
-   "label": "Page Name", 
-   "length": 0, 
-   "no_copy": 0, 
-   "permlevel": 0, 
-   "precision": "", 
-   "print_hide": 0, 
-   "print_hide_if_no_value": 0, 
-   "read_only": 0, 
-   "report_hide": 0, 
-   "reqd": 0, 
-   "search_index": 0, 
-   "set_only_once": 0, 
-   "unique": 0
-  }, 
-  {
-   "allow_on_submit": 0, 
-   "bold": 0, 
-   "collapsible": 0, 
-   "default": "jobs", 
-   "fieldname": "parent_website_route", 
-   "fieldtype": "Data", 
-   "hidden": 1, 
-   "ignore_user_permissions": 0, 
-   "ignore_xss_filter": 0, 
-   "in_filter": 0, 
-   "in_list_view": 0, 
-   "label": "Parent Website Route", 
-   "length": 0, 
-   "no_copy": 0, 
-   "permlevel": 0, 
-   "precision": "", 
-   "print_hide": 0, 
-   "print_hide_if_no_value": 0, 
-   "read_only": 0, 
-   "report_hide": 0, 
-   "reqd": 0, 
-   "search_index": 0, 
-   "set_only_once": 0, 
-   "unique": 0
   }
  ], 
  "hide_heading": 0, 
  "hide_toolbar": 0, 
  "icon": "icon-bookmark", 
  "idx": 1, 
+ "image_view": 0, 
  "in_create": 0, 
  "in_dialog": 0, 
  "is_submittable": 0, 
  "issingle": 0, 
  "istable": 0, 
  "max_attachments": 0, 
- "modified": "2016-03-02 01:44:28.280777", 
+ "modified": "2016-06-23 14:45:46.102129", 
  "modified_by": "Administrator", 
  "module": "HR", 
  "name": "Job Opening", 
@@ -199,7 +175,9 @@
    "write": 1
   }
  ], 
+ "quick_entry": 0, 
  "read_only": 0, 
  "read_only_onload": 0, 
- "sort_order": "ASC"
+ "sort_order": "ASC", 
+ "track_seen": 0
 }
\ No newline at end of file
diff --git a/erpnext/hr/doctype/job_opening/job_opening.py b/erpnext/hr/doctype/job_opening/job_opening.py
index acc40b7..267e7a8 100644
--- a/erpnext/hr/doctype/job_opening/job_opening.py
+++ b/erpnext/hr/doctype/job_opening/job_opening.py
@@ -17,9 +17,9 @@
 		condition_field = "publish",
 		page_title_field = "job_title",
 	)
-	
-	def get_route(self):
-		return 'jobs/' + quoted(self.page_name)
+
+	def make_route(self):
+		return 'jobs/' + self.scrub(self.job_title)
 
 	def get_context(self, context):
 		context.parents = [{'name': 'jobs', 'title': _('All Jobs') }]
diff --git a/erpnext/manufacturing/doctype/bom/bom.js b/erpnext/manufacturing/doctype/bom/bom.js
index 6f45ff2..de8ac94 100644
--- a/erpnext/manufacturing/doctype/bom/bom.js
+++ b/erpnext/manufacturing/doctype/bom/bom.js
@@ -24,7 +24,7 @@
 				frm.events.update_cost(frm);
 			});
 			frm.add_custom_button(__("Browse BOM"), function() {
-				frappe.set_route("bom-browser", frm.doc.name);
+				frappe.set_route("Tree", "BOM");
 			});
 		}
 
diff --git a/erpnext/manufacturing/doctype/bom/bom.py b/erpnext/manufacturing/doctype/bom/bom.py
index 6730141..287ee9b 100644
--- a/erpnext/manufacturing/doctype/bom/bom.py
+++ b/erpnext/manufacturing/doctype/bom/bom.py
@@ -438,3 +438,14 @@
 	if item and not (bom.item.lower() == item.lower() or \
 		bom.item.lower() == cstr(frappe.db.get_value("Item", item, "variant_of")).lower()):
 		frappe.throw(_("BOM {0} does not belong to Item {1}").format(bom_no, item))
+
+@frappe.whitelist()
+def get_children(parent=None):
+	if parent:
+		return frappe.db.sql("""select item_code,
+			bom_no as value, qty,
+			if(ifnull(bom_no, "")!="", 1, 0) as expandable
+			from `tabBOM Item`
+			where parent=%s
+			order by idx
+			""", parent, as_dict=True)
\ No newline at end of file
diff --git a/erpnext/manufacturing/doctype/bom/bom_tree.js b/erpnext/manufacturing/doctype/bom/bom_tree.js
new file mode 100644
index 0000000..0404360
--- /dev/null
+++ b/erpnext/manufacturing/doctype/bom/bom_tree.js
@@ -0,0 +1,35 @@
+frappe.treeview_settings["BOM"] = {
+	get_tree_nodes: 'erpnext.manufacturing.doctype.bom.bom.get_children',
+	filters: [
+		{
+			fieldname: "bom",
+			fieldtype:"Link",
+			options: "BOM",
+			label: __("BOM")
+		}
+	],
+	title: "BOM",
+	breadcrumb: "Manufacturing",
+	disable_add_node: true,
+	root_label: "bom", //fieldname from filters
+	get_label: function(node) {
+		if(node.data.qty) {
+			return node.data.qty + " x " + node.data.item_code;
+		} else {
+			return node.data.item_code || node.data.value;
+		}
+	},
+	toolbar: [
+		{toggle_btn: true},
+		{
+			label:__("Edit"),
+			condition: function(node) {
+				return node.expandable;
+			},
+			click: function(node) {
+				
+				frappe.set_route("Form", "BOM", node.data.value);
+			}
+		}
+	],
+}
\ No newline at end of file
diff --git a/erpnext/manufacturing/doctype/production_planning_tool/production_planning_tool.py b/erpnext/manufacturing/doctype/production_planning_tool/production_planning_tool.py
index 7ef1d6a..4770781 100644
--- a/erpnext/manufacturing/doctype/production_planning_tool/production_planning_tool.py
+++ b/erpnext/manufacturing/doctype/production_planning_tool/production_planning_tool.py
@@ -449,9 +449,12 @@
 					"transaction_date": nowdate(),
 					"status": "Draft",
 					"company": self.company,
-					"requested_by": frappe.session.user,
-					"material_request_type": "Purchase"
+					"requested_by": frappe.session.user
 				})
+				if item_wrapper.default_bom:
+					material_request.update({"material_request_type": "Manufacture"}) 
+				else:
+					material_request.update({"material_request_type": "Purchase"})
 				for sales_order, requested_qty in items_to_be_requested[item].items():
 					material_request.append("items", {
 						"doctype": "Material Request Item",
diff --git a/erpnext/manufacturing/page/bom_browser/bom_browser.js b/erpnext/manufacturing/page/bom_browser/bom_browser.js
deleted file mode 100644
index 3c13905..0000000
--- a/erpnext/manufacturing/page/bom_browser/bom_browser.js
+++ /dev/null
@@ -1,89 +0,0 @@
-// Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors
-// License: GNU General Public License v3. See license.txt
-
-frappe.pages['bom-browser'].on_page_load = function(wrapper) {
-	var page = frappe.ui.make_app_page({
-		parent: wrapper,
-		title: 'BOM Browser',
-		single_column: true
-	});
-
-	page.main.css({
-		"min-height": "300px",
-		"padding-bottom": "25px"
-	});
-
-	page.tree_area = $('<div class="padding"><p class="text-muted">'+
-		__("Select BOM to start")
-		+'</p></div>').appendTo(page.main);
-
-	frappe.breadcrumbs.add(frappe.breadcrumbs.last_module || "Manufacturing");
-
-	var make_tree = function() {
-		erpnext.bom_tree = new erpnext.BOMTree(page.$bom_select.val(), page, page.tree_area);
-	}
-
-	page.$bom_select = wrapper.page.add_field({fieldname: "bom",
-		fieldtype:"Link", options: "BOM", label: __("BOM")}).$input
-		.change(function() {
-			make_tree();
-		});
-
-	page.set_secondary_action(__('Refresh'), function() {
-		make_tree();
-	});
-}
-
-
-frappe.pages['bom-browser'].on_page_show = function(wrapper){
-	// set from route
-	var bom = null;
-	if(frappe.get_route()[1]) {
-		var bom = frappe.get_route().splice(1).join("/");
-	}
-	if(frappe.route_options && frappe.route_options.bom) {
-		var bom = frappe.route_options.bom;
-	}
-	if(bom) {
-		wrapper.page.$bom_select.val(bom).trigger("change");
-	}
-};
-
-erpnext.BOMTree = Class.extend({
-	init: function(root, page, parent) {
-		$(parent).empty();
-		var me = this;
-		me.page = page;
-		me.bom = page.$bom_select.val();
-		me.can_read = frappe.model.can_read("BOM");
-		me.can_create = frappe.boot.user.can_create.indexOf("BOM") !== -1 ||
-					frappe.boot.user.in_create.indexOf("BOM") !== -1;
-		me.can_write = frappe.model.can_write("BOM");
-		me.can_delete = frappe.model.can_delete("BOM");
-		this.tree = new frappe.ui.Tree({
-			parent: $(parent),
-			label: me.bom,
-			args: {parent: me.bom},
-			method: 'erpnext.manufacturing.page.bom_browser.bom_browser.get_children',
-			toolbar: [
-				{toggle_btn: true},
-				{
-					label:__("Edit"),
-					condition: function(node) {
-						return node.expandable;
-					},
-					click: function(node) {
-						frappe.set_route("Form", "BOM", node.data.value);
-					}
-				}
-			],
-			get_label: function(node) {
-				if(node.data.qty) {
-					return node.data.qty + " x " + node.data.item_code;
-				} else {
-					return node.data.item_code || node.data.value;
-				}
-			}
-		});
-	}
-});
diff --git a/erpnext/manufacturing/page/bom_browser/bom_browser.json b/erpnext/manufacturing/page/bom_browser/bom_browser.json
deleted file mode 100644
index 5b75463..0000000
--- a/erpnext/manufacturing/page/bom_browser/bom_browser.json
+++ /dev/null
@@ -1,21 +0,0 @@
-{
- "content": null, 
- "creation": "2015-05-25 02:57:33.472044", 
- "docstatus": 0, 
- "doctype": "Page", 
- "modified": "2015-05-25 02:57:33.472044", 
- "modified_by": "Administrator", 
- "module": "Manufacturing", 
- "name": "bom-browser", 
- "owner": "Administrator", 
- "page_name": "bom-browser", 
- "roles": [
-  {
-   "role": "Manufacturing User"
-  }
- ], 
- "script": null, 
- "standard": "Yes", 
- "style": null, 
- "title": "BOM Browser"
-}
\ No newline at end of file
diff --git a/erpnext/manufacturing/page/bom_browser/bom_browser.py b/erpnext/manufacturing/page/bom_browser/bom_browser.py
deleted file mode 100644
index 8099389..0000000
--- a/erpnext/manufacturing/page/bom_browser/bom_browser.py
+++ /dev/null
@@ -1,15 +0,0 @@
-# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors
-# License: GNU General Public License v3. See license.txt
-
-from __future__ import unicode_literals
-import frappe
-
-@frappe.whitelist()
-def get_children(parent):
-	return frappe.db.sql("""select item_code,
-		bom_no as value, qty,
-		if(ifnull(bom_no, "")!="", 1, 0) as expandable
-		from `tabBOM Item`
-		where parent=%s
-		order by idx
-		""", parent, as_dict=True)
diff --git a/erpnext/patches.txt b/erpnext/patches.txt
index e3aa04b..23f041c 100644
--- a/erpnext/patches.txt
+++ b/erpnext/patches.txt
@@ -271,3 +271,7 @@
 execute:frappe.db.sql('update tabQuotation set status="Cancelled" where docstatus=2')
 execute:frappe.rename_doc("DocType", "Payments", "Sales Invoice Payment", force=True)
 erpnext.patches.v7_0.update_mins_to_first_response
+erpnext.patches.v6_20x.repost_valuation_rate_for_negative_inventory
+erpnext.patches.v7_0.re_route
+erpnext.patches.v7_0.create_warehouse_nestedset
+erpnext.patches.v7_0.system_settings_setup_complete
diff --git a/erpnext/patches/v4_2/default_website_style.py b/erpnext/patches/v4_2/default_website_style.py
index e9f2cb9..cdf0a7a 100644
--- a/erpnext/patches/v4_2/default_website_style.py
+++ b/erpnext/patches/v4_2/default_website_style.py
@@ -1,6 +1,6 @@
 from __future__ import unicode_literals
 import frappe
-from frappe.templates.pages.style_settings import default_properties
+from frappe.www.style_settings import default_properties
 
 def execute():
 	frappe.reload_doc('website', 'doctype', 'style_settings')
diff --git a/erpnext/patches/v6_20x/repost_valuation_rate_for_negative_inventory.py b/erpnext/patches/v6_20x/repost_valuation_rate_for_negative_inventory.py
new file mode 100644
index 0000000..8369fea
--- /dev/null
+++ b/erpnext/patches/v6_20x/repost_valuation_rate_for_negative_inventory.py
@@ -0,0 +1,11 @@
+# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
+# License: GNU General Public License v3. See license.txt
+
+from __future__ import unicode_literals
+import frappe
+from frappe.utils import cint
+from erpnext.stock.stock_balance import repost
+
+def execute():
+	if cint(frappe.db.get_value("Stock Settings", None, "allow_negative_stock")):
+		repost(only_actual=True)
\ No newline at end of file
diff --git a/erpnext/patches/v6_5/show_in_website_for_template_item.py b/erpnext/patches/v6_5/show_in_website_for_template_item.py
index 48040ee..af6e830 100644
--- a/erpnext/patches/v6_5/show_in_website_for_template_item.py
+++ b/erpnext/patches/v6_5/show_in_website_for_template_item.py
@@ -9,7 +9,7 @@
 		item = frappe.get_doc("Item", item_code)
 		item.db_set("show_in_website", 1, update_modified=False)
 
-		item.get_route()
-		item.db_set("page_name", item.page_name, update_modified=False)
+		item.make_route()
+		item.db_set("route", item.route, update_modified=False)
 
 	frappe.website.render.clear_cache()
diff --git a/erpnext/patches/v7_0/create_warehouse_nestedset.py b/erpnext/patches/v7_0/create_warehouse_nestedset.py
new file mode 100644
index 0000000..80dbf2e
--- /dev/null
+++ b/erpnext/patches/v7_0/create_warehouse_nestedset.py
@@ -0,0 +1,48 @@
+import frappe
+from frappe import _
+
+def execute():
+	frappe.reload_doc("stock", "doctype", "warehouse")
+	
+	for company in frappe.get_all("Company", fields=["name", "abbr"]):
+		if not frappe.db.get_value("Warehouse", "{0} - {1}".format(_("All Warehouses"), company.abbr)):
+			create_default_warehouse_group(company)
+		
+		for warehouse in frappe.get_all("Warehouse", filters={"company": company.name}, fields=["name", "create_account_under",
+			"parent_warehouse", "is_group"]):
+			set_parent_to_warehouses(warehouse, company)
+			set_parent_to_warehouse_acounts(warehouse, company)
+
+def set_parent_to_warehouses(warehouse, company):
+	warehouse = frappe.get_doc("Warehouse", warehouse.name)
+	warehouse.is_group = "Yes" if warehouse.is_group == "Yes" else "No"
+	
+	if not warehouse.parent_warehouse and warehouse.name != "{0} - {1}".format(_("All Warehouses"), company.abbr):
+		warehouse.parent_warehouse = "{0} - {1}".format(_("All Warehouses"), company.abbr)
+	
+	warehouse.save(ignore_permissions=True)
+
+def set_parent_to_warehouse_acounts(warehouse, company):
+	account = frappe.db.get_value("Account", {"warehouse": warehouse.name})
+	stock_group = frappe.db.get_value("Account", {"account_type": "Stock",
+		"is_group": 1, "company": company.name})
+
+	if account and account != "{0} - {1}".format(_("All Warehouses"), company.abbr):
+		account = frappe.get_doc("Account", account)
+		
+		if warehouse.create_account_under == stock_group or not warehouse.create_account_under:
+			if not warehouse.parent_warehouse:
+				account.parent_account = "{0} - {1}".format(_("All Warehouses"), company.abbr)
+			else:
+				account.parent_account = frappe.db.get_value("Account", warehouse.parent_warehouse)
+
+		account.save(ignore_permissions=True)
+
+def create_default_warehouse_group(company):
+	frappe.get_doc({
+		"doctype": "Warehouse",
+		"warehouse_name": _("All Warehouses"),
+		"is_group": "Yes",
+		"company": company.name,
+		"parent_warehouse": ""
+	}).insert(ignore_permissions=True)
\ No newline at end of file
diff --git a/erpnext/patches/v7_0/re_route.py b/erpnext/patches/v7_0/re_route.py
new file mode 100644
index 0000000..1db4920
--- /dev/null
+++ b/erpnext/patches/v7_0/re_route.py
@@ -0,0 +1,4 @@
+from frappe.patches.v7_0.re_route import update_routes
+
+def execute():
+	update_routes(['Item', 'Item Group', 'Sales Partner', 'Job Opening'])
\ No newline at end of file
diff --git a/erpnext/patches/v7_0/system_settings_setup_complete.py b/erpnext/patches/v7_0/system_settings_setup_complete.py
new file mode 100644
index 0000000..0feeee9
--- /dev/null
+++ b/erpnext/patches/v7_0/system_settings_setup_complete.py
@@ -0,0 +1,16 @@
+from __future__ import unicode_literals
+import frappe
+
+def execute():
+	frappe.reload_doctype('System Settings')
+	companies = frappe.db.sql("""select name, country
+		from tabCompany order by creation asc""", as_dict=True)
+	if companies:
+		frappe.db.set_value('System Settings', 'System Settings', 'setup_complete', 1)
+
+	for company in companies:
+		if company.country:
+			frappe.db.set_value('System Settings', 'System Settings', 'country', company.country)
+			break
+
+
diff --git a/erpnext/projects/doctype/project/project.py b/erpnext/projects/doctype/project/project.py
index 65b19b0..dbe2eb3 100644
--- a/erpnext/projects/doctype/project/project.py
+++ b/erpnext/projects/doctype/project/project.py
@@ -15,7 +15,7 @@
 
 	def onload(self):
 		"""Load project tasks for quick view"""
-		if not self.get("tasks"):
+		if not self.get('__unsaved') and not self.get("tasks"):
 			for task in self.get_tasks():
 				self.append("tasks", {
 					"title": task.subject,
diff --git a/erpnext/manufacturing/page/bom_browser/__init__.py b/erpnext/projects/web_form/__init__.py
similarity index 100%
copy from erpnext/manufacturing/page/bom_browser/__init__.py
copy to erpnext/projects/web_form/__init__.py
diff --git a/erpnext/manufacturing/page/bom_browser/__init__.py b/erpnext/projects/web_form/tasks/__init__.py
similarity index 100%
copy from erpnext/manufacturing/page/bom_browser/__init__.py
copy to erpnext/projects/web_form/tasks/__init__.py
diff --git a/erpnext/projects/web_form/tasks/tasks.js b/erpnext/projects/web_form/tasks/tasks.js
new file mode 100644
index 0000000..699703c
--- /dev/null
+++ b/erpnext/projects/web_form/tasks/tasks.js
@@ -0,0 +1,3 @@
+frappe.ready(function() {
+	// bind events here
+})
\ No newline at end of file
diff --git a/erpnext/projects/web_form/tasks/tasks.json b/erpnext/projects/web_form/tasks/tasks.json
new file mode 100644
index 0000000..912b4c4
--- /dev/null
+++ b/erpnext/projects/web_form/tasks/tasks.json
@@ -0,0 +1,84 @@
+{
+ "allow_comments": 1, 
+ "allow_delete": 1, 
+ "allow_edit": 1, 
+ "allow_multiple": 1, 
+ "breadcrumbs": "[{\"title\":\"Tasks\", \"name\":\"tasks\"}]", 
+ "creation": "2016-06-24 15:50:33.091287", 
+ "doc_type": "Task", 
+ "docstatus": 0, 
+ "doctype": "Web Form", 
+ "idx": 0, 
+ "is_standard": 1, 
+ "login_required": 1, 
+ "modified": "2016-06-24 16:11:10.935835", 
+ "modified_by": "Administrator", 
+ "module": "Projects", 
+ "name": "tasks", 
+ "owner": "Administrator", 
+ "published": 1, 
+ "route": "tasks", 
+ "success_url": "/projects?project=Collaborative Project Management", 
+ "title": "Task", 
+ "web_form_fields": [
+  {
+   "fieldname": "project", 
+   "fieldtype": "Link", 
+   "hidden": 0, 
+   "label": "Project", 
+   "options": "Project", 
+   "read_only": 1, 
+   "reqd": 1
+  }, 
+  {
+   "fieldname": "subject", 
+   "fieldtype": "Data", 
+   "hidden": 0, 
+   "label": "Subject", 
+   "read_only": 0, 
+   "reqd": 1
+  }, 
+  {
+   "fieldname": "status", 
+   "fieldtype": "Select", 
+   "hidden": 0, 
+   "label": "Status", 
+   "options": "Open\nClosed\nCancelled", 
+   "read_only": 0, 
+   "reqd": 0
+  }, 
+  {
+   "fieldname": "description", 
+   "fieldtype": "Text", 
+   "hidden": 0, 
+   "label": "Details", 
+   "read_only": 0, 
+   "reqd": 0
+  }, 
+  {
+   "fieldname": "priority", 
+   "fieldtype": "Select", 
+   "hidden": 0, 
+   "label": "Priority", 
+   "options": "Low\nMedium\nHigh\nUrgent", 
+   "read_only": 0, 
+   "reqd": 0
+  }, 
+  {
+   "fieldname": "exp_start_date", 
+   "fieldtype": "Date", 
+   "hidden": 0, 
+   "label": "Expected Start Date", 
+   "read_only": 0, 
+   "reqd": 0
+  }, 
+  {
+   "fieldname": "exp_end_date", 
+   "fieldtype": "Date", 
+   "hidden": 0, 
+   "label": "Expected End Date", 
+   "read_only": 0, 
+   "reqd": 0
+  }
+ ]
+}
\ No newline at end of file
diff --git a/erpnext/projects/web_form/tasks/tasks.py b/erpnext/projects/web_form/tasks/tasks.py
new file mode 100644
index 0000000..2334f8b
--- /dev/null
+++ b/erpnext/projects/web_form/tasks/tasks.py
@@ -0,0 +1,7 @@
+from __future__ import unicode_literals
+
+import frappe
+
+def get_context(context):
+	# do your magic here
+	pass
diff --git a/erpnext/public/js/conf.js b/erpnext/public/js/conf.js
index d8133ce..233bd2e 100644
--- a/erpnext/public/js/conf.js
+++ b/erpnext/public/js/conf.js
@@ -20,12 +20,12 @@
 
 // doctypes created via tree
 $.extend(frappe.create_routes, {
-	"Customer Group": "Sales Browser/Customer Group",
-	"Territory": "Sales Browser/Territory",
-	"Item Group": "Sales Browser/Item Group",
-	"Sales Person": "Sales Browser/Sales Person",
-	"Account": "Accounts Browser/Account",
-	"Cost Center": "Accounts Browser/Cost Center"
+	"Customer Group": "Tree/Customer Group",
+	"Territory": "Tree/Territory",
+	"Item Group": "Tree/Item Group",
+	"Sales Person": "Tree/Sales Person",
+	"Account": "Tree/Account",
+	"Cost Center": "Tree/Cost Center"
 });
 
 // preferred modules for breadcrumbs
diff --git a/erpnext/public/js/queries.js b/erpnext/public/js/queries.js
index 12307fb..acc0409 100644
--- a/erpnext/public/js/queries.js
+++ b/erpnext/public/js/queries.js
@@ -71,7 +71,11 @@
 
 	warehouse: function(doc) {
 		return {
-			filters: [["Warehouse", "company", "in", ["", cstr(doc.company)]]]
+			filters: [
+				["Warehouse", "company", "in", ["", cstr(doc.company)]],
+				["Warehouse", "is_group", "=", "No"]
+				
+			]
 		}
 	}
 });
diff --git a/erpnext/selling/doctype/sales_order/sales_order.py b/erpnext/selling/doctype/sales_order/sales_order.py
index 060ed62..2e0a272 100644
--- a/erpnext/selling/doctype/sales_order/sales_order.py
+++ b/erpnext/selling/doctype/sales_order/sales_order.py
@@ -153,7 +153,7 @@
 		self.check_credit_limit()
 		self.update_reserved_qty()
 
-		frappe.get_doc('Authorization Control').validate_approving_authority(self.doctype, self.base_grand_total, self)
+		frappe.get_doc('Authorization Control').validate_approving_authority(self.doctype, self.company, self.base_grand_total, self)
 
 		self.update_prevdoc_status('submit')
 
diff --git a/erpnext/selling/page/sales_browser/README.md b/erpnext/selling/page/sales_browser/README.md
deleted file mode 100644
index d6a20e1..0000000
--- a/erpnext/selling/page/sales_browser/README.md
+++ /dev/null
@@ -1 +0,0 @@
-Tree editor for Territory, Customer Group, Item Group, Sales Partner
\ No newline at end of file
diff --git a/erpnext/selling/page/sales_browser/__init__.py b/erpnext/selling/page/sales_browser/__init__.py
deleted file mode 100644
index baffc48..0000000
--- a/erpnext/selling/page/sales_browser/__init__.py
+++ /dev/null
@@ -1 +0,0 @@
-from __future__ import unicode_literals
diff --git a/erpnext/selling/page/sales_browser/sales_browser.js b/erpnext/selling/page/sales_browser/sales_browser.js
deleted file mode 100644
index a99fe72..0000000
--- a/erpnext/selling/page/sales_browser/sales_browser.js
+++ /dev/null
@@ -1,166 +0,0 @@
-// Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors
-// License: GNU General Public License v3. See license.txt
-
-frappe.pages["Sales Browser"].on_page_load = function(wrapper){
-	var page = frappe.ui.make_app_page({
-		parent: wrapper,
-		single_column: true,
-	});
-
-	wrapper.page.add_menu_item(__('Refresh'), function() {
-			wrapper.make_tree();
-		});
-
-	wrapper.make_tree = function() {
-		var ctype = frappe.get_route()[1] || 'Territory';
-		return frappe.call({
-			method: 'erpnext.selling.page.sales_browser.sales_browser.get_children',
-			args: {ctype: ctype},
-			callback: function(r) {
-				var root = r.message[0]["value"];
-				erpnext.sales_chart = new erpnext.SalesChart(ctype, root, page,
-					page.main.css({
-						"min-height": "300px",
-						"padding-bottom": "25px"
-					}));
-			}
-		});
-	}
-
-	wrapper.make_tree();
-}
-
-frappe.pages['Sales Browser'].on_page_show = function(wrapper){
-	// set route
-	var ctype = frappe.get_route()[1] || 'Territory';
-
-	wrapper.page.set_title(__('{0} Tree',[__(ctype)]));
-
-	if(erpnext.sales_chart && erpnext.sales_chart.ctype != ctype) {
-		wrapper.make_tree();
-	}
-
-	frappe.breadcrumbs.add(frappe.breadcrumbs.last_module || "Selling");
-};
-
-erpnext.SalesChart = Class.extend({
-	init: function(ctype, root, page, parent) {
-		$(parent).empty();
-		var me = this;
-		me.ctype = ctype;
-		me.page = page;
-		me.can_read = frappe.model.can_read(this.ctype);
-		me.can_create = frappe.boot.user.can_create.indexOf(this.ctype) !== -1 ||
-					frappe.boot.user.in_create.indexOf(this.ctype) !== -1;
-		me.can_write = frappe.model.can_write(this.ctype);
-		me.can_delete = frappe.model.can_delete(this.ctype);
-
-		me.page.set_primary_action(__("New"), function() {
-			me.new_node();
-		}, "octicon octicon-plus");
-
-		this.tree = new frappe.ui.Tree({
-			parent: $(parent),
-			label: __(root),
-			args: {ctype: ctype},
-			method: 'erpnext.selling.page.sales_browser.sales_browser.get_children',
-			toolbar: [
-				{toggle_btn: true},
-				{
-					label:__("Edit"),
-					condition: function(node) {
-						return !node.root && me.can_read;
-					},
-					click: function(node) {
-						frappe.set_route("Form", me.ctype, node.label);
-					}
-				},
-				{
-					label:__("Add Child"),
-					condition: function(node) { return me.can_create && node.expandable; },
-					click: function(node) {
-						me.new_node();
-					},
-					btnClass: "hidden-xs"
-				},
-				{
-					label:__("Rename"),
-					condition: function(node) { return !node.root && me.can_write; },
-					click: function(node) {
-						frappe.model.rename_doc(me.ctype, node.label, function(new_name) {
-							node.$a.html(new_name);
-						});
-					},
-					btnClass: "hidden-xs"
-				},
-				{
-					label:__("Delete"),
-					condition: function(node) { return !node.root && me.can_delete; },
-					click: function(node) {
-						frappe.model.delete_doc(me.ctype, node.label, function() {
-							node.parent.remove();
-						});
-					},
-					btnClass: "hidden-xs"
-				}
-
-			]
-		});
-	},
-	new_node: function() {
-		var me = this;
-		var node = me.tree.get_selected_node();
-
-		if(!(node && node.expandable)) {
-			frappe.msgprint(__("Select a group node first."));
-			return;
-		}
-
-		var fields = [
-			{fieldtype:'Data', fieldname: 'name_field',
-				label:__('New {0} Name',[__(me.ctype)]), reqd:true},
-			{fieldtype:'Select', fieldname:'is_group', label:__('Group Node'), options:'No\nYes',
-				description: __("Further nodes can be only created under 'Group' type nodes")}
-		]
-
-		if(me.ctype == "Sales Person") {
-			fields.splice(-1, 0, {fieldtype:'Link', fieldname:'employee', label:__('Employee'),
-				options:'Employee', description: __("Please enter Employee Id of this sales person")});
-		}
-
-		// the dialog
-		var d = new frappe.ui.Dialog({
-			title: __('New {0}',[__(me.ctype)]),
-			fields: fields
-		})
-
-		d.set_value("is_group", "No");
-		// create
-		d.set_primary_action(__("Create New"), function() {
-			var btn = this;
-			var v = d.get_values();
-			if(!v) return;
-
-			var node = me.tree.get_selected_node();
-
-			v.parent = node.label;
-			v.ctype = me.ctype;
-
-			return frappe.call({
-				method: 'erpnext.selling.page.sales_browser.sales_browser.add_node',
-				args: v,
-				callback: function(r) {
-					if(!r.exc) {
-						d.hide();
-						if(node.expanded) {
-							node.toggle_node();
-						}
-						node.reload();
-					}
-				}
-			});
-		});
-
-		d.show();
-	},
-});
diff --git a/erpnext/selling/page/sales_browser/sales_browser.json b/erpnext/selling/page/sales_browser/sales_browser.json
deleted file mode 100644
index 54cac65..0000000
--- a/erpnext/selling/page/sales_browser/sales_browser.json
+++ /dev/null
@@ -1,37 +0,0 @@
-{
- "creation": "2012-06-14 15:07:26.000000",
- "docstatus": 0,
- "doctype": "Page",
- "icon": "icon-sitemap",
- "idx": 1,
- "modified": "2013-07-11 14:43:56.000000",
- "modified_by": "Administrator",
- "module": "Selling",
- "name": "sales-browser",
- "owner": "Administrator",
- "page_name": "Sales Browser",
- "roles": [
-  {
-   "role": "Sales Master Manager"
-  },
-  {
-   "role": "Material Master Manager"
-  },
-  {
-   "role": "Accounts Manager"
-  },
-  {
-   "role": "Sales Master Manager"
-  },
-  {
-   "role": "Purchase Manager"
-  },
-  {
-   "role": "Purchase Master Manager"
-  },
-  {
-   "role": "Material Manager"
-  }
- ],
- "standard": "Yes"
-}
diff --git a/erpnext/selling/page/sales_browser/sales_browser.py b/erpnext/selling/page/sales_browser/sales_browser.py
deleted file mode 100644
index 018ba3b..0000000
--- a/erpnext/selling/page/sales_browser/sales_browser.py
+++ /dev/null
@@ -1,37 +0,0 @@
-# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors
-# License: GNU General Public License v3. See license.txt
-
-from __future__ import unicode_literals
-import frappe
-
-
-@frappe.whitelist()
-def get_children():
-	ctype = frappe.local.form_dict.get('ctype')
-	parent_field = 'parent_' + ctype.lower().replace(' ', '_')
-	parent = frappe.form_dict.get("parent") or ""
-
-	return frappe.db.sql("""select name as value,
-		if(is_group='Yes', 1, 0) as expandable
-		from `tab{ctype}`
-		where docstatus < 2
-		and ifnull(`{parent_field}`,'') = %s
-		order by name""".format(ctype=frappe.db.escape(ctype), parent_field=frappe.db.escape(parent_field)),
-		parent, as_dict=1)
-
-@frappe.whitelist()
-def add_node():
-	ctype = frappe.form_dict.get('ctype')
-	parent_field = 'parent_' + ctype.lower().replace(' ', '_')
-	name_field = ctype.lower().replace(' ', '_') + '_name'
-
-	doc = frappe.new_doc(ctype)
-	doc.update({
-		name_field: frappe.form_dict['name_field'],
-		parent_field: frappe.form_dict['parent'],
-		"is_group": frappe.form_dict['is_group']
-	})
-	if ctype == "Sales Person":
-		doc.employee = frappe.form_dict.get('employee')
-
-	doc.save()
diff --git a/erpnext/setup/doctype/company/company.js b/erpnext/setup/doctype/company/company.js
index dfa6c0a..2a18286 100644
--- a/erpnext/setup/doctype/company/company.js
+++ b/erpnext/setup/doctype/company/company.js
@@ -18,11 +18,11 @@
 				!frm.doc.__onload.transactions_exist));
 
 			frm.add_custom_button(__('Cost Centers'), function() {
-				frappe.set_route('Accounts Browser', 'Cost Center', {'company': frm.doc.name})
+				frappe.set_route('Tree', 'Cost Center', {'company': frm.doc.name})
 			})
 
 			frm.add_custom_button(__('Chart of Accounts'), function() {
-				frappe.set_route('Accounts Browser', 'Account', {'company': frm.doc.name})
+				frappe.set_route('Tree', 'Account', {'company': frm.doc.name})
 			})
 		}
 
diff --git a/erpnext/setup/doctype/company/company.py b/erpnext/setup/doctype/company/company.py
index 7da7c25..7d88297 100644
--- a/erpnext/setup/doctype/company/company.py
+++ b/erpnext/setup/doctype/company/company.py
@@ -87,15 +87,23 @@
 				.format(self.country.lower()))(self)
 
 	def create_default_warehouses(self):
-		for whname in (_("Stores"), _("Work In Progress"), _("Finished Goods")):
-			if not frappe.db.exists("Warehouse", whname + " - " + self.abbr):
+		for wh_detail in [
+			{"warehouse_name": _("All Warehouses"), "is_group": "Yes"},
+			{"warehouse_name": _("Stores"), "is_group": "No"},
+			{"warehouse_name": _("Work In Progress"), "is_group": "No"},
+			{"warehouse_name": _("Finished Goods"), "is_group": "No"}]:
+			
+			if not frappe.db.exists("Warehouse", "{0} - {1}".format(wh_detail["warehouse_name"], self.abbr)):
 				stock_group = frappe.db.get_value("Account", {"account_type": "Stock",
 					"is_group": 1, "company": self.name})
 				if stock_group:
 					warehouse = frappe.get_doc({
 						"doctype":"Warehouse",
-						"warehouse_name": whname,
+						"warehouse_name": wh_detail["warehouse_name"],
+						"is_group": wh_detail["is_group"],
 						"company": self.name,
+						"parent_warehouse": "{0} - {1}".format(_("All Warehouses"), self.abbr) \
+							if wh_detail["is_group"] == "No" else "",
 						"create_account_under": stock_group
 					})
 					warehouse.flags.ignore_permissions = True
diff --git a/erpnext/setup/doctype/customer_group/customer_group.js b/erpnext/setup/doctype/customer_group/customer_group.js
index 7a5d2fa..654abd9 100644
--- a/erpnext/setup/doctype/customer_group/customer_group.js
+++ b/erpnext/setup/doctype/customer_group/customer_group.js
@@ -1,7 +1,6 @@
 // Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors
 // License: GNU General Public License v3. See license.txt
 
-cur_frm.list_route = "Sales Browser/Customer Group";
 
 cur_frm.cscript.refresh = function(doc, cdt, cdn) {
 	cur_frm.cscript.set_root_readonly(doc);
diff --git a/erpnext/setup/doctype/item_group/item_group.js b/erpnext/setup/doctype/item_group/item_group.js
index d440c26..d6adebc 100644
--- a/erpnext/setup/doctype/item_group/item_group.js
+++ b/erpnext/setup/doctype/item_group/item_group.js
@@ -3,7 +3,7 @@
 
 frappe.ui.form.on("Item Group", {
 	onload: function(frm) {
-		frm.list_route = "Sales Browser/Item Group";
+		frm.list_route = "Tree/Item Group";
 
 		//get query select item group
 		frm.fields_dict['parent_item_group'].get_query = function(doc,cdt,cdn) {
@@ -19,7 +19,7 @@
 	refresh: function(frm) {
 		frm.trigger("set_root_readonly");
 		frm.add_custom_button(__("Item Group Tree"), function() {
-			frappe.set_route("Sales Browser", "Item Group");
+			frappe.set_route("Tree", "Item Group");
 		}, "icon-sitemap");
 	},
 
diff --git a/erpnext/setup/doctype/item_group/item_group.json b/erpnext/setup/doctype/item_group/item_group.json
index e5ccc2d..37d8c81 100644
--- a/erpnext/setup/doctype/item_group/item_group.json
+++ b/erpnext/setup/doctype/item_group/item_group.json
@@ -3,6 +3,7 @@
  "allow_import": 1, 
  "allow_rename": 1, 
  "autoname": "field:item_group_name", 
+ "beta": 0, 
  "creation": "2013-03-28 10:35:29", 
  "custom": 0, 
  "description": "Item Classification", 
@@ -268,17 +269,18 @@
    "bold": 0, 
    "collapsible": 0, 
    "depends_on": "show_in_website", 
-   "fieldname": "page_name", 
+   "fieldname": "route", 
    "fieldtype": "Data", 
    "hidden": 0, 
    "ignore_user_permissions": 0, 
    "ignore_xss_filter": 0, 
    "in_filter": 0, 
    "in_list_view": 0, 
-   "label": "Page Name", 
+   "label": "Route", 
    "length": 0, 
    "no_copy": 0, 
    "permlevel": 0, 
+   "precision": "", 
    "print_hide": 0, 
    "print_hide_if_no_value": 0, 
    "read_only": 0, 
@@ -286,33 +288,7 @@
    "reqd": 0, 
    "search_index": 0, 
    "set_only_once": 0, 
-   "unique": 0
-  }, 
-  {
-   "allow_on_submit": 0, 
-   "bold": 0, 
-   "collapsible": 0, 
-   "depends_on": "show_in_website", 
-   "fieldname": "parent_website_route", 
-   "fieldtype": "Read Only", 
-   "hidden": 0, 
-   "ignore_user_permissions": 0, 
-   "ignore_xss_filter": 0, 
-   "in_filter": 0, 
-   "in_list_view": 0, 
-   "label": "Parent Website Route", 
-   "length": 0, 
-   "no_copy": 0, 
-   "options": "", 
-   "permlevel": 0, 
-   "print_hide": 0, 
-   "print_hide_if_no_value": 0, 
-   "read_only": 1, 
-   "report_hide": 0, 
-   "reqd": 0, 
-   "search_index": 0, 
-   "set_only_once": 0, 
-   "unique": 0
+   "unique": 1
   }, 
   {
    "allow_on_submit": 0, 
@@ -478,13 +454,14 @@
  "hide_toolbar": 0, 
  "icon": "icon-sitemap", 
  "idx": 1, 
+ "image_view": 0, 
  "in_create": 1, 
  "in_dialog": 0, 
  "is_submittable": 0, 
  "issingle": 0, 
  "istable": 0, 
  "max_attachments": 3, 
- "modified": "2016-03-28 08:38:30.868523", 
+ "modified": "2016-06-23 14:44:46.228923", 
  "modified_by": "Administrator", 
  "module": "Setup", 
  "name": "Item Group", 
@@ -611,6 +588,7 @@
    "write": 0
   }
  ], 
+ "quick_entry": 0, 
  "read_only": 0, 
  "read_only_onload": 0, 
  "search_fields": "parent_item_group", 
diff --git a/erpnext/setup/doctype/item_group/item_group.py b/erpnext/setup/doctype/item_group/item_group.py
index dc30de1..3feff6b 100644
--- a/erpnext/setup/doctype/item_group/item_group.py
+++ b/erpnext/setup/doctype/item_group/item_group.py
@@ -16,13 +16,16 @@
 	website = frappe._dict(
 		condition_field = "show_in_website",
 		template = "templates/generators/item_group.html",
-		parent_website_route_field = "parent_item_group",
 		no_cache = 1
 	)
 
 	def autoname(self):
 		self.name = self.item_group_name
 
+	def validate(self):
+		super(ItemGroup, self).validate()
+		self.make_route()
+
 	def on_update(self):
 		NestedSet.on_update(self)
 		WebsiteGenerator.on_update(self)
@@ -30,6 +33,17 @@
 		self.validate_name_with_item()
 		self.validate_one_root()
 
+	def make_route(self):
+		'''Make website route'''
+		if not self.route:
+			self.route = ''
+			if self.parent_item_group:
+				self.route = frappe.get_doc('Item Group', self.parent_item_group).route + '/'
+
+			self.route += self.scrub(self.item_group_name)
+			
+			return self.route
+
 	def after_rename(self, olddn, newdn, merge=False):
 		NestedSet.after_rename(self, olddn, newdn, merge)
 		WebsiteGenerator.after_rename(self, olddn, newdn, merge)
@@ -38,16 +52,6 @@
 		NestedSet.on_trash(self)
 		WebsiteGenerator.on_trash(self)
 
-	def set_parent_website_route(self):
-		"""Overwrite `parent_website_route` from `WebsiteGenerator`.
-			Only set `parent_website_route` if parent is visble.
-
-			e.g. If `show_in_website` is set for Products then url should be `/products`"""
-		if self.parent_item_group and frappe.db.get_value("Item Group", self.parent_item_group, "show_in_website"):
-			WebsiteGenerator.set_parent_website_route(self)
-		else:
-			self.parent_website_route = ""
-
 	def validate_name_with_item(self):
 		if frappe.db.exists("Item", self.name):
 			frappe.throw(frappe._("An item exists with same name ({0}), please change the item group name or rename the item").format(self.name))
@@ -74,9 +78,8 @@
 	child_groups = ", ".join(['"' + i[0] + '"' for i in get_child_groups(product_group)])
 
 	# base query
-	query = """select name, item_name, item_code, page_name, image, website_image, thumbnail, item_group,
-			description, web_long_description as website_description,
-			concat(parent_website_route, "/", page_name) as route
+	query = """select name, item_name, item_code, route, image, website_image, thumbnail, item_group,
+			description, web_long_description as website_description
 		from `tabItem`
 		where show_in_website = 1
 			and disabled=0
@@ -127,7 +130,7 @@
 
 def get_parent_item_groups(item_group_name):
 	item_group = frappe.get_doc("Item Group", item_group_name)
-	return frappe.db.sql("""select name, page_name from `tabItem Group`
+	return frappe.db.sql("""select name, route from `tabItem Group`
 		where lft <= %s and rgt >= %s
 		and show_in_website=1
 		order by lft asc""", (item_group.lft, item_group.rgt), as_dict=True)
@@ -138,6 +141,5 @@
 
 	for d in get_parent_item_groups(item_group):
 		d = frappe.get_doc("Item Group", d.name)
-		route = d.get_route()
-		if route:
-			clear_cache(route)
+		if d.route:
+			clear_cache(d.route)
diff --git a/erpnext/setup/doctype/sales_partner/sales_partner.json b/erpnext/setup/doctype/sales_partner/sales_partner.json
index d6a49c5..7cdb30d 100644
--- a/erpnext/setup/doctype/sales_partner/sales_partner.json
+++ b/erpnext/setup/doctype/sales_partner/sales_partner.json
@@ -1,664 +1,694 @@
 {
- "allow_copy": 0,
- "allow_import": 1,
- "allow_rename": 1,
- "autoname": "field:partner_name",
- "creation": "2013-04-12 15:34:06",
- "custom": 0,
- "description": "A third party distributor / dealer / commission agent / affiliate / reseller who sells the companies products for a commission.",
- "docstatus": 0,
- "doctype": "DocType",
- "document_type": "Setup",
+ "allow_copy": 0, 
+ "allow_import": 1, 
+ "allow_rename": 1, 
+ "autoname": "field:partner_name", 
+ "beta": 0, 
+ "creation": "2013-04-12 15:34:06", 
+ "custom": 0, 
+ "description": "A third party distributor / dealer / commission agent / affiliate / reseller who sells the companies products for a commission.", 
+ "docstatus": 0, 
+ "doctype": "DocType", 
+ "document_type": "Setup", 
  "fields": [
   {
-   "allow_on_submit": 0,
-   "bold": 0,
-   "collapsible": 0,
-   "fieldname": "partner_name",
-   "fieldtype": "Data",
-   "hidden": 0,
-   "ignore_user_permissions": 0,
-   "in_filter": 1,
-   "in_list_view": 0,
-   "label": "Sales Partner Name",
-   "length": 0,
-   "no_copy": 0,
-   "oldfieldname": "partner_name",
-   "oldfieldtype": "Data",
-   "permlevel": 0,
-   "print_hide": 0,
-   "read_only": 0,
-   "report_hide": 0,
-   "reqd": 1,
-   "search_index": 0,
-   "set_only_once": 0,
+   "allow_on_submit": 0, 
+   "bold": 0, 
+   "collapsible": 0, 
+   "fieldname": "partner_name", 
+   "fieldtype": "Data", 
+   "hidden": 0, 
+   "ignore_user_permissions": 0, 
+   "ignore_xss_filter": 0, 
+   "in_filter": 1, 
+   "in_list_view": 0, 
+   "label": "Sales Partner Name", 
+   "length": 0, 
+   "no_copy": 0, 
+   "oldfieldname": "partner_name", 
+   "oldfieldtype": "Data", 
+   "permlevel": 0, 
+   "print_hide": 0, 
+   "print_hide_if_no_value": 0, 
+   "read_only": 0, 
+   "report_hide": 0, 
+   "reqd": 1, 
+   "search_index": 0, 
+   "set_only_once": 0, 
    "unique": 0
-  },
+  }, 
   {
-   "allow_on_submit": 0,
-   "bold": 0,
-   "collapsible": 0,
-   "fieldname": "partner_type",
-   "fieldtype": "Select",
-   "hidden": 0,
-   "ignore_user_permissions": 0,
-   "in_filter": 1,
-   "in_list_view": 1,
-   "label": "Partner Type",
-   "length": 0,
-   "no_copy": 0,
-   "oldfieldname": "partner_type",
-   "oldfieldtype": "Select",
-   "options": "\nChannel Partner\nDistributor\nDealer\nAgent\nRetailer\nImplementation Partner\nReseller",
-   "permlevel": 0,
-   "print_hide": 0,
-   "read_only": 0,
-   "report_hide": 0,
-   "reqd": 0,
-   "search_index": 0,
-   "set_only_once": 0,
+   "allow_on_submit": 0, 
+   "bold": 0, 
+   "collapsible": 0, 
+   "fieldname": "partner_type", 
+   "fieldtype": "Select", 
+   "hidden": 0, 
+   "ignore_user_permissions": 0, 
+   "ignore_xss_filter": 0, 
+   "in_filter": 1, 
+   "in_list_view": 1, 
+   "label": "Partner Type", 
+   "length": 0, 
+   "no_copy": 0, 
+   "oldfieldname": "partner_type", 
+   "oldfieldtype": "Select", 
+   "options": "\nChannel Partner\nDistributor\nDealer\nAgent\nRetailer\nImplementation Partner\nReseller", 
+   "permlevel": 0, 
+   "print_hide": 0, 
+   "print_hide_if_no_value": 0, 
+   "read_only": 0, 
+   "report_hide": 0, 
+   "reqd": 0, 
+   "search_index": 0, 
+   "set_only_once": 0, 
    "unique": 0
-  },
+  }, 
   {
-   "allow_on_submit": 0,
-   "bold": 0,
-   "collapsible": 0,
-   "description": "",
-   "fieldname": "territory",
-   "fieldtype": "Link",
-   "hidden": 0,
-   "ignore_user_permissions": 0,
-   "in_filter": 0,
-   "in_list_view": 1,
-   "label": "Territory",
-   "length": 0,
-   "no_copy": 0,
-   "options": "Territory",
-   "permlevel": 0,
-   "print_hide": 0,
-   "read_only": 0,
-   "report_hide": 0,
-   "reqd": 1,
-   "search_index": 0,
-   "set_only_once": 0,
+   "allow_on_submit": 0, 
+   "bold": 0, 
+   "collapsible": 0, 
+   "description": "", 
+   "fieldname": "territory", 
+   "fieldtype": "Link", 
+   "hidden": 0, 
+   "ignore_user_permissions": 0, 
+   "ignore_xss_filter": 0, 
+   "in_filter": 0, 
+   "in_list_view": 1, 
+   "label": "Territory", 
+   "length": 0, 
+   "no_copy": 0, 
+   "options": "Territory", 
+   "permlevel": 0, 
+   "print_hide": 0, 
+   "print_hide_if_no_value": 0, 
+   "read_only": 0, 
+   "report_hide": 0, 
+   "reqd": 1, 
+   "search_index": 0, 
+   "set_only_once": 0, 
    "unique": 0
-  },
+  }, 
   {
-   "allow_on_submit": 0,
-   "bold": 0,
-   "collapsible": 0,
-   "fieldname": "column_break0",
-   "fieldtype": "Column Break",
-   "hidden": 0,
-   "ignore_user_permissions": 0,
-   "in_filter": 0,
-   "in_list_view": 0,
-   "length": 0,
-   "no_copy": 0,
-   "oldfieldtype": "Column Break",
-   "permlevel": 0,
-   "print_hide": 0,
-   "read_only": 0,
-   "report_hide": 0,
-   "reqd": 0,
-   "search_index": 0,
-   "set_only_once": 0,
-   "unique": 0,
+   "allow_on_submit": 0, 
+   "bold": 0, 
+   "collapsible": 0, 
+   "fieldname": "column_break0", 
+   "fieldtype": "Column Break", 
+   "hidden": 0, 
+   "ignore_user_permissions": 0, 
+   "ignore_xss_filter": 0, 
+   "in_filter": 0, 
+   "in_list_view": 0, 
+   "length": 0, 
+   "no_copy": 0, 
+   "oldfieldtype": "Column Break", 
+   "permlevel": 0, 
+   "print_hide": 0, 
+   "print_hide_if_no_value": 0, 
+   "read_only": 0, 
+   "report_hide": 0, 
+   "reqd": 0, 
+   "search_index": 0, 
+   "set_only_once": 0, 
+   "unique": 0, 
    "width": "50%"
-  },
+  }, 
   {
-   "allow_on_submit": 0,
-   "bold": 0,
-   "collapsible": 0,
-   "fieldname": "commission_rate",
-   "fieldtype": "Float",
-   "hidden": 0,
-   "ignore_user_permissions": 0,
-   "in_filter": 0,
-   "in_list_view": 0,
-   "label": "Commission Rate",
-   "length": 0,
-   "no_copy": 0,
-   "oldfieldname": "commission_rate",
-   "oldfieldtype": "Currency",
-   "permlevel": 0,
-   "print_hide": 0,
-   "read_only": 0,
-   "report_hide": 0,
-   "reqd": 1,
-   "search_index": 0,
-   "set_only_once": 0,
+   "allow_on_submit": 0, 
+   "bold": 0, 
+   "collapsible": 0, 
+   "fieldname": "commission_rate", 
+   "fieldtype": "Float", 
+   "hidden": 0, 
+   "ignore_user_permissions": 0, 
+   "ignore_xss_filter": 0, 
+   "in_filter": 0, 
+   "in_list_view": 0, 
+   "label": "Commission Rate", 
+   "length": 0, 
+   "no_copy": 0, 
+   "oldfieldname": "commission_rate", 
+   "oldfieldtype": "Currency", 
+   "permlevel": 0, 
+   "print_hide": 0, 
+   "print_hide_if_no_value": 0, 
+   "read_only": 0, 
+   "report_hide": 0, 
+   "reqd": 1, 
+   "search_index": 0, 
+   "set_only_once": 0, 
    "unique": 0
-  },
+  }, 
   {
-   "allow_on_submit": 0,
-   "bold": 0,
-   "collapsible": 0,
-   "fieldname": "address_contacts",
-   "fieldtype": "Section Break",
-   "hidden": 0,
-   "ignore_user_permissions": 0,
-   "in_filter": 0,
-   "in_list_view": 0,
-   "label": "Address & Contacts",
-   "length": 0,
-   "no_copy": 0,
-   "permlevel": 0,
-   "print_hide": 0,
-   "read_only": 0,
-   "report_hide": 0,
-   "reqd": 0,
-   "search_index": 0,
-   "set_only_once": 0,
+   "allow_on_submit": 0, 
+   "bold": 0, 
+   "collapsible": 0, 
+   "fieldname": "address_contacts", 
+   "fieldtype": "Section Break", 
+   "hidden": 0, 
+   "ignore_user_permissions": 0, 
+   "ignore_xss_filter": 0, 
+   "in_filter": 0, 
+   "in_list_view": 0, 
+   "label": "Address & Contacts", 
+   "length": 0, 
+   "no_copy": 0, 
+   "permlevel": 0, 
+   "print_hide": 0, 
+   "print_hide_if_no_value": 0, 
+   "read_only": 0, 
+   "report_hide": 0, 
+   "reqd": 0, 
+   "search_index": 0, 
+   "set_only_once": 0, 
    "unique": 0
-  },
+  }, 
   {
-   "allow_on_submit": 0,
-   "bold": 0,
-   "collapsible": 0,
-   "depends_on": "eval:doc.__islocal",
-   "fieldname": "address_desc",
-   "fieldtype": "HTML",
-   "hidden": 0,
-   "ignore_user_permissions": 0,
-   "in_filter": 0,
-   "in_list_view": 0,
-   "label": "Address Desc",
-   "length": 0,
-   "no_copy": 0,
-   "permlevel": 0,
-   "print_hide": 0,
-   "read_only": 0,
-   "report_hide": 0,
-   "reqd": 0,
-   "search_index": 0,
-   "set_only_once": 0,
+   "allow_on_submit": 0, 
+   "bold": 0, 
+   "collapsible": 0, 
+   "depends_on": "eval:doc.__islocal", 
+   "fieldname": "address_desc", 
+   "fieldtype": "HTML", 
+   "hidden": 0, 
+   "ignore_user_permissions": 0, 
+   "ignore_xss_filter": 0, 
+   "in_filter": 0, 
+   "in_list_view": 0, 
+   "label": "Address Desc", 
+   "length": 0, 
+   "no_copy": 0, 
+   "permlevel": 0, 
+   "print_hide": 0, 
+   "print_hide_if_no_value": 0, 
+   "read_only": 0, 
+   "report_hide": 0, 
+   "reqd": 0, 
+   "search_index": 0, 
+   "set_only_once": 0, 
    "unique": 0
-  },
+  }, 
   {
-   "allow_on_submit": 0,
-   "bold": 0,
-   "collapsible": 0,
-   "fieldname": "address_html",
-   "fieldtype": "HTML",
-   "hidden": 0,
-   "ignore_user_permissions": 0,
-   "in_filter": 0,
-   "in_list_view": 0,
-   "label": "Address HTML",
-   "length": 0,
-   "no_copy": 0,
-   "permlevel": 0,
-   "print_hide": 0,
-   "read_only": 1,
-   "report_hide": 0,
-   "reqd": 0,
-   "search_index": 0,
-   "set_only_once": 0,
+   "allow_on_submit": 0, 
+   "bold": 0, 
+   "collapsible": 0, 
+   "fieldname": "address_html", 
+   "fieldtype": "HTML", 
+   "hidden": 0, 
+   "ignore_user_permissions": 0, 
+   "ignore_xss_filter": 0, 
+   "in_filter": 0, 
+   "in_list_view": 0, 
+   "label": "Address HTML", 
+   "length": 0, 
+   "no_copy": 0, 
+   "permlevel": 0, 
+   "print_hide": 0, 
+   "print_hide_if_no_value": 0, 
+   "read_only": 1, 
+   "report_hide": 0, 
+   "reqd": 0, 
+   "search_index": 0, 
+   "set_only_once": 0, 
    "unique": 0
-  },
+  }, 
   {
-   "allow_on_submit": 0,
-   "bold": 0,
-   "collapsible": 0,
-   "fieldname": "column_break1",
-   "fieldtype": "Column Break",
-   "hidden": 0,
-   "ignore_user_permissions": 0,
-   "in_filter": 0,
-   "in_list_view": 0,
-   "length": 0,
-   "no_copy": 0,
-   "permlevel": 0,
-   "print_hide": 0,
-   "read_only": 0,
-   "report_hide": 0,
-   "reqd": 0,
-   "search_index": 0,
-   "set_only_once": 0,
+   "allow_on_submit": 0, 
+   "bold": 0, 
+   "collapsible": 0, 
+   "fieldname": "column_break1", 
+   "fieldtype": "Column Break", 
+   "hidden": 0, 
+   "ignore_user_permissions": 0, 
+   "ignore_xss_filter": 0, 
+   "in_filter": 0, 
+   "in_list_view": 0, 
+   "length": 0, 
+   "no_copy": 0, 
+   "permlevel": 0, 
+   "print_hide": 0, 
+   "print_hide_if_no_value": 0, 
+   "read_only": 0, 
+   "report_hide": 0, 
+   "reqd": 0, 
+   "search_index": 0, 
+   "set_only_once": 0, 
    "unique": 0
-  },
+  }, 
   {
-   "allow_on_submit": 0,
-   "bold": 0,
-   "collapsible": 0,
-   "depends_on": "eval:doc.__islocal",
-   "fieldname": "contact_desc",
-   "fieldtype": "HTML",
-   "hidden": 0,
-   "ignore_user_permissions": 0,
-   "in_filter": 0,
-   "in_list_view": 0,
-   "label": "Contact Desc",
-   "length": 0,
-   "no_copy": 0,
-   "permlevel": 0,
-   "print_hide": 0,
-   "read_only": 0,
-   "report_hide": 0,
-   "reqd": 0,
-   "search_index": 0,
-   "set_only_once": 0,
+   "allow_on_submit": 0, 
+   "bold": 0, 
+   "collapsible": 0, 
+   "depends_on": "eval:doc.__islocal", 
+   "fieldname": "contact_desc", 
+   "fieldtype": "HTML", 
+   "hidden": 0, 
+   "ignore_user_permissions": 0, 
+   "ignore_xss_filter": 0, 
+   "in_filter": 0, 
+   "in_list_view": 0, 
+   "label": "Contact Desc", 
+   "length": 0, 
+   "no_copy": 0, 
+   "permlevel": 0, 
+   "print_hide": 0, 
+   "print_hide_if_no_value": 0, 
+   "read_only": 0, 
+   "report_hide": 0, 
+   "reqd": 0, 
+   "search_index": 0, 
+   "set_only_once": 0, 
    "unique": 0
-  },
+  }, 
   {
-   "allow_on_submit": 0,
-   "bold": 0,
-   "collapsible": 0,
-   "fieldname": "contact_html",
-   "fieldtype": "HTML",
-   "hidden": 0,
-   "ignore_user_permissions": 0,
-   "in_filter": 0,
-   "in_list_view": 0,
-   "label": "Contact HTML",
-   "length": 0,
-   "no_copy": 0,
-   "permlevel": 0,
-   "print_hide": 0,
-   "read_only": 1,
-   "report_hide": 0,
-   "reqd": 0,
-   "search_index": 0,
-   "set_only_once": 0,
+   "allow_on_submit": 0, 
+   "bold": 0, 
+   "collapsible": 0, 
+   "fieldname": "contact_html", 
+   "fieldtype": "HTML", 
+   "hidden": 0, 
+   "ignore_user_permissions": 0, 
+   "ignore_xss_filter": 0, 
+   "in_filter": 0, 
+   "in_list_view": 0, 
+   "label": "Contact HTML", 
+   "length": 0, 
+   "no_copy": 0, 
+   "permlevel": 0, 
+   "print_hide": 0, 
+   "print_hide_if_no_value": 0, 
+   "read_only": 1, 
+   "report_hide": 0, 
+   "reqd": 0, 
+   "search_index": 0, 
+   "set_only_once": 0, 
    "unique": 0
-  },
+  }, 
   {
-   "allow_on_submit": 0,
-   "bold": 0,
-   "collapsible": 0,
-   "fieldname": "partner_target_details_section_break",
-   "fieldtype": "Section Break",
-   "hidden": 0,
-   "ignore_user_permissions": 0,
-   "in_filter": 0,
-   "in_list_view": 0,
-   "label": "Sales Partner Target",
-   "length": 0,
-   "no_copy": 0,
-   "oldfieldtype": "Section Break",
-   "permlevel": 0,
-   "print_hide": 0,
-   "read_only": 0,
-   "report_hide": 0,
-   "reqd": 0,
-   "search_index": 0,
-   "set_only_once": 0,
+   "allow_on_submit": 0, 
+   "bold": 0, 
+   "collapsible": 0, 
+   "fieldname": "partner_target_details_section_break", 
+   "fieldtype": "Section Break", 
+   "hidden": 0, 
+   "ignore_user_permissions": 0, 
+   "ignore_xss_filter": 0, 
+   "in_filter": 0, 
+   "in_list_view": 0, 
+   "label": "Sales Partner Target", 
+   "length": 0, 
+   "no_copy": 0, 
+   "oldfieldtype": "Section Break", 
+   "permlevel": 0, 
+   "print_hide": 0, 
+   "print_hide_if_no_value": 0, 
+   "read_only": 0, 
+   "report_hide": 0, 
+   "reqd": 0, 
+   "search_index": 0, 
+   "set_only_once": 0, 
    "unique": 0
-  },
+  }, 
   {
-   "allow_on_submit": 0,
-   "bold": 0,
-   "collapsible": 0,
-   "fieldname": "targets",
-   "fieldtype": "Table",
-   "hidden": 0,
-   "ignore_user_permissions": 0,
-   "in_filter": 0,
-   "in_list_view": 0,
-   "label": "Targets",
-   "length": 0,
-   "no_copy": 0,
-   "oldfieldname": "partner_target_details",
-   "oldfieldtype": "Table",
-   "options": "Target Detail",
-   "permlevel": 0,
-   "print_hide": 0,
-   "read_only": 0,
-   "report_hide": 0,
-   "reqd": 0,
-   "search_index": 0,
-   "set_only_once": 0,
+   "allow_on_submit": 0, 
+   "bold": 0, 
+   "collapsible": 0, 
+   "fieldname": "targets", 
+   "fieldtype": "Table", 
+   "hidden": 0, 
+   "ignore_user_permissions": 0, 
+   "ignore_xss_filter": 0, 
+   "in_filter": 0, 
+   "in_list_view": 0, 
+   "label": "Targets", 
+   "length": 0, 
+   "no_copy": 0, 
+   "oldfieldname": "partner_target_details", 
+   "oldfieldtype": "Table", 
+   "options": "Target Detail", 
+   "permlevel": 0, 
+   "print_hide": 0, 
+   "print_hide_if_no_value": 0, 
+   "read_only": 0, 
+   "report_hide": 0, 
+   "reqd": 0, 
+   "search_index": 0, 
+   "set_only_once": 0, 
    "unique": 0
-  },
+  }, 
   {
-   "allow_on_submit": 0,
-   "bold": 0,
-   "collapsible": 0,
-   "description": "Select Monthly Distribution to unevenly distribute targets across months.",
-   "fieldname": "distribution_id",
-   "fieldtype": "Link",
-   "hidden": 0,
-   "ignore_user_permissions": 0,
-   "in_filter": 0,
-   "in_list_view": 0,
-   "label": "Target Distribution",
-   "length": 0,
-   "no_copy": 0,
-   "oldfieldname": "distribution_id",
-   "oldfieldtype": "Link",
-   "options": "Monthly Distribution",
-   "permlevel": 0,
-   "print_hide": 0,
-   "read_only": 0,
-   "report_hide": 0,
-   "reqd": 0,
-   "search_index": 0,
-   "set_only_once": 0,
+   "allow_on_submit": 0, 
+   "bold": 0, 
+   "collapsible": 0, 
+   "description": "Select Monthly Distribution to unevenly distribute targets across months.", 
+   "fieldname": "distribution_id", 
+   "fieldtype": "Link", 
+   "hidden": 0, 
+   "ignore_user_permissions": 0, 
+   "ignore_xss_filter": 0, 
+   "in_filter": 0, 
+   "in_list_view": 0, 
+   "label": "Target Distribution", 
+   "length": 0, 
+   "no_copy": 0, 
+   "oldfieldname": "distribution_id", 
+   "oldfieldtype": "Link", 
+   "options": "Monthly Distribution", 
+   "permlevel": 0, 
+   "print_hide": 0, 
+   "print_hide_if_no_value": 0, 
+   "read_only": 0, 
+   "report_hide": 0, 
+   "reqd": 0, 
+   "search_index": 0, 
+   "set_only_once": 0, 
    "unique": 0
-  },
+  }, 
   {
-   "allow_on_submit": 0,
-   "bold": 0,
-   "collapsible": 0,
-   "fieldname": "website",
-   "fieldtype": "Section Break",
-   "hidden": 0,
-   "ignore_user_permissions": 0,
-   "in_filter": 0,
-   "in_list_view": 0,
-   "label": "Website",
-   "length": 0,
-   "no_copy": 0,
-   "permlevel": 0,
-   "print_hide": 0,
-   "read_only": 0,
-   "report_hide": 0,
-   "reqd": 0,
-   "search_index": 0,
-   "set_only_once": 0,
+   "allow_on_submit": 0, 
+   "bold": 0, 
+   "collapsible": 0, 
+   "fieldname": "website", 
+   "fieldtype": "Section Break", 
+   "hidden": 0, 
+   "ignore_user_permissions": 0, 
+   "ignore_xss_filter": 0, 
+   "in_filter": 0, 
+   "in_list_view": 0, 
+   "label": "Website", 
+   "length": 0, 
+   "no_copy": 0, 
+   "permlevel": 0, 
+   "print_hide": 0, 
+   "print_hide_if_no_value": 0, 
+   "read_only": 0, 
+   "report_hide": 0, 
+   "reqd": 0, 
+   "search_index": 0, 
+   "set_only_once": 0, 
    "unique": 0
-  },
+  }, 
   {
-   "allow_on_submit": 0,
-   "bold": 0,
-   "collapsible": 0,
-   "fieldname": "show_in_website",
-   "fieldtype": "Check",
-   "hidden": 0,
-   "ignore_user_permissions": 0,
-   "in_filter": 0,
-   "in_list_view": 0,
-   "label": "Show In Website",
-   "length": 0,
-   "no_copy": 0,
-   "permlevel": 0,
-   "print_hide": 0,
-   "read_only": 0,
-   "report_hide": 0,
-   "reqd": 0,
-   "search_index": 0,
-   "set_only_once": 0,
+   "allow_on_submit": 0, 
+   "bold": 0, 
+   "collapsible": 0, 
+   "fieldname": "show_in_website", 
+   "fieldtype": "Check", 
+   "hidden": 0, 
+   "ignore_user_permissions": 0, 
+   "ignore_xss_filter": 0, 
+   "in_filter": 0, 
+   "in_list_view": 0, 
+   "label": "Show In Website", 
+   "length": 0, 
+   "no_copy": 0, 
+   "permlevel": 0, 
+   "print_hide": 0, 
+   "print_hide_if_no_value": 0, 
+   "read_only": 0, 
+   "report_hide": 0, 
+   "reqd": 0, 
+   "search_index": 0, 
+   "set_only_once": 0, 
    "unique": 0
-  },
+  }, 
   {
-   "allow_on_submit": 0,
-   "bold": 0,
-   "collapsible": 0,
-   "depends_on": "eval:cint(doc.show_in_website)",
-   "fieldname": "section_break_17",
-   "fieldtype": "Section Break",
-   "hidden": 0,
-   "ignore_user_permissions": 0,
-   "in_filter": 0,
-   "in_list_view": 0,
-   "length": 0,
-   "no_copy": 0,
-   "permlevel": 0,
-   "print_hide": 0,
-   "read_only": 0,
-   "report_hide": 0,
-   "reqd": 0,
-   "search_index": 0,
-   "set_only_once": 0,
+   "allow_on_submit": 0, 
+   "bold": 0, 
+   "collapsible": 0, 
+   "depends_on": "show_in_website", 
+   "fieldname": "section_break_17", 
+   "fieldtype": "Section Break", 
+   "hidden": 0, 
+   "ignore_user_permissions": 0, 
+   "ignore_xss_filter": 0, 
+   "in_filter": 0, 
+   "in_list_view": 0, 
+   "length": 0, 
+   "no_copy": 0, 
+   "permlevel": 0, 
+   "print_hide": 0, 
+   "print_hide_if_no_value": 0, 
+   "read_only": 0, 
+   "report_hide": 0, 
+   "reqd": 0, 
+   "search_index": 0, 
+   "set_only_once": 0, 
    "unique": 0
-  },
+  }, 
   {
-   "allow_on_submit": 0,
-   "bold": 0,
-   "collapsible": 0,
-   "fieldname": "logo",
-   "fieldtype": "Attach",
-   "hidden": 0,
-   "ignore_user_permissions": 0,
-   "in_filter": 0,
-   "in_list_view": 0,
-   "label": "Logo",
-   "length": 0,
-   "no_copy": 0,
-   "options": "",
-   "permlevel": 0,
-   "print_hide": 0,
-   "read_only": 0,
-   "report_hide": 0,
-   "reqd": 0,
-   "search_index": 0,
-   "set_only_once": 0,
+   "allow_on_submit": 0, 
+   "bold": 0, 
+   "collapsible": 0, 
+   "fieldname": "route", 
+   "fieldtype": "Data", 
+   "hidden": 0, 
+   "ignore_user_permissions": 0, 
+   "ignore_xss_filter": 0, 
+   "in_filter": 0, 
+   "in_list_view": 0, 
+   "label": "Route", 
+   "length": 0, 
+   "no_copy": 0, 
+   "permlevel": 0, 
+   "precision": "", 
+   "print_hide": 0, 
+   "print_hide_if_no_value": 0, 
+   "read_only": 0, 
+   "report_hide": 0, 
+   "reqd": 0, 
+   "search_index": 0, 
+   "set_only_once": 0, 
+   "unique": 1
+  }, 
+  {
+   "allow_on_submit": 0, 
+   "bold": 0, 
+   "collapsible": 0, 
+   "fieldname": "column_break_20", 
+   "fieldtype": "Column Break", 
+   "hidden": 0, 
+   "ignore_user_permissions": 0, 
+   "ignore_xss_filter": 0, 
+   "in_filter": 0, 
+   "in_list_view": 0, 
+   "length": 0, 
+   "no_copy": 0, 
+   "permlevel": 0, 
+   "print_hide": 0, 
+   "print_hide_if_no_value": 0, 
+   "read_only": 0, 
+   "report_hide": 0, 
+   "reqd": 0, 
+   "search_index": 0, 
+   "set_only_once": 0, 
    "unique": 0
-  },
+  }, 
   {
-   "allow_on_submit": 0,
-   "bold": 0,
-   "collapsible": 0,
-   "fieldname": "partner_website",
-   "fieldtype": "Data",
-   "hidden": 0,
-   "ignore_user_permissions": 0,
-   "in_filter": 0,
-   "in_list_view": 0,
-   "label": "Partner's Website",
-   "length": 0,
-   "no_copy": 0,
-   "permlevel": 0,
-   "print_hide": 0,
-   "read_only": 0,
-   "report_hide": 0,
-   "reqd": 0,
-   "search_index": 0,
-   "set_only_once": 0,
+   "allow_on_submit": 0, 
+   "bold": 0, 
+   "collapsible": 0, 
+   "fieldname": "logo", 
+   "fieldtype": "Attach", 
+   "hidden": 0, 
+   "ignore_user_permissions": 0, 
+   "ignore_xss_filter": 0, 
+   "in_filter": 0, 
+   "in_list_view": 0, 
+   "label": "Logo", 
+   "length": 0, 
+   "no_copy": 0, 
+   "options": "", 
+   "permlevel": 0, 
+   "print_hide": 0, 
+   "print_hide_if_no_value": 0, 
+   "read_only": 0, 
+   "report_hide": 0, 
+   "reqd": 0, 
+   "search_index": 0, 
+   "set_only_once": 0, 
    "unique": 0
-  },
+  }, 
   {
-   "allow_on_submit": 0,
-   "bold": 0,
-   "collapsible": 0,
-   "fieldname": "column_break_20",
-   "fieldtype": "Column Break",
-   "hidden": 0,
-   "ignore_user_permissions": 0,
-   "in_filter": 0,
-   "in_list_view": 0,
-   "length": 0,
-   "no_copy": 0,
-   "permlevel": 0,
-   "print_hide": 0,
-   "read_only": 0,
-   "report_hide": 0,
-   "reqd": 0,
-   "search_index": 0,
-   "set_only_once": 0,
+   "allow_on_submit": 0, 
+   "bold": 0, 
+   "collapsible": 0, 
+   "fieldname": "partner_website", 
+   "fieldtype": "Data", 
+   "hidden": 0, 
+   "ignore_user_permissions": 0, 
+   "ignore_xss_filter": 0, 
+   "in_filter": 0, 
+   "in_list_view": 0, 
+   "label": "Partner website", 
+   "length": 0, 
+   "no_copy": 0, 
+   "permlevel": 0, 
+   "print_hide": 0, 
+   "print_hide_if_no_value": 0, 
+   "read_only": 0, 
+   "report_hide": 0, 
+   "reqd": 0, 
+   "search_index": 0, 
+   "set_only_once": 0, 
    "unique": 0
-  },
+  }, 
   {
-   "allow_on_submit": 0,
-   "bold": 0,
-   "collapsible": 0,
-   "fieldname": "page_name",
-   "fieldtype": "Data",
-   "hidden": 0,
-   "ignore_user_permissions": 0,
-   "in_filter": 0,
-   "in_list_view": 0,
-   "label": "Page Name",
-   "length": 0,
-   "no_copy": 0,
-   "permlevel": 0,
-   "print_hide": 0,
-   "read_only": 1,
-   "report_hide": 0,
-   "reqd": 0,
-   "search_index": 0,
-   "set_only_once": 0,
+   "allow_on_submit": 0, 
+   "bold": 0, 
+   "collapsible": 0, 
+   "depends_on": "show_in_website", 
+   "fieldname": "section_break_22", 
+   "fieldtype": "Section Break", 
+   "hidden": 0, 
+   "ignore_user_permissions": 0, 
+   "ignore_xss_filter": 0, 
+   "in_filter": 0, 
+   "in_list_view": 0, 
+   "length": 0, 
+   "no_copy": 0, 
+   "permlevel": 0, 
+   "print_hide": 0, 
+   "print_hide_if_no_value": 0, 
+   "read_only": 0, 
+   "report_hide": 0, 
+   "reqd": 0, 
+   "search_index": 0, 
+   "set_only_once": 0, 
    "unique": 0
-  },
+  }, 
   {
-   "allow_on_submit": 0,
-   "bold": 0,
-   "collapsible": 0,
-   "depends_on": "eval:cint(doc.show_in_website)",
-   "fieldname": "section_break_22",
-   "fieldtype": "Section Break",
-   "hidden": 0,
-   "ignore_user_permissions": 0,
-   "in_filter": 0,
-   "in_list_view": 0,
-   "length": 0,
-   "no_copy": 0,
-   "permlevel": 0,
-   "print_hide": 0,
-   "read_only": 0,
-   "report_hide": 0,
-   "reqd": 0,
-   "search_index": 0,
-   "set_only_once": 0,
+   "allow_on_submit": 0, 
+   "bold": 0, 
+   "collapsible": 0, 
+   "fieldname": "introduction", 
+   "fieldtype": "Text", 
+   "hidden": 0, 
+   "ignore_user_permissions": 0, 
+   "ignore_xss_filter": 0, 
+   "in_filter": 0, 
+   "in_list_view": 0, 
+   "label": "Introduction", 
+   "length": 0, 
+   "no_copy": 0, 
+   "permlevel": 0, 
+   "print_hide": 0, 
+   "print_hide_if_no_value": 0, 
+   "read_only": 0, 
+   "report_hide": 0, 
+   "reqd": 0, 
+   "search_index": 0, 
+   "set_only_once": 0, 
    "unique": 0
-  },
+  }, 
   {
-   "allow_on_submit": 0,
-   "bold": 0,
-   "collapsible": 0,
-   "fieldname": "introduction",
-   "fieldtype": "Text",
-   "hidden": 0,
-   "ignore_user_permissions": 0,
-   "in_filter": 0,
-   "in_list_view": 0,
-   "label": "Introduction",
-   "length": 0,
-   "no_copy": 0,
-   "permlevel": 0,
-   "print_hide": 0,
-   "read_only": 0,
-   "report_hide": 0,
-   "reqd": 0,
-   "search_index": 0,
-   "set_only_once": 0,
-   "unique": 0
-  },
-  {
-   "allow_on_submit": 0,
-   "bold": 0,
-   "collapsible": 0,
-   "fieldname": "description",
-   "fieldtype": "Text Editor",
-   "hidden": 0,
-   "ignore_user_permissions": 0,
-   "in_filter": 0,
-   "in_list_view": 0,
-   "label": "Description",
-   "length": 0,
-   "no_copy": 0,
-   "permlevel": 0,
-   "print_hide": 0,
-   "read_only": 0,
-   "report_hide": 0,
-   "reqd": 0,
-   "search_index": 0,
-   "set_only_once": 0,
-   "unique": 0
-  },
-  {
-   "allow_on_submit": 0,
-   "bold": 0,
-   "collapsible": 0,
-   "default": "partners",
-   "fieldname": "parent_website_route",
-   "fieldtype": "Read Only",
-   "hidden": 0,
-   "ignore_user_permissions": 0,
-   "in_filter": 0,
-   "in_list_view": 0,
-   "label": "Parent Website Route",
-   "length": 0,
-   "no_copy": 0,
-   "options": "",
-   "permlevel": 0,
-   "print_hide": 0,
-   "read_only": 0,
-   "report_hide": 0,
-   "reqd": 0,
-   "search_index": 0,
-   "set_only_once": 0,
+   "allow_on_submit": 0, 
+   "bold": 0, 
+   "collapsible": 0, 
+   "fieldname": "description", 
+   "fieldtype": "Text Editor", 
+   "hidden": 0, 
+   "ignore_user_permissions": 0, 
+   "ignore_xss_filter": 0, 
+   "in_filter": 0, 
+   "in_list_view": 0, 
+   "label": "Description", 
+   "length": 0, 
+   "no_copy": 0, 
+   "permlevel": 0, 
+   "print_hide": 0, 
+   "print_hide_if_no_value": 0, 
+   "read_only": 0, 
+   "report_hide": 0, 
+   "reqd": 0, 
+   "search_index": 0, 
+   "set_only_once": 0, 
    "unique": 0
   }
- ],
- "hide_heading": 0,
- "hide_toolbar": 0,
- "icon": "icon-user",
- "idx": 1,
- "in_create": 0,
- "in_dialog": 0,
- "is_submittable": 0,
- "issingle": 0,
- "istable": 0,
- "max_attachments": 0,
- "modified": "2015-11-16 06:29:57.096980",
- "modified_by": "Administrator",
- "module": "Setup",
- "name": "Sales Partner",
- "owner": "Administrator",
+ ], 
+ "hide_heading": 0, 
+ "hide_toolbar": 0, 
+ "icon": "icon-user", 
+ "idx": 1, 
+ "image_view": 0, 
+ "in_create": 0, 
+ "in_dialog": 0, 
+ "is_submittable": 0, 
+ "issingle": 0, 
+ "istable": 0, 
+ "max_attachments": 0, 
+ "modified": "2016-06-23 14:45:31.978973", 
+ "modified_by": "Administrator", 
+ "module": "Setup", 
+ "name": "Sales Partner", 
+ "owner": "Administrator", 
  "permissions": [
   {
-   "amend": 0,
-   "apply_user_permissions": 0,
-   "cancel": 0,
-   "create": 0,
-   "delete": 0,
-   "email": 1,
-   "export": 0,
-   "if_owner": 0,
-   "import": 0,
-   "permlevel": 0,
-   "print": 1,
-   "read": 1,
-   "report": 1,
-   "role": "Sales Manager",
-   "set_user_permissions": 0,
-   "share": 0,
-   "submit": 0,
+   "amend": 0, 
+   "apply_user_permissions": 0, 
+   "cancel": 0, 
+   "create": 0, 
+   "delete": 0, 
+   "email": 1, 
+   "export": 0, 
+   "if_owner": 0, 
+   "import": 0, 
+   "permlevel": 0, 
+   "print": 1, 
+   "read": 1, 
+   "report": 1, 
+   "role": "Sales Manager", 
+   "set_user_permissions": 0, 
+   "share": 0, 
+   "submit": 0, 
    "write": 0
-  },
+  }, 
   {
-   "amend": 0,
-   "apply_user_permissions": 0,
-   "cancel": 0,
-   "create": 0,
-   "delete": 0,
-   "email": 1,
-   "export": 0,
-   "if_owner": 0,
-   "import": 0,
-   "permlevel": 0,
-   "print": 1,
-   "read": 1,
-   "report": 1,
-   "role": "Sales User",
-   "set_user_permissions": 0,
-   "share": 0,
-   "submit": 0,
+   "amend": 0, 
+   "apply_user_permissions": 0, 
+   "cancel": 0, 
+   "create": 0, 
+   "delete": 0, 
+   "email": 1, 
+   "export": 0, 
+   "if_owner": 0, 
+   "import": 0, 
+   "permlevel": 0, 
+   "print": 1, 
+   "read": 1, 
+   "report": 1, 
+   "role": "Sales User", 
+   "set_user_permissions": 0, 
+   "share": 0, 
+   "submit": 0, 
    "write": 0
-  },
+  }, 
   {
-   "amend": 0,
-   "apply_user_permissions": 0,
-   "cancel": 0,
-   "create": 1,
-   "delete": 0,
-   "email": 1,
-   "export": 0,
-   "if_owner": 0,
-   "import": 0,
-   "permlevel": 0,
-   "print": 1,
-   "read": 1,
-   "report": 1,
-   "role": "Sales Master Manager",
-   "set_user_permissions": 0,
-   "share": 1,
-   "submit": 0,
+   "amend": 0, 
+   "apply_user_permissions": 0, 
+   "cancel": 0, 
+   "create": 1, 
+   "delete": 0, 
+   "email": 1, 
+   "export": 0, 
+   "if_owner": 0, 
+   "import": 0, 
+   "permlevel": 0, 
+   "print": 1, 
+   "read": 1, 
+   "report": 1, 
+   "role": "Sales Master Manager", 
+   "set_user_permissions": 0, 
+   "share": 1, 
+   "submit": 0, 
    "write": 1
   }
- ],
- "read_only": 0,
- "read_only_onload": 0
-}
+ ], 
+ "quick_entry": 0, 
+ "read_only": 0, 
+ "read_only_onload": 0, 
+ "sort_order": "ASC", 
+ "track_seen": 0
+}
\ No newline at end of file
diff --git a/erpnext/setup/doctype/sales_partner/sales_partner.py b/erpnext/setup/doctype/sales_partner/sales_partner.py
index 0e0f4ba..5a2aa49 100644
--- a/erpnext/setup/doctype/sales_partner/sales_partner.py
+++ b/erpnext/setup/doctype/sales_partner/sales_partner.py
@@ -22,7 +22,8 @@
 		self.name = self.partner_name
 
 	def validate(self):
-		self.parent_website_route = "partners"
+		if not self.route:
+			self.route = "partners/" + self.scrub(self.partner_name)
 		super(SalesPartner, self).validate()
 		if self.partner_website and not self.partner_website.startswith("http"):
 			self.partner_website = "http://" + self.partner_website
diff --git a/erpnext/setup/doctype/sales_person/sales_person.js b/erpnext/setup/doctype/sales_person/sales_person.js
index 8bae546..2ee3974 100644
--- a/erpnext/setup/doctype/sales_person/sales_person.js
+++ b/erpnext/setup/doctype/sales_person/sales_person.js
@@ -1,7 +1,6 @@
 // Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors
 // License: GNU General Public License v3. See license.txt
 
-cur_frm.list_route = "Sales Browser/Sales Person";
 
 cur_frm.cscript.refresh = function(doc, cdt, cdn) {
 	cur_frm.cscript.set_root_readonly(doc);
diff --git a/erpnext/setup/doctype/sales_person/sales_person_tree.js b/erpnext/setup/doctype/sales_person/sales_person_tree.js
new file mode 100644
index 0000000..fd2127d
--- /dev/null
+++ b/erpnext/setup/doctype/sales_person/sales_person_tree.js
@@ -0,0 +1,11 @@
+frappe.treeview_settings["Sales Person"] = {
+	fields: [
+		{fieldtype:'Data', fieldname: 'name_field',
+			label:__('New Sales Person Name'), reqd:true},
+		{fieldtype:'Link', fieldname:'employee',
+			label:__('Employee'), options:'Employee',
+			description: __("Please enter Employee Id of this sales person")},
+		{fieldtype:'Select', fieldname:'is_group', label:__('Group Node'), options:'No\nYes',
+			description: __("Further nodes can be only created under 'Group' type nodes")}
+	],
+}
\ No newline at end of file
diff --git a/erpnext/setup/doctype/territory/territory.js b/erpnext/setup/doctype/territory/territory.js
index cde04b3..317278a 100644
--- a/erpnext/setup/doctype/territory/territory.js
+++ b/erpnext/setup/doctype/territory/territory.js
@@ -1,7 +1,6 @@
 // Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors
 // License: GNU General Public License v3. See license.txt
 
-cur_frm.list_route = "Sales Browser/Territory";
 
 cur_frm.cscript.refresh = function(doc, cdt, cdn) {
 	cur_frm.cscript.set_root_readonly(doc);
diff --git a/erpnext/shopping_cart/cart.py b/erpnext/shopping_cart/cart.py
index daecaa6..d5cde4a 100644
--- a/erpnext/shopping_cart/cart.py
+++ b/erpnext/shopping_cart/cart.py
@@ -155,7 +155,7 @@
 def decorate_quotation_doc(doc):
 	for d in doc.get("items", []):
 		d.update(frappe.db.get_value("Item", d.item_code,
-			["thumbnail", "website_image", "description", "page_name"], as_dict=True))
+			["thumbnail", "website_image", "description", "route"], as_dict=True))
 
 	return doc
 
diff --git a/erpnext/startup/boot.py b/erpnext/startup/boot.py
index 7bdcb0a..97ef329 100644
--- a/erpnext/startup/boot.py
+++ b/erpnext/startup/boot.py
@@ -52,26 +52,26 @@
 	bootinfo.page_info.update({
 		"Chart of Accounts": {
 			"title": "Chart of Accounts",
-			"route": "Accounts Browser/Account"
+			"route": "Tree/Account"
 		},
 		"Chart of Cost Centers": {
 			"title": "Chart of Cost Centers",
-			"route": "Accounts Browser/Cost Center"
+			"route": "Tree/Cost Center"
 		},
 		"Item Group Tree": {
 			"title": "Item Group Tree",
-			"route": "Sales Browser/Item Group"
+			"route": "Tree/Item Group"
 		},
 		"Customer Group Tree": {
 			"title": "Customer Group Tree",
-			"route": "Sales Browser/Customer Group"
+			"route": "Tree/Customer Group"
 		},
 		"Territory Tree": {
 			"title": "Territory Tree",
-			"route": "Sales Browser/Territory"
+			"route": "Tree/Territory"
 		},
 		"Sales Person Tree": {
 			"title": "Sales Person Tree",
-			"route": "Sales Browser/Sales Person"
+			"route": "Tree/Sales Person"
 		}
 	})
diff --git a/erpnext/stock/doctype/bin/bin.py b/erpnext/stock/doctype/bin/bin.py
index a1580d5..2378e3f 100644
--- a/erpnext/stock/doctype/bin/bin.py
+++ b/erpnext/stock/doctype/bin/bin.py
@@ -3,6 +3,7 @@
 
 from __future__ import unicode_literals
 import frappe
+from frappe import _
 from frappe.utils import flt, nowdate
 import frappe.defaults
 from frappe.model.document import Document
@@ -15,13 +16,19 @@
 		self.validate_mandatory()
 
 		self.projected_qty = flt(self.actual_qty) + flt(self.ordered_qty) + \
-		 	flt(self.indented_qty) + flt(self.planned_qty) - flt(self.reserved_qty)
+			flt(self.indented_qty) + flt(self.planned_qty) - flt(self.reserved_qty)
+		
+		self.block_transactions_against_group_warehouse()
 
 	def validate_mandatory(self):
 		qf = ['actual_qty', 'reserved_qty', 'ordered_qty', 'indented_qty']
 		for f in qf:
 			if (not getattr(self, f, None)) or (not self.get(f)):
 				self.set(f, 0.0)
+	
+	def block_transactions_against_group_warehouse(self):
+		from erpnext.stock.utils import is_group_warehouse
+		is_group_warehouse(self.warehouse)
 
 	def update_stock(self, args, allow_negative_stock=False, via_landed_cost_voucher=False):
 		self.update_qty(args)
diff --git a/erpnext/stock/doctype/delivery_note/delivery_note.json b/erpnext/stock/doctype/delivery_note/delivery_note.json
index fdba48b..bf2f4f3 100644
--- a/erpnext/stock/doctype/delivery_note/delivery_note.json
+++ b/erpnext/stock/doctype/delivery_note/delivery_note.json
@@ -2216,7 +2216,7 @@
    "bold": 0, 
    "collapsible": 0, 
    "fieldname": "per_billed", 
-   "fieldtype": "Currency", 
+   "fieldtype": "Percent", 
    "hidden": 0, 
    "ignore_user_permissions": 0, 
    "ignore_xss_filter": 0, 
@@ -2914,4 +2914,4 @@
  "timeline_field": "customer", 
  "title_field": "title", 
  "track_seen": 0
-}
\ No newline at end of file
+}
diff --git a/erpnext/stock/doctype/item/item.js b/erpnext/stock/doctype/item/item.js
index fe7e54e..f35fa58 100644
--- a/erpnext/stock/doctype/item/item.js
+++ b/erpnext/stock/doctype/item/item.js
@@ -160,6 +160,28 @@
 		frm.fields_dict.supplier_items.grid.get_field("supplier").get_query = function(doc, cdt, cdn) {
 			return { query: "erpnext.controllers.queries.supplier_query" }
 		}
+		
+		frm.fields_dict['default_warehouse'].get_query = function(doc) {
+			return {
+				filters: { "is_group": "No" }
+			}
+		}
+		
+		frm.fields_dict.reorder_levels.grid.get_field("warehouse_group").get_query = function(doc, cdt, cdn) {
+			return {
+				filters: { "is_group": "Yes" }
+			}
+		}
+		
+		frm.fields_dict.reorder_levels.grid.get_field("warehouse").get_query = function(doc, cdt, cdn) {
+			var d = locals[cdt][cdn];
+			return {
+				filters: {
+					"is_group": "No",
+					"parent_warehouse": d.warehouse_group
+				}
+			}
+		}
 
 	},
 
diff --git a/erpnext/stock/doctype/item/item.json b/erpnext/stock/doctype/item/item.json
index 2d6dae2..fd7a31b 100644
--- a/erpnext/stock/doctype/item/item.json
+++ b/erpnext/stock/doctype/item/item.json
@@ -1861,18 +1861,18 @@
    "bold": 0, 
    "collapsible": 0, 
    "depends_on": "show_in_website", 
-   "description": "website page link", 
-   "fieldname": "page_name", 
+   "fieldname": "route", 
    "fieldtype": "Data", 
    "hidden": 0, 
    "ignore_user_permissions": 0, 
    "ignore_xss_filter": 0, 
    "in_filter": 0, 
    "in_list_view": 0, 
-   "label": "Page Name", 
+   "label": "Route", 
    "length": 0, 
-   "no_copy": 1, 
+   "no_copy": 0, 
    "permlevel": 0, 
+   "precision": "", 
    "print_hide": 0, 
    "print_hide_if_no_value": 0, 
    "read_only": 0, 
@@ -1880,7 +1880,7 @@
    "reqd": 0, 
    "search_index": 0, 
    "set_only_once": 0, 
-   "unique": 0
+   "unique": 1
   }, 
   {
    "allow_on_submit": 0, 
@@ -2170,31 +2170,6 @@
    "allow_on_submit": 0, 
    "bold": 0, 
    "collapsible": 0, 
-   "fieldname": "parent_website_route", 
-   "fieldtype": "Read Only", 
-   "hidden": 0, 
-   "ignore_user_permissions": 1, 
-   "ignore_xss_filter": 0, 
-   "in_filter": 0, 
-   "in_list_view": 0, 
-   "label": "Parent Website Route", 
-   "length": 0, 
-   "no_copy": 1, 
-   "options": "", 
-   "permlevel": 0, 
-   "print_hide": 0, 
-   "print_hide_if_no_value": 0, 
-   "read_only": 0, 
-   "report_hide": 0, 
-   "reqd": 0, 
-   "search_index": 0, 
-   "set_only_once": 0, 
-   "unique": 0
-  }, 
-  {
-   "allow_on_submit": 0, 
-   "bold": 0, 
-   "collapsible": 0, 
    "fieldname": "total_projected_qty", 
    "fieldtype": "Float", 
    "hidden": 1, 
@@ -2222,13 +2197,14 @@
  "icon": "icon-tag", 
  "idx": 2, 
  "image_field": "image", 
+ "image_view": 0, 
  "in_create": 0, 
  "in_dialog": 0, 
  "is_submittable": 0, 
  "issingle": 0, 
  "istable": 0, 
  "max_attachments": 1, 
- "modified": "2016-06-02 14:48:46.128121", 
+ "modified": "2016-06-23 14:44:31.115557", 
  "modified_by": "Administrator", 
  "module": "Stock", 
  "name": "Item", 
diff --git a/erpnext/stock/doctype/item/item.py b/erpnext/stock/doctype/item/item.py
index bd2ada9..d156739 100644
--- a/erpnext/stock/doctype/item/item.py
+++ b/erpnext/stock/doctype/item/item.py
@@ -22,7 +22,6 @@
 		page_title_field = "item_name",
 		condition_field = "show_in_website",
 		template = "templates/generators/item.html",
-		parent_website_route_field = "item_group",
 		no_cache = 1
 	)
 
@@ -133,6 +132,14 @@
 
 			stock_entry.add_comment("Comment", _("Opening Stock"))
 
+	def make_route(self):
+		if not self.route:
+			return frappe.db.get_value('Item Group', self.item_group, 'route') + '/' + self.scrub(self.item_name)
+
+	def get_parents(self, context):
+		item_group, route = frappe.db.get_value('Item Group', self.item_group, ['name', 'route'])
+		context.parents = [{'name': route, 'label': item_group}]
+
 	def validate_website_image(self):
 		"""Validate if the website image is a public file"""
 		auto_set_website_image = False
@@ -218,7 +225,7 @@
 		if self.variant_of:
 			# redirect to template page!
 			template_item = frappe.get_doc("Item", self.variant_of)
-			frappe.flags.redirect_location = template_item.get_route() + "?variant=" + urllib.quote(self.name)
+			frappe.flags.redirect_location = template_item.route + "?variant=" + urllib.quote(self.name)
 			raise frappe.Redirect
 
 		context.parent_groups = get_parent_item_groups(self.item_group) + \
@@ -506,9 +513,9 @@
 
 	def after_rename(self, old_name, new_name, merge):
 		super(Item, self).after_rename(old_name, new_name, merge)
-		if self.page_name:
+		if self.route:
 			invalidate_cache_for_item(self)
-			clear_cache(self.page_name)
+			clear_cache(self.route)
 
 		frappe.db.set_value("Item", new_name, "item_code", new_name)
 
diff --git a/erpnext/stock/doctype/item/test_records.json b/erpnext/stock/doctype/item/test_records.json
index fcf2d0b..c05c5f3 100644
--- a/erpnext/stock/doctype/item/test_records.json
+++ b/erpnext/stock/doctype/item/test_records.json
@@ -227,6 +227,35 @@
        "warehouse_reorder_qty": 20
       }
   ]
+ },
+ {
+  "default_warehouse": "_Test Warehouse Group-C1 - _TC",
+  "description": "_Test Item 1",
+  "doctype": "Item",
+  "expense_account": "_Test Account Cost for Goods Sold - _TC",
+  "cost_center": "_Test Cost Center - _TC",
+  "has_batch_no": 0,
+  "has_serial_no": 0,
+  "income_account": "Sales - _TC",
+  "inspection_required": 0,
+  "is_stock_item": 1,
+  "is_sub_contracted_item": 0,
+  "item_code": "_Test Item Warehouse Group Wise Reorder",
+  "item_group": "_Test Item Group",
+  "item_name": "_Test Item Warehouse Group Wise Reorder",
+  "apply_warehouse_wise_reorder_level": 1,
+  "reorder_levels": [
+   {
+	"warehouse_group": "_Test Warehouse Group - _TC",
+    "material_request_type": "Purchase",
+    "warehouse": "_Test Warehouse Group-C1 - _TC",
+    "warehouse_reorder_level": 20,
+    "warehouse_reorder_qty": 20
+   }
+  ],
+  "stock_uom": "_Test UOM",
+  "show_in_website": 1,
+  "website_warehouse": "_Test Warehouse Group-C1 - _TC"
  }
 
 ]
diff --git a/erpnext/stock/doctype/item_reorder/item_reorder.json b/erpnext/stock/doctype/item_reorder/item_reorder.json
index fea8bf0..27a311d 100644
--- a/erpnext/stock/doctype/item_reorder/item_reorder.json
+++ b/erpnext/stock/doctype/item_reorder/item_reorder.json
@@ -3,19 +3,48 @@
  "allow_import": 0, 
  "allow_rename": 0, 
  "autoname": "hash", 
+ "beta": 0, 
  "creation": "2013-03-07 11:42:59", 
  "custom": 0, 
  "docstatus": 0, 
  "doctype": "DocType", 
+ "document_type": "Setup", 
  "fields": [
   {
    "allow_on_submit": 0, 
    "bold": 0, 
    "collapsible": 0, 
+   "fieldname": "warehouse_group", 
+   "fieldtype": "Link", 
+   "hidden": 0, 
+   "ignore_user_permissions": 0, 
+   "ignore_xss_filter": 0, 
+   "in_filter": 0, 
+   "in_list_view": 0, 
+   "label": "Warehouse Group", 
+   "length": 0, 
+   "no_copy": 0, 
+   "options": "Warehouse", 
+   "permlevel": 0, 
+   "precision": "", 
+   "print_hide": 0, 
+   "print_hide_if_no_value": 0, 
+   "read_only": 0, 
+   "report_hide": 0, 
+   "reqd": 0, 
+   "search_index": 0, 
+   "set_only_once": 0, 
+   "unique": 0
+  }, 
+  {
+   "allow_on_submit": 0, 
+   "bold": 0, 
+   "collapsible": 0, 
    "fieldname": "warehouse", 
    "fieldtype": "Link", 
    "hidden": 0, 
    "ignore_user_permissions": 0, 
+   "ignore_xss_filter": 0, 
    "in_filter": 0, 
    "in_list_view": 1, 
    "label": "Warehouse", 
@@ -24,6 +53,7 @@
    "options": "Warehouse", 
    "permlevel": 0, 
    "print_hide": 0, 
+   "print_hide_if_no_value": 0, 
    "read_only": 0, 
    "report_hide": 0, 
    "reqd": 1, 
@@ -39,6 +69,7 @@
    "fieldtype": "Float", 
    "hidden": 0, 
    "ignore_user_permissions": 0, 
+   "ignore_xss_filter": 0, 
    "in_filter": 0, 
    "in_list_view": 1, 
    "label": "Re-order Level", 
@@ -46,6 +77,7 @@
    "no_copy": 0, 
    "permlevel": 0, 
    "print_hide": 0, 
+   "print_hide_if_no_value": 0, 
    "read_only": 0, 
    "report_hide": 0, 
    "reqd": 1, 
@@ -61,6 +93,7 @@
    "fieldtype": "Float", 
    "hidden": 0, 
    "ignore_user_permissions": 0, 
+   "ignore_xss_filter": 0, 
    "in_filter": 0, 
    "in_list_view": 1, 
    "label": "Re-order Qty", 
@@ -68,6 +101,7 @@
    "no_copy": 0, 
    "permlevel": 0, 
    "print_hide": 0, 
+   "print_hide_if_no_value": 0, 
    "read_only": 0, 
    "report_hide": 0, 
    "reqd": 0, 
@@ -83,6 +117,7 @@
    "fieldtype": "Select", 
    "hidden": 0, 
    "ignore_user_permissions": 0, 
+   "ignore_xss_filter": 0, 
    "in_filter": 0, 
    "in_list_view": 1, 
    "label": "Material Request Type", 
@@ -91,6 +126,7 @@
    "options": "Purchase\nTransfer", 
    "permlevel": 0, 
    "print_hide": 0, 
+   "print_hide_if_no_value": 0, 
    "read_only": 0, 
    "report_hide": 0, 
    "reqd": 1, 
@@ -102,18 +138,21 @@
  "hide_heading": 0, 
  "hide_toolbar": 0, 
  "idx": 1, 
+ "image_view": 0, 
  "in_create": 1, 
  "in_dialog": 0, 
  "is_submittable": 0, 
  "issingle": 0, 
  "istable": 1, 
  "max_attachments": 0, 
- "modified": "2015-11-16 06:29:48.492627", 
+ "modified": "2016-06-20 15:52:01.978593", 
  "modified_by": "Administrator", 
  "module": "Stock", 
  "name": "Item Reorder", 
  "owner": "Administrator", 
  "permissions": [], 
+ "quick_entry": 0, 
  "read_only": 0, 
- "read_only_onload": 0
+ "read_only_onload": 0, 
+ "track_seen": 0
 }
\ No newline at end of file
diff --git a/erpnext/stock/doctype/purchase_receipt/purchase_receipt.py b/erpnext/stock/doctype/purchase_receipt/purchase_receipt.py
index 7cea640..70cef36 100644
--- a/erpnext/stock/doctype/purchase_receipt/purchase_receipt.py
+++ b/erpnext/stock/doctype/purchase_receipt/purchase_receipt.py
@@ -192,7 +192,8 @@
 					stock_value_diff = frappe.db.get_value("Stock Ledger Entry", 
 						{"voucher_type": "Purchase Receipt", "voucher_no": self.name, 
 						"voucher_detail_no": d.name}, "stock_value_difference")
-
+					if not stock_value_diff:
+						continue
 					gl_entries.append(self.get_gl_dict({
 						"account": warehouse_account[d.warehouse]["name"],
 						"against": stock_rbnb,
diff --git a/erpnext/stock/doctype/stock_entry/test_stock_entry.py b/erpnext/stock/doctype/stock_entry/test_stock_entry.py
index 0c33ff7..24d0546 100644
--- a/erpnext/stock/doctype/stock_entry/test_stock_entry.py
+++ b/erpnext/stock/doctype/stock_entry/test_stock_entry.py
@@ -79,8 +79,11 @@
 
 	def test_auto_material_request_for_variant(self):
 		self._test_auto_material_request("_Test Variant Item-S")
-
-	def _test_auto_material_request(self, item_code, material_request_type="Purchase"):
+	
+	def test_auto_material_request_for_warehouse_group(self):
+		self._test_auto_material_request("_Test Item Warehouse Group Wise Reorder", warehouse="_Test Warehouse Group-C1 - _TC")
+		
+	def _test_auto_material_request(self, item_code, material_request_type="Purchase", warehouse="_Test Warehouse - _TC"):
 		item = frappe.get_doc("Item", item_code)
 
 		if item.variant_of:
@@ -89,14 +92,14 @@
 			template = item
 
 		projected_qty, actual_qty = frappe.db.get_value("Bin", {"item_code": item_code,
-			"warehouse": "_Test Warehouse - _TC"}, ["projected_qty", "actual_qty"]) or [0, 0]
+			"warehouse": warehouse}, ["projected_qty", "actual_qty"]) or [0, 0]
 
 		# stock entry reqd for auto-reorder
-		create_stock_reconciliation(item_code=item_code, warehouse="_Test Warehouse - _TC",
+		create_stock_reconciliation(item_code=item_code, warehouse=warehouse,
 			qty = actual_qty + abs(projected_qty) + 10, rate=100)
 
 		projected_qty = frappe.db.get_value("Bin", {"item_code": item_code,
-			"warehouse": "_Test Warehouse - _TC"}, "projected_qty") or 0
+			"warehouse": warehouse}, "projected_qty") or 0
 
 		frappe.db.set_value("Stock Settings", None, "auto_indent", 1)
 
diff --git a/erpnext/stock/doctype/stock_ledger_entry/stock_ledger_entry.py b/erpnext/stock/doctype/stock_ledger_entry/stock_ledger_entry.py
index 9931ffa..2caabee 100644
--- a/erpnext/stock/doctype/stock_ledger_entry/stock_ledger_entry.py
+++ b/erpnext/stock/doctype/stock_ledger_entry/stock_ledger_entry.py
@@ -25,6 +25,7 @@
 		validate_warehouse_company(self.warehouse, self.company)
 		self.scrub_posting_time()
 		self.validate_and_set_fiscal_year()
+		self.block_transactions_against_group_warehouse()
 
 		from erpnext.accounts.utils import validate_fiscal_year
 		validate_fiscal_year(self.posting_date, self.fiscal_year, self.meta.get_label("posting_date"), self)
@@ -117,6 +118,9 @@
 		if not self.fiscal_year:
 			self.fiscal_year = get_fiscal_year(self.posting_date, company=self.company)[0]
 
+	def block_transactions_against_group_warehouse(self):
+		from erpnext.stock.utils import is_group_warehouse
+		is_group_warehouse(self.warehouse)
 
 def on_doctype_update():
 	if not frappe.db.sql("""show index from `tabStock Ledger Entry`
diff --git a/erpnext/stock/doctype/stock_reconciliation/test_stock_reconciliation.py b/erpnext/stock/doctype/stock_reconciliation/test_stock_reconciliation.py
index f0eea5a..9cc27b7 100644
--- a/erpnext/stock/doctype/stock_reconciliation/test_stock_reconciliation.py
+++ b/erpnext/stock/doctype/stock_reconciliation/test_stock_reconciliation.py
@@ -116,10 +116,11 @@
 def set_valuation_method(item_code, valuation_method):
 	frappe.db.set_value("Item", item_code, "valuation_method", valuation_method)
 
-	for warehouse in frappe.get_all("Warehouse", filters={"company": "_Test Company"}):
-		update_entries_after({
-			"item_code": item_code,
-			"warehouse": warehouse.name
-		}, allow_negative_stock=1)
+	for warehouse in frappe.get_all("Warehouse", filters={"company": "_Test Company"}, fields=["name", "is_group"]):
+		if warehouse.is_group == "No":
+			update_entries_after({
+				"item_code": item_code,
+				"warehouse": warehouse.name
+			}, allow_negative_stock=1)
 
 test_dependencies = ["Item", "Warehouse"]
diff --git a/erpnext/stock/doctype/warehouse/test_records.json b/erpnext/stock/doctype/warehouse/test_records.json
index e2162d2..c1dad5c 100644
--- a/erpnext/stock/doctype/warehouse/test_records.json
+++ b/erpnext/stock/doctype/warehouse/test_records.json
@@ -3,35 +3,68 @@
   "company": "_Test Company",
   "create_account_under": "Stock Assets - _TC",
   "doctype": "Warehouse",
-  "warehouse_name": "_Test Warehouse"
- },
- {
-  "company": "_Test Company",
-  "create_account_under": "Fixed Assets - _TC",
-  "doctype": "Warehouse",
-  "warehouse_name": "_Test Warehouse 1"
- },
- {
-  "company": "_Test Company",
-  "create_account_under": "Fixed Assets - _TC",
-  "doctype": "Warehouse",
-  "warehouse_name": "_Test Warehouse 2"
+  "warehouse_name": "_Test Warehouse",
+  "is_group": "No"
  },
  {
   "company": "_Test Company",
   "create_account_under": "Stock Assets - _TC",
   "doctype": "Warehouse",
-  "warehouse_name": "_Test Rejected Warehouse"
+  "warehouse_name": "_Test Warehouse",
+  "is_group": "No"
+ },
+ {
+  "company": "_Test Company",
+  "create_account_under": "Fixed Assets - _TC",
+  "doctype": "Warehouse",
+  "warehouse_name": "_Test Warehouse 1",
+  "is_group": "No"
+ },
+ {
+  "company": "_Test Company",
+  "create_account_under": "Fixed Assets - _TC",
+  "doctype": "Warehouse",
+  "warehouse_name": "_Test Warehouse 2",
+  "is_group": "No"
+ },
+ {
+  "company": "_Test Company",
+  "create_account_under": "Stock Assets - _TC",
+  "doctype": "Warehouse",
+  "warehouse_name": "_Test Rejected Warehouse",
+  "is_group": "No"
  },
  {
   "company": "_Test Company 1",
   "create_account_under": "Stock Assets - _TC1",
   "doctype": "Warehouse",
-  "warehouse_name": "_Test Warehouse 2"
+  "warehouse_name": "_Test Warehouse 2",
+  "is_group": "No"
  },
  {
   "company": "_Test Company",
   "doctype": "Warehouse",
-  "warehouse_name": "_Test Warehouse No Account"
+  "warehouse_name": "_Test Warehouse No Account",
+  "is_group": "No"
+ },
+ {
+  "company": "_Test Company",
+  "doctype": "Warehouse",
+  "warehouse_name": "_Test Warehouse Group",
+  "is_group": "Yes"
+ },
+ {
+  "company": "_Test Company",
+  "doctype": "Warehouse",
+  "warehouse_name": "_Test Warehouse Group-C1",
+  "is_group": "No",
+  "parent_warehouse": "_Test Warehouse Group - _TC"
+ },
+ {
+  "company": "_Test Company",
+  "doctype": "Warehouse",
+  "warehouse_name": "_Test Warehouse Group-C2",
+  "is_group": "No",
+  "parent_warehouse": "_Test Warehouse Group - _TC"
  }
 ]
diff --git a/erpnext/stock/doctype/warehouse/test_warehouse.py b/erpnext/stock/doctype/warehouse/test_warehouse.py
index ca80ca7..b6eaa13 100644
--- a/erpnext/stock/doctype/warehouse/test_warehouse.py
+++ b/erpnext/stock/doctype/warehouse/test_warehouse.py
@@ -4,4 +4,22 @@
 
 
 import frappe
-test_records = frappe.get_test_records('Warehouse')
\ No newline at end of file
+import unittest
+test_records = frappe.get_test_records('Warehouse')
+
+class TestWarehouse(unittest.TestCase):
+	def test_parent_warehouse(self):
+		parent_warehouse = frappe.get_doc("Warehouse", "_Test Warehouse Group - _TC")
+		self.assertEquals(parent_warehouse.is_group, "Yes")
+		
+	def test_warehouse_hierarchy(self):
+		p_warehouse = frappe.get_doc("Warehouse", "_Test Warehouse Group - _TC")
+		
+		child_warehouses =  frappe.db.sql("""select name, is_group, parent_warehouse from `tabWarehouse` wh
+			where wh.lft > %s and wh.rgt < %s""", (p_warehouse.lft, p_warehouse.rgt), as_dict=1)
+		
+		for child_warehouse in child_warehouses:
+			self.assertEquals(p_warehouse.name, child_warehouse.parent_warehouse)
+			self.assertEquals(child_warehouse.is_group, "No")
+		
+		
diff --git a/erpnext/stock/doctype/warehouse/warehouse.js b/erpnext/stock/doctype/warehouse/warehouse.js
index f1f0b66..b7a3a34 100644
--- a/erpnext/stock/doctype/warehouse/warehouse.js
+++ b/erpnext/stock/doctype/warehouse/warehouse.js
@@ -1,6 +1,7 @@
 // Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors
 // License: GNU General Public License v3. See license.txt
 
+
 frappe.ui.form.on("Warehouse", {
 	refresh: function(frm) {
 		frm.toggle_display('warehouse_name', frm.doc.__islocal);
@@ -17,10 +18,20 @@
 				frappe.set_route("query-report", "General Ledger");
 			});
  		}
+		
+		frm.fields_dict['parent_warehouse'].get_query = function(doc) {
+			return {
+				filters: {
+					"is_group": "Yes",
+				}
+			}
+		}
 	}
 });
 
 
+
+
 cur_frm.set_query("create_account_under", function() {
 	return {
 		filters: {
diff --git a/erpnext/stock/doctype/warehouse/warehouse.json b/erpnext/stock/doctype/warehouse/warehouse.json
index 4e9dd07..1a3a97f 100644
--- a/erpnext/stock/doctype/warehouse/warehouse.json
+++ b/erpnext/stock/doctype/warehouse/warehouse.json
@@ -2,6 +2,7 @@
  "allow_copy": 0, 
  "allow_import": 1, 
  "allow_rename": 1, 
+ "beta": 0, 
  "creation": "2013-03-07 18:50:32", 
  "custom": 0, 
  "description": "A logical Warehouse against which stock entries are made.", 
@@ -420,19 +421,173 @@
    "search_index": 0, 
    "set_only_once": 0, 
    "unique": 0
+  }, 
+  {
+   "allow_on_submit": 0, 
+   "bold": 0, 
+   "collapsible": 1, 
+   "fieldname": "tree_details", 
+   "fieldtype": "Section Break", 
+   "hidden": 0, 
+   "ignore_user_permissions": 0, 
+   "ignore_xss_filter": 0, 
+   "in_filter": 0, 
+   "in_list_view": 0, 
+   "label": "Tree Details", 
+   "length": 0, 
+   "no_copy": 0, 
+   "permlevel": 0, 
+   "precision": "", 
+   "print_hide": 0, 
+   "print_hide_if_no_value": 0, 
+   "read_only": 0, 
+   "report_hide": 0, 
+   "reqd": 0, 
+   "search_index": 0, 
+   "set_only_once": 0, 
+   "unique": 0
+  }, 
+  {
+   "allow_on_submit": 0, 
+   "bold": 0, 
+   "collapsible": 0, 
+   "fieldname": "parent_warehouse", 
+   "fieldtype": "Link", 
+   "hidden": 0, 
+   "ignore_user_permissions": 1, 
+   "ignore_xss_filter": 0, 
+   "in_filter": 0, 
+   "in_list_view": 0, 
+   "label": "Parent Warehouse", 
+   "length": 0, 
+   "no_copy": 0, 
+   "options": "Warehouse", 
+   "permlevel": 0, 
+   "precision": "", 
+   "print_hide": 0, 
+   "print_hide_if_no_value": 0, 
+   "read_only": 0, 
+   "report_hide": 0, 
+   "reqd": 0, 
+   "search_index": 1, 
+   "set_only_once": 0, 
+   "unique": 0
+  }, 
+  {
+   "allow_on_submit": 0, 
+   "bold": 0, 
+   "collapsible": 0, 
+   "fieldname": "is_group", 
+   "fieldtype": "Select", 
+   "hidden": 0, 
+   "ignore_user_permissions": 0, 
+   "ignore_xss_filter": 0, 
+   "in_filter": 0, 
+   "in_list_view": 1, 
+   "label": "Has Child Node", 
+   "length": 0, 
+   "no_copy": 0, 
+   "options": "\nYes\nNo", 
+   "permlevel": 0, 
+   "precision": "", 
+   "print_hide": 0, 
+   "print_hide_if_no_value": 0, 
+   "read_only": 0, 
+   "report_hide": 0, 
+   "reqd": 1, 
+   "search_index": 0, 
+   "set_only_once": 0, 
+   "unique": 0
+  }, 
+  {
+   "allow_on_submit": 0, 
+   "bold": 0, 
+   "collapsible": 0, 
+   "fieldname": "lft", 
+   "fieldtype": "Int", 
+   "hidden": 1, 
+   "ignore_user_permissions": 0, 
+   "ignore_xss_filter": 0, 
+   "in_filter": 0, 
+   "in_list_view": 0, 
+   "label": "lft", 
+   "length": 0, 
+   "no_copy": 0, 
+   "permlevel": 0, 
+   "precision": "", 
+   "print_hide": 0, 
+   "print_hide_if_no_value": 0, 
+   "read_only": 1, 
+   "report_hide": 0, 
+   "reqd": 0, 
+   "search_index": 0, 
+   "set_only_once": 0, 
+   "unique": 0
+  }, 
+  {
+   "allow_on_submit": 0, 
+   "bold": 0, 
+   "collapsible": 0, 
+   "fieldname": "rgt", 
+   "fieldtype": "Int", 
+   "hidden": 1, 
+   "ignore_user_permissions": 0, 
+   "ignore_xss_filter": 0, 
+   "in_filter": 0, 
+   "in_list_view": 0, 
+   "label": "rgt", 
+   "length": 0, 
+   "no_copy": 0, 
+   "permlevel": 0, 
+   "precision": "", 
+   "print_hide": 0, 
+   "print_hide_if_no_value": 0, 
+   "read_only": 1, 
+   "report_hide": 0, 
+   "reqd": 0, 
+   "search_index": 0, 
+   "set_only_once": 0, 
+   "unique": 0
+  }, 
+  {
+   "allow_on_submit": 0, 
+   "bold": 0, 
+   "collapsible": 0, 
+   "fieldname": "old_parent", 
+   "fieldtype": "Link", 
+   "hidden": 1, 
+   "ignore_user_permissions": 0, 
+   "ignore_xss_filter": 0, 
+   "in_filter": 0, 
+   "in_list_view": 0, 
+   "label": "Old Parent", 
+   "length": 0, 
+   "no_copy": 0, 
+   "options": "Warehouse", 
+   "permlevel": 0, 
+   "precision": "", 
+   "print_hide": 0, 
+   "print_hide_if_no_value": 0, 
+   "read_only": 1, 
+   "report_hide": 0, 
+   "reqd": 0, 
+   "search_index": 0, 
+   "set_only_once": 0, 
+   "unique": 0
   }
  ], 
  "hide_heading": 0, 
  "hide_toolbar": 0, 
  "icon": "icon-building", 
  "idx": 1, 
+ "image_view": 0, 
  "in_create": 0, 
  "in_dialog": 0, 
  "is_submittable": 0, 
  "issingle": 0, 
  "istable": 0, 
  "max_attachments": 0, 
- "modified": "2016-04-18 05:44:24.837579", 
+ "modified": "2016-06-25 18:21:05.175172", 
  "modified_by": "Administrator", 
  "module": "Stock", 
  "name": "Warehouse", 
diff --git a/erpnext/stock/doctype/warehouse/warehouse.py b/erpnext/stock/doctype/warehouse/warehouse.py
index 901b229..57da471 100644
--- a/erpnext/stock/doctype/warehouse/warehouse.py
+++ b/erpnext/stock/doctype/warehouse/warehouse.py
@@ -5,10 +5,11 @@
 import frappe
 from frappe.utils import cint, validate_email_add
 from frappe import throw, msgprint, _
+from frappe.utils.nestedset import NestedSet
 
-from frappe.model.document import Document
-
-class Warehouse(Document):
+class Warehouse(NestedSet):
+	nsm_parent_field = 'parent_warehouse'
+	
 	def autoname(self):
 		suffix = " - " + frappe.db.get_value("Company", self.company, "abbr")
 		if not self.warehouse_name.endswith(suffix):
@@ -45,6 +46,7 @@
 
 	def on_update(self):
 		self.create_account_head()
+		self.update_nsm_model()
 
 	def create_account_head(self):
 		if cint(frappe.defaults.get_global_default("auto_accounting_for_stock")):
@@ -55,8 +57,9 @@
 					ac_doc = frappe.get_doc({
 						"doctype": "Account",
 						'account_name': self.warehouse_name,
-						'parent_account': self.create_account_under,
-						'is_group':0,
+						'parent_account': self.parent_warehouse if self.parent_warehouse \
+							else self.create_account_under,
+						'is_group': 1 if self.is_group=="Yes" else 0 ,
 						'company':self.company,
 						"account_type": "Warehouse",
 						"warehouse": self.name,
@@ -71,17 +74,21 @@
 			frappe.throw(_("Warehouse {0}: Company is mandatory").format(self.name))
 
 		if not self.create_account_under:
-			parent_account = frappe.db.get_value("Account",
-				{"account_name": "Stock Assets", "company": self.company})
+			parent_account = frappe.db.sql("""select name from tabAccount 
+				where account_type='Stock' and company=%s and is_group=1 
+				and (warehouse is null or warehouse = '')""", self.company)
 
 			if parent_account:
-				self.create_account_under = parent_account
+				frappe.db.set_value("Warehouse", self.name, "create_account_under", parent_account[0][0])
+				self.create_account_under = parent_account[0][0]
 			else:
 				frappe.throw(_("Please enter parent account group for warehouse {0}").format(self.name))
 		elif frappe.db.get_value("Account", self.create_account_under, "company") != self.company:
 			frappe.throw(_("Warehouse {0}: Parent account {1} does not bolong to the company {2}")
 				.format(self.name, self.create_account_under, self.company))
-
+	
+	def update_nsm_model(self):
+		frappe.utils.nestedset.update_nsm(self)
 
 	def on_trash(self):
 		# delete bin
@@ -101,6 +108,11 @@
 		if frappe.db.sql("""select name from `tabStock Ledger Entry`
 				where warehouse = %s""", self.name):
 			throw(_("Warehouse can not be deleted as stock ledger entry exists for this warehouse."))
+		
+		if frappe.db.sql("""select name from `tabWarehouse` where parent_warehouse = %s""", self.name):
+			throw(_("Child warehouse exists for this warehouse. You can not delete this warehouse."))
+		
+		self.update_nsm_model()
 
 	def before_rename(self, olddn, newdn, merge=False):
 		# Add company abbr if not provided
@@ -161,3 +173,51 @@
 
 		frappe.db.set_value("Stock Settings", None, "allow_negative_stock", existing_allow_negative_stock)
 		frappe.db.auto_commit_on_many_writes = 0
+
+@frappe.whitelist()
+def get_children():
+	from erpnext.stock.utils import get_stock_value_on
+	doctype = frappe.local.form_dict.get('doctype')
+	company = frappe.local.form_dict.get('company')
+	
+	parent_field = 'parent_' + doctype.lower().replace(' ', '_')
+	parent = frappe.form_dict.get("parent") or ""
+	
+	if parent == "Warehouses":
+		parent = ""
+
+	warehouses = frappe.db.sql("""select name as value,
+		if(is_group='Yes', 1, 0) as expandable
+		from `tab{doctype}`
+		where docstatus < 2
+		and ifnull(`{parent_field}`,'') = %s and `company` = %s
+		order by name""".format(doctype=frappe.db.escape(doctype), parent_field=frappe.db.escape(parent_field)),
+		(parent, company), as_dict=1)
+	
+	# return warehouses
+	for wh in warehouses:
+		wh["balance"] = get_stock_value_on(warehouse=wh.value)
+	return warehouses
+		
+@frappe.whitelist()
+def add_node():
+	doctype = frappe.form_dict.get('doctype')
+	company = frappe.form_dict.get('company')
+	parent_field = 'parent_' + doctype.lower().replace(' ', '_')
+	name_field = doctype.lower().replace(' ', '_') + '_name'
+	
+	doc = frappe.new_doc(doctype)
+	
+	parent = frappe.form_dict['parent']
+	
+	if cint(frappe.form_dict['is_root']):
+		parent = None
+
+	doc.update({
+		name_field: frappe.form_dict['name_field'],
+		parent_field: parent,
+		"is_group": frappe.form_dict['is_group'],
+		"company": company
+	})
+	
+	doc.save()
diff --git a/erpnext/stock/doctype/warehouse/warehouse_tree.js b/erpnext/stock/doctype/warehouse/warehouse_tree.js
new file mode 100644
index 0000000..0361493
--- /dev/null
+++ b/erpnext/stock/doctype/warehouse/warehouse_tree.js
@@ -0,0 +1,20 @@
+frappe.treeview_settings['Warehouse'] = {
+	get_tree_nodes: "erpnext.stock.doctype.warehouse.warehouse.get_children",
+	add_tree_node: "erpnext.stock.doctype.warehouse.warehouse.add_node",
+	get_tree_root: false,
+	root_label: "Warehouses",
+	filters: [{
+		fieldname: "company",
+		fieldtype:"Select",
+		options: $.map(locals[':Company'], function(c) { return c.name; }).sort(),
+		label: __("Company"),
+		default: frappe.defaults.get_default('company') ? frappe.defaults.get_default('company'): ""
+	}],
+	onrender: function(node) {
+		if (node.data && node.data.balance!==undefined) {
+			$('<span class="balance-area pull-right text-muted small">'
+			+ format_currency(Math.abs(node.data.balance), node.data.company_currency)
+			+ '</span>').insertBefore(node.$ul);
+		}
+	}
+}
\ No newline at end of file
diff --git a/erpnext/stock/reorder_item.py b/erpnext/stock/reorder_item.py
index 4531913..ad810a9 100644
--- a/erpnext/stock/reorder_item.py
+++ b/erpnext/stock/reorder_item.py
@@ -37,7 +37,7 @@
 
 	item_warehouse_projected_qty = get_item_warehouse_projected_qty(items_to_consider)
 
-	def add_to_material_request(item_code, warehouse, reorder_level, reorder_qty, material_request_type):
+	def add_to_material_request(item_code, warehouse, reorder_level, reorder_qty, material_request_type, warehouse_group=None):
 		if warehouse not in warehouse_company:
 			# a disabled warehouse
 			return
@@ -46,7 +46,10 @@
 		reorder_qty = flt(reorder_qty)
 
 		# projected_qty will be 0 if Bin does not exist
-		projected_qty = flt(item_warehouse_projected_qty.get(item_code, {}).get(warehouse))
+		if warehouse_group:
+			projected_qty = flt(item_warehouse_projected_qty.get(item_code, {}).get(warehouse_group))
+		else:
+			projected_qty = flt(item_warehouse_projected_qty.get(item_code, {}).get(warehouse))
 
 		if (reorder_level or reorder_qty) and projected_qty < reorder_level:
 			deficiency = reorder_level - projected_qty
@@ -70,7 +73,7 @@
 		if item.get("reorder_levels"):
 			for d in item.get("reorder_levels"):
 				add_to_material_request(item_code, d.warehouse, d.warehouse_reorder_level,
-					d.warehouse_reorder_qty, d.material_request_type)
+					d.warehouse_reorder_qty, d.material_request_type, warehouse_group=d.warehouse_group)
 
 	if material_requests:
 		return create_material_request(material_requests)
@@ -82,9 +85,17 @@
 		from tabBin where item_code in ({0})
 			and (warehouse != "" and warehouse is not null)"""\
 		.format(", ".join(["%s"] * len(items_to_consider))), items_to_consider):
-
+		
 		item_warehouse_projected_qty.setdefault(item_code, {})[warehouse] = flt(projected_qty)
-
+		
+		warehouse_doc = frappe.get_doc("Warehouse", warehouse)
+		
+		if warehouse_doc.parent_warehouse:
+			if not item_warehouse_projected_qty.get(item_code, {}).get(warehouse_doc.parent_warehouse):
+				item_warehouse_projected_qty.setdefault(item_code, {})[warehouse_doc.parent_warehouse] = flt(projected_qty)
+			else:
+				item_warehouse_projected_qty[item_code][warehouse_doc.parent_warehouse] += flt(projected_qty)
+				
 	return item_warehouse_projected_qty
 
 def create_material_request(material_requests):
diff --git a/erpnext/stock/report/stock_balance/stock_balance.py b/erpnext/stock/report/stock_balance/stock_balance.py
index 43b6b9a..696f2b0 100644
--- a/erpnext/stock/report/stock_balance/stock_balance.py
+++ b/erpnext/stock/report/stock_balance/stock_balance.py
@@ -71,7 +71,9 @@
 		conditions += " and item_code = '%s'" % frappe.db.escape(filters.get("item_code"), percent=False)
 
 	if filters.get("warehouse"):
-		conditions += " and warehouse = '%s'" % frappe.db.escape(filters.get("warehouse"), percent=False)
+		lft, rgt = frappe.db.get_value("Warehouse", filters.get("warehouse"), ["lft", "rgt"])
+		conditions += " and exists (select name from `tabWarehouse` wh \
+			where wh.lft >= %s and wh.rgt <= %s and sle.warehouse = wh.name)"%(lft, rgt)
 
 	return conditions
 
@@ -79,9 +81,9 @@
 	conditions = get_conditions(filters)
 	return frappe.db.sql("""select item_code, warehouse, posting_date, actual_qty, valuation_rate,
 			company, voucher_type, qty_after_transaction, stock_value_difference
-		from `tabStock Ledger Entry` force index (posting_sort_index)
+		from `tabStock Ledger Entry` sle force index (posting_sort_index)
 		where docstatus < 2 %s order by posting_date, posting_time, name""" %
-		conditions, as_dict=1)
+		conditions, as_dict=1, debug=1)
 
 def get_item_warehouse_map(filters):
 	iwb_map = {}
diff --git a/erpnext/stock/report/stock_ledger/stock_ledger.py b/erpnext/stock/report/stock_ledger/stock_ledger.py
index ac4cbbd..b2e4670 100644
--- a/erpnext/stock/report/stock_ledger/stock_ledger.py
+++ b/erpnext/stock/report/stock_ledger/stock_ledger.py
@@ -41,7 +41,7 @@
 	return frappe.db.sql("""select concat_ws(" ", posting_date, posting_time) as date,
 			item_code, warehouse, actual_qty, qty_after_transaction, incoming_rate, valuation_rate,
 			stock_value, voucher_type, voucher_no, batch_no, serial_no, company
-		from `tabStock Ledger Entry`
+		from `tabStock Ledger Entry` sle
 		where company = %(company)s and
 			posting_date between %(from_date)s and %(to_date)s
 			{sle_conditions}
@@ -73,7 +73,7 @@
 		conditions.append("""item_code in (select name from tabItem
 			{item_conditions})""".format(item_conditions=item_conditions))
 	if filters.get("warehouse"):
-		conditions.append("warehouse=%(warehouse)s")
+		conditions.append(get_warehouse_condition(filters.get("warehouse")))
 	if filters.get("voucher_no"):
 		conditions.append("voucher_no=%(voucher_no)s")
 
@@ -86,7 +86,7 @@
 	from erpnext.stock.stock_ledger import get_previous_sle
 	last_entry = get_previous_sle({
 		"item_code": filters.item_code,
-		"warehouse": filters.warehouse,
+		"warehouse": get_warehouse_condition(filters.warehouse),
 		"posting_date": filters.from_date,
 		"posting_time": "00:00:00"
 	})
@@ -96,4 +96,11 @@
 	for i, v in ((9, 'qty_after_transaction'), (11, 'valuation_rate'), (12, 'stock_value')):
 			row[i] = last_entry.get(v, 0)
 		
-	return row
\ No newline at end of file
+	return row
+	
+def get_warehouse_condition(warehouse):
+	lft, rgt = frappe.db.get_value("Warehouse", warehouse, ["lft", "rgt"])
+	
+	return " exists (select name from `tabWarehouse` wh \
+		where wh.lft >= %s and wh.rgt <= %s and sle.warehouse = wh.name)"%(lft, rgt)
+	
\ No newline at end of file
diff --git a/erpnext/stock/report/stock_projected_qty/stock_projected_qty.py b/erpnext/stock/report/stock_projected_qty/stock_projected_qty.py
index 89963ab..409833a 100644
--- a/erpnext/stock/report/stock_projected_qty/stock_projected_qty.py
+++ b/erpnext/stock/report/stock_projected_qty/stock_projected_qty.py
@@ -57,16 +57,20 @@
 	return data
 
 def get_bin_list(filters):
-	bin_filters = frappe._dict()
+	conditions = []
+	
 	if filters.item_code:
-		bin_filters.item_code = filters.item_code
+		conditions.append("item_code = '%s' "%filters.item_code)
+		
 	if filters.warehouse:
-		bin_filters.warehouse = filters.warehouse
+		lft, rgt = frappe.db.get_value("Warehouse", filters.warehouse, ["lft", "rgt"])
+	
+		conditions.append(" exists (select name from `tabWarehouse` wh \
+			where wh.lft >= %s and wh.rgt <= %s and sle.warehouse = wh.name)"%(lft, rgt))
 
-	bin_list = frappe.get_all("Bin", fields=["item_code", "warehouse",
-		"actual_qty", "planned_qty", "indented_qty", "ordered_qty", "reserved_qty",
-		"reserved_qty_for_production", "projected_qty"],
-		filters=bin_filters, order_by="item_code, warehouse")
+	bin_list = frappe.db.sql("""select item_code, warehouse, actual_qty, planned_qty, indented_qty,
+		ordered_qty, reserved_qty, reserved_qty_for_production, projected_qty
+		from tabBin where %s order by item_code, warehouse """% " and ".join(conditions), as_dict=1,debug=1)
 
 	return bin_list
 
diff --git a/erpnext/stock/stock_ledger.py b/erpnext/stock/stock_ledger.py
index 292bd61..096a5e0 100644
--- a/erpnext/stock/stock_ledger.py
+++ b/erpnext/stock/stock_ledger.py
@@ -229,27 +229,35 @@
 				# calculate new valuation rate only if stock value is positive
 				# else it remains the same as that of previous entry
 				self.valuation_rate = new_stock_value / new_stock_qty
-
+		
 	def get_moving_average_values(self, sle):
 		actual_qty = flt(sle.actual_qty)
+		new_stock_qty = flt(self.qty_after_transaction) + actual_qty
+		if new_stock_qty >= 0:
+			if actual_qty > 0:
+				if flt(self.qty_after_transaction) <= 0:
+					self.valuation_rate = sle.incoming_rate
+				else:
+					new_stock_value = (self.qty_after_transaction * self.valuation_rate) + \
+						(actual_qty * sle.incoming_rate)
 
-		if actual_qty > 0 or flt(sle.outgoing_rate) > 0:
-			rate = flt(sle.incoming_rate) if actual_qty > 0 else flt(sle.outgoing_rate)
+					self.valuation_rate = new_stock_value / new_stock_qty
 
-			if self.qty_after_transaction < 0 and not self.valuation_rate:
-				# if negative stock, take current valuation rate as incoming rate
-				self.valuation_rate = rate
+			elif sle.outgoing_rate:
+				if new_stock_qty:
+					new_stock_value = (self.qty_after_transaction * self.valuation_rate) + \
+						(actual_qty * sle.outgoing_rate)
 
-			new_stock_qty = abs(self.qty_after_transaction) + actual_qty
-			new_stock_value = (abs(self.qty_after_transaction) * self.valuation_rate) + (actual_qty * rate)
+					self.valuation_rate = new_stock_value / new_stock_qty
+				else:
+					self.valuation_rate = self.outgoing_rate
 
-			if new_stock_qty:
-				self.valuation_rate = new_stock_value / flt(new_stock_qty)
+		else:
+			if flt(self.qty_after_transaction) >= 0 and sle.outgoing_rate:
+				self.valuation_rate = sle.outgoing_rate
 
-		elif not self.valuation_rate and self.qty_after_transaction <= 0:
-			self.valuation_rate = get_valuation_rate(sle.item_code, sle.warehouse, self.allow_zero_rate)
-
-		self.valuation_rate = abs(flt(self.valuation_rate))
+			if not self.valuation_rate and actual_qty > 0:
+				self.valuation_rate = sle.incoming_rate
 
 	def get_fifo_values(self, sle):
 		incoming_rate = flt(sle.incoming_rate)
@@ -268,10 +276,7 @@
 					self.stock_queue.append([actual_qty, incoming_rate])
 				else:
 					qty = self.stock_queue[-1][0] + actual_qty
-					if qty == 0:
-						self.stock_queue.pop(-1)
-					else:
-						self.stock_queue[-1] = [qty, incoming_rate]
+					self.stock_queue[-1] = [qty, incoming_rate]
 		else:
 			qty_to_pop = abs(actual_qty)
 			while qty_to_pop:
@@ -298,7 +303,7 @@
 						break
 				else:
 					index = 0
-
+					
 				# select first batch or the batch with same rate
 				batch = self.stock_queue[index]
 				if qty_to_pop >= batch[0]:
@@ -320,7 +325,11 @@
 		stock_value = sum((flt(batch[0]) * flt(batch[1]) for batch in self.stock_queue))
 		stock_qty = sum((flt(batch[0]) for batch in self.stock_queue))
 
-		self.valuation_rate = (stock_value / flt(stock_qty)) if stock_qty else 0
+		if stock_qty:
+			self.valuation_rate = stock_value / flt(stock_qty)
+		
+		if not self.stock_queue:
+			self.stock_queue.append([0, sle.incoming_rate or sle.outgoing_rate or self.valuation_rate])
 
 	def get_sle_before_datetime(self):
 		"""get previous stock ledger entry before current time-bucket"""
diff --git a/erpnext/stock/utils.py b/erpnext/stock/utils.py
index 3f9de86..51d82a6 100644
--- a/erpnext/stock/utils.py
+++ b/erpnext/stock/utils.py
@@ -15,24 +15,34 @@
 	values, condition = [posting_date], ""
 
 	if warehouse:
-		values.append(warehouse)
-		condition += " AND warehouse = %s"
+		
+		lft, rgt, is_group = frappe.db.get_value("Warehouse", warehouse, ["lft", "rgt", "is_group"])
+		
+		if is_group == "Yes":
+			values.extend([lft, rgt])
+			condition += "and exists (\
+				select name from `tabWarehouse` wh where wh.name = sle.warehouse\
+				and wh.lft >= %s and wh.rgt <= %s)"
+		
+		else:
+			values.append(warehouse)
+			condition += " AND warehouse = %s"
 
 	if item_code:
 		values.append(item_code)
 		condition.append(" AND item_code = %s")
 
 	stock_ledger_entries = frappe.db.sql("""
-		SELECT item_code, stock_value
-		FROM `tabStock Ledger Entry`
+		SELECT item_code, stock_value, name, warehouse
+		FROM `tabStock Ledger Entry` sle
 		WHERE posting_date <= %s {0}
 		ORDER BY timestamp(posting_date, posting_time) DESC, name DESC
 	""".format(condition), values, as_dict=1)
 
 	sle_map = {}
 	for sle in stock_ledger_entries:
-		sle_map.setdefault(sle.item_code, flt(sle.stock_value))
-
+		sle_map[sle.item_code] = sle_map.get(sle.item_code, 0.0) + flt(sle.stock_value)
+		
 	return sum(sle_map.values())
 
 def get_stock_balance(item_code, warehouse, posting_date=None, posting_time=None, with_valuation_rate=False):
@@ -177,3 +187,8 @@
 	if warehouse_company and warehouse_company != company:
 		frappe.throw(_("Warehouse {0} does not belong to company {1}").format(warehouse, company),
 			InvalidWarehouseCompany)
+
+def is_group_warehouse(warehouse):
+	if frappe.db.get_value("Warehouse", warehouse, "is_group") == "Yes":
+		frappe.throw(_("Group node warehouse is not allowed to select for transactions"))
+	
\ No newline at end of file
diff --git a/erpnext/support/doctype/issue/issue.py b/erpnext/support/doctype/issue/issue.py
index ab8e6d8..36d0876 100644
--- a/erpnext/support/doctype/issue/issue.py
+++ b/erpnext/support/doctype/issue/issue.py
@@ -64,7 +64,7 @@
 	}
 
 def get_issue_list(doctype, txt, filters, limit_start, limit_page_length=20):
-	from frappe.templates.pages.list import get_list
+	from frappe.www.list import get_list
 	user = frappe.session.user
 	ignore_permissions = False
 	if is_website_user():
diff --git a/erpnext/manufacturing/page/bom_browser/__init__.py b/erpnext/support/web_form/__init__.py
similarity index 100%
copy from erpnext/manufacturing/page/bom_browser/__init__.py
copy to erpnext/support/web_form/__init__.py
diff --git a/erpnext/manufacturing/page/bom_browser/__init__.py b/erpnext/support/web_form/issues/__init__.py
similarity index 100%
copy from erpnext/manufacturing/page/bom_browser/__init__.py
copy to erpnext/support/web_form/issues/__init__.py
diff --git a/erpnext/support/web_form/issues/issues.js b/erpnext/support/web_form/issues/issues.js
new file mode 100644
index 0000000..699703c
--- /dev/null
+++ b/erpnext/support/web_form/issues/issues.js
@@ -0,0 +1,3 @@
+frappe.ready(function() {
+	// bind events here
+})
\ No newline at end of file
diff --git a/erpnext/support/web_form/issues/issues.json b/erpnext/support/web_form/issues/issues.json
new file mode 100644
index 0000000..4b7c70c
--- /dev/null
+++ b/erpnext/support/web_form/issues/issues.json
@@ -0,0 +1,60 @@
+{
+ "allow_comments": 1, 
+ "allow_delete": 1, 
+ "allow_edit": 1, 
+ "allow_multiple": 1, 
+ "breadcrumbs": "[{\"title\":\"Issues\", \"name\":\"issues\"}]", 
+ "creation": "2016-06-24 15:50:33.186483", 
+ "doc_type": "Issue", 
+ "docstatus": 0, 
+ "doctype": "Web Form", 
+ "idx": 0, 
+ "is_standard": 1, 
+ "login_required": 1, 
+ "modified": "2016-06-24 15:52:24.768558", 
+ "modified_by": "Administrator", 
+ "module": "Support", 
+ "name": "issues", 
+ "owner": "Administrator", 
+ "published": 1, 
+ "route": "issues", 
+ "success_message": "", 
+ "success_url": "/issues", 
+ "title": "Issue", 
+ "web_form_fields": [
+  {
+   "fieldname": "subject", 
+   "fieldtype": "Data", 
+   "hidden": 0, 
+   "label": "Subject", 
+   "read_only": 0, 
+   "reqd": 1
+  }, 
+  {
+   "default": "Open", 
+   "fieldname": "status", 
+   "fieldtype": "Select", 
+   "hidden": 0, 
+   "label": "Status", 
+   "options": "Open\nReplied\nHold\nClosed", 
+   "read_only": 1, 
+   "reqd": 0
+  }, 
+  {
+   "fieldname": "description", 
+   "fieldtype": "Text", 
+   "hidden": 0, 
+   "label": "Description", 
+   "read_only": 0, 
+   "reqd": 0
+  }, 
+  {
+   "fieldname": "attachment", 
+   "fieldtype": "Attach", 
+   "hidden": 0, 
+   "label": "Attachment", 
+   "read_only": 0, 
+   "reqd": 0
+  }
+ ]
+}
\ No newline at end of file
diff --git a/erpnext/support/web_form/issues/issues.py b/erpnext/support/web_form/issues/issues.py
new file mode 100644
index 0000000..2334f8b
--- /dev/null
+++ b/erpnext/support/web_form/issues/issues.py
@@ -0,0 +1,7 @@
+from __future__ import unicode_literals
+
+import frappe
+
+def get_context(context):
+	# do your magic here
+	pass
diff --git a/erpnext/templates/includes/products_as_grid.html b/erpnext/templates/includes/products_as_grid.html
index 0a66de2..7a15c1f 100644
--- a/erpnext/templates/includes/products_as_grid.html
+++ b/erpnext/templates/includes/products_as_grid.html
@@ -1,6 +1,6 @@
 {% from "erpnext/templates/includes/macros.html" import product_image_square %}
 
-<a class="product-link" href="{{ (route or page_name)|abs_url }}">
+<a class="product-link" href="{{ route|abs_url }}">
 	<div class="col-sm-4 col-xs-4 product-image-wrapper">
 		<div class="product-image-img">
 		{{ product_image_square(thumbnail or website_image) }}
diff --git a/erpnext/templates/includes/products_as_list.html b/erpnext/templates/includes/products_as_list.html
index a5523a9..b2069e4 100644
--- a/erpnext/templates/includes/products_as_list.html
+++ b/erpnext/templates/includes/products_as_list.html
@@ -1,6 +1,6 @@
 {% from "erpnext/templates/includes/macros.html" import product_image_square %}
 
-<a class="product-link product-list-link" href="{{ (route or page_name)|abs_url }}">
+<a class="product-link product-list-link" href="{{ route|abs_url }}">
 	<div class='row'>
 		<div class='col-xs-3 col-sm-2 product-image-wrapper'>
 			{{ product_image_square(thumbnail or website_image) }}
diff --git a/erpnext/templates/pages/cart.html b/erpnext/templates/pages/cart.html
index 7d8d0ff..35e4989 100644
--- a/erpnext/templates/pages/cart.html
+++ b/erpnext/templates/pages/cart.html
@@ -75,5 +75,5 @@
 	</div>
 </div>
 
-<!-- no-sidebar -->
+
 {% endblock %}
diff --git a/erpnext/templates/pages/home.py b/erpnext/templates/pages/home.py
index 4440f7e..e62687e 100644
--- a/erpnext/templates/pages/home.py
+++ b/erpnext/templates/pages/home.py
@@ -11,9 +11,7 @@
 	homepage = frappe.get_doc('Homepage')
 
 	for item in homepage.products:
-		parent_website_route, page_name = frappe.db.get_value('Item', item.item_code,
-			['parent_website_route', 'page_name'])
-		item.route = '/' + '/'.join(filter(None, [parent_website_route, page_name]))
+		item.route = '/' + frappe.db.get_value('Item', item.item_code, 'route')
 
 	# show atleast 3 products
 	if len(homepage.products) < 3:
diff --git a/erpnext/templates/pages/order.html b/erpnext/templates/pages/order.html
index b548e1f..7129178 100644
--- a/erpnext/templates/pages/order.html
+++ b/erpnext/templates/pages/order.html
@@ -4,13 +4,10 @@
 {% block breadcrumbs %}
 	{% include "templates/includes/breadcrumbs.html" %}
 {% endblock %}
-{% block title %}
-{{ doc.name }}
-{% endblock %}
 
-{% block header %}
-<h1>{{ doc.name }}</h1>
-{% endblock %}
+{% block title %}{{ doc.name }}{% endblock %}
+
+{% block header %}<h1>{{ doc.name }}</h1>{% endblock %}
 
 {% block page_content %}
 
diff --git a/erpnext/templates/pages/partners.html b/erpnext/templates/pages/partners.html
index 132c06b..72d6a64 100644
--- a/erpnext/templates/pages/partners.html
+++ b/erpnext/templates/pages/partners.html
@@ -10,7 +10,7 @@
 	<div class="row">
 		<div class="col-md-3">
 			{% if partner_info.logo -%}
-			<a href="{{ partner_info.page_name }}">
+			<a href="{{ partner_info.route }}">
 				<img itemprop="brand" src="{{ partner_info.logo }}" class="partner-logo"
 					alt="{{ partner_info.partner_name }}" title="{{ partner_info.partner_name }}" />
 			</a>
diff --git a/erpnext/templates/pages/partners.py b/erpnext/templates/pages/partners.py
index 508ea71..6725a3e 100644
--- a/erpnext/templates/pages/partners.py
+++ b/erpnext/templates/pages/partners.py
@@ -11,9 +11,6 @@
 	partners = frappe.db.sql("""select * from `tabSales Partner`
 			where show_in_website=1 order by name asc""", as_dict=True)
 
-	for p in partners:
-		p.route = frappe.get_doc("Sales Partner", p.name).get_route()
-
 	return {
 		"partners": partners,
 		"title": page_title
diff --git a/erpnext/templates/pages/product_search.py b/erpnext/templates/pages/product_search.py
index 465fdd5..8124215 100644
--- a/erpnext/templates/pages/product_search.py
+++ b/erpnext/templates/pages/product_search.py
@@ -14,8 +14,8 @@
 	# limit = 12 because we show 12 items in the grid view
 
 	# base query
-	query = """select name, item_name, item_code, page_name, website_image, thumbnail, item_group,
-			description, web_long_description as website_description, parent_website_route
+	query = """select name, item_name, item_code, route, website_image, thumbnail, item_group,
+			description, web_long_description as website_description
 		from `tabItem`
 		where show_in_website = 1
 			and disabled=0
@@ -38,9 +38,5 @@
 		"today": nowdate()
 	}, as_dict=1)
 
-	for d in data:
-		d.route = ((d.parent_website_route + "/") if d.parent_website_route else "") \
-			+ (d.page_name or "")
-
 	return [get_item_for_list_in_html(r) for r in data]
 
diff --git a/erpnext/templates/pages/rfq.html b/erpnext/templates/pages/rfq.html
index cef93a5..5729e89 100644
--- a/erpnext/templates/pages/rfq.html
+++ b/erpnext/templates/pages/rfq.html
@@ -71,5 +71,5 @@
     </div>
 </div>
 
-<!-- no-sidebar -->
+
 {% endblock %}
diff --git a/erpnext/templates/pages/task_info.html b/erpnext/templates/pages/task_info.html
index c756cd5..1d6574b 100644
--- a/erpnext/templates/pages/task_info.html
+++ b/erpnext/templates/pages/task_info.html
@@ -1,23 +1,23 @@
 {% extends "templates/web.html" %}
 {% block title %} {{ doc.name }} {% endblock %}
 {% block breadcrumbs %}
-<div class="page-breadcrumbs" data-html-block="breadcrumbs">	                    
+<div class="page-breadcrumbs" data-html-block="breadcrumbs">
 	<ul class="breadcrumb">
 		<li>
 			<span class="icon icon-angle-left"></span>
 			<a href="/projects?project={{ doc.project }}">{{ doc.project }}</a>
-		</li>	
+		</li>
 	</ul>
 </div>
 {% endblock %}
 {% block page_content %}
-<div class="row">	
+<div class="row">
 	<div class=" col-sm-8 ">
 		<h1> {{ doc.subject }} </h1>
     </div>
-	
+
 	<div class="col-sm-4">
-		<div class="page-header-actions-block" data-html-block="header-actions">	
+		<div class="page-header-actions-block" data-html-block="header-actions">
 			<button type="submit" class="btn btn-primary btn-sm btn-form-submit">
 	    		Update</button>
 	    		<a href="tasks" class="btn btn-default btn-sm">
@@ -28,38 +28,38 @@
 
 <div class="page-content-block">
 	<form role="form" data-web-form="tasks">
-	
+
 		<input type="hidden" name="web_form" value="tasks">
 		<input type="hidden" name="doctype" value="Task">
 		<input type="hidden" name="name" value="TASK00056">
 
 		<div class="row">
 			<div class="col-sm-12" style="max-width: 500px;">
-				<div class="form-group">		
+				<div class="form-group">
 					<label for="project" class="control-label text-muted small">Project</label>
-						<input type="text" class="form-control" name="project" readonly value= "{{ doc.project }}">		
+						<input type="text" class="form-control" name="project" readonly value= "{{ doc.project }}">
 				</div>
 
 				<div class="form-group">
 					<label for="subject" class="control-label text-muted small">Subject</label>
 					<input type="text" class="form-control" name="subject" readonly value="{{ doc.subject }}">
 				</div>
-								
+
 				<div class="form-group">
 					<label for="description" class="control-label text-muted small">Details</label>
 					<textarea class="form-control" style="height: 200px;" name="description">{{ doc.description }}</textarea>
-				</div>						
-								
+				</div>
+
 				<div class="form-group">
 					<label for="priority" class="control-label text-muted small">Priority</label>
 					<input type="text" class="form-control" name="priority" readonly value="{{ doc.priority }}">
 				</div>
-							
+
 				<div class="form-group">
 					<label for="exp_start_date" class="control-label text-muted small">Expected Start Date</label>
 					<input type="text" class="form-control hasDatepicker" name="exp_start_date" readonly value="{{ doc.exp_start_date }}">
 				</div>
-			
+
 				<div class="form-group">
 					<label for="exp_end_date" class="control-label text-muted small">Expected End Date</label>
 					<input type="text" class="form-control hasDatepicker" name="exp_end_date" readonly value="{{ doc.exp_end_date }}">
@@ -78,7 +78,7 @@
 					</select>
 				</div>
 			</div>
-		</div>		
+		</div>
 	</form>
 </div>
 
@@ -93,7 +93,7 @@
 		<a class="add-comment btn btn-default btn-sm">Add Comment</a>
 		<div style="display: none;" id="comment-form">
 			<p>Add Comment</p>
-			<form>	
+			<form>
 				<fieldset>
 					<textarea class="form-control" name="comment" rows="5" placeholder="Comment"></textarea>
 					<p>
@@ -120,7 +120,7 @@
 								reference_doctype: "Task",
 								reference_name: "TASK00069",
 								comment_type: "Comment",
-								page_name: "tasks",
+								route: "tasks",
 							}
 
 							frappe.call({
@@ -145,5 +145,5 @@
 						})
 					});
 				</script>
-					
+
 {% endblock %}
\ No newline at end of file
diff --git a/erpnext/templates/utils.py b/erpnext/templates/utils.py
index 6f4f4ee..f33e647 100644
--- a/erpnext/templates/utils.py
+++ b/erpnext/templates/utils.py
@@ -9,7 +9,7 @@
 
 @frappe.whitelist(allow_guest=True)
 def send_message(subject="Website Query", message="", sender="", status="Open"):
-	from frappe.templates.pages.contact import send_message as website_send_message
+	from frappe.www.contact import send_message as website_send_message
 
 	website_send_message(subject, message, sender)
 
diff --git a/erpnext/utilities/__init__.py b/erpnext/utilities/__init__.py
index 1b2e52a..bba21e6 100644
--- a/erpnext/utilities/__init__.py
+++ b/erpnext/utilities/__init__.py
@@ -14,3 +14,20 @@
 				f.fieldtype = "Text Editor"
 				dt.save()
 				break
+
+def get_site_info(site_info):
+	# called via hook
+	company = frappe.db.get_single_value('Global Defaults', 'default_company')
+	domain = None
+
+	if not company:
+		company = frappe.db.sql('select name from `tabCompany` order by creation asc')
+		company = company[0][0] if company else None
+
+	if company:
+		domain = frappe.db.get_value('Company', company, 'domain')
+
+	return {
+		'company': company,
+		'domain': domain
+	}
diff --git a/erpnext/manufacturing/page/bom_browser/__init__.py b/erpnext/utilities/web_form/__init__.py
similarity index 100%
copy from erpnext/manufacturing/page/bom_browser/__init__.py
copy to erpnext/utilities/web_form/__init__.py
diff --git a/erpnext/manufacturing/page/bom_browser/__init__.py b/erpnext/utilities/web_form/addresses/__init__.py
similarity index 100%
copy from erpnext/manufacturing/page/bom_browser/__init__.py
copy to erpnext/utilities/web_form/addresses/__init__.py
diff --git a/erpnext/utilities/web_form/addresses/addresses.js b/erpnext/utilities/web_form/addresses/addresses.js
new file mode 100644
index 0000000..699703c
--- /dev/null
+++ b/erpnext/utilities/web_form/addresses/addresses.js
@@ -0,0 +1,3 @@
+frappe.ready(function() {
+	// bind events here
+})
\ No newline at end of file
diff --git a/erpnext/utilities/web_form/addresses/addresses.json b/erpnext/utilities/web_form/addresses/addresses.json
new file mode 100644
index 0000000..50fe6e9
--- /dev/null
+++ b/erpnext/utilities/web_form/addresses/addresses.json
@@ -0,0 +1,133 @@
+{
+ "allow_comments": 0, 
+ "allow_delete": 0, 
+ "allow_edit": 1, 
+ "allow_multiple": 1, 
+ "creation": "2016-06-24 15:50:33.196990", 
+ "doc_type": "Address", 
+ "docstatus": 0, 
+ "doctype": "Web Form", 
+ "idx": 0, 
+ "is_standard": 1, 
+ "login_required": 1, 
+ "modified": "2016-06-24 16:11:28.802353", 
+ "modified_by": "Administrator", 
+ "module": "Utilities", 
+ "name": "addresses", 
+ "owner": "Administrator", 
+ "published": 1, 
+ "route": "address", 
+ "success_url": "/addresses", 
+ "title": "Address", 
+ "web_form_fields": [
+  {
+   "description": "", 
+   "fieldname": "address_title", 
+   "fieldtype": "Data", 
+   "hidden": 0, 
+   "label": "Address Title", 
+   "read_only": 0, 
+   "reqd": 0
+  }, 
+  {
+   "fieldname": "address_type", 
+   "fieldtype": "Select", 
+   "hidden": 0, 
+   "label": "Address Type", 
+   "options": "Billing\nShipping\nOffice\nPersonal\nPlant\nPostal\nShop\nSubsidiary\nWarehouse\nOther", 
+   "read_only": 0, 
+   "reqd": 1
+  }, 
+  {
+   "fieldname": "address_line1", 
+   "fieldtype": "Data", 
+   "hidden": 0, 
+   "label": "Address Line 1", 
+   "read_only": 0, 
+   "reqd": 1
+  }, 
+  {
+   "fieldname": "address_line2", 
+   "fieldtype": "Data", 
+   "hidden": 0, 
+   "label": "Address Line 2", 
+   "read_only": 0, 
+   "reqd": 0
+  }, 
+  {
+   "fieldname": "city", 
+   "fieldtype": "Data", 
+   "hidden": 0, 
+   "label": "City/Town", 
+   "read_only": 0, 
+   "reqd": 1
+  }, 
+  {
+   "fieldname": "state", 
+   "fieldtype": "Data", 
+   "hidden": 0, 
+   "label": "State", 
+   "read_only": 0, 
+   "reqd": 0
+  }, 
+  {
+   "fieldname": "pincode", 
+   "fieldtype": "Data", 
+   "hidden": 0, 
+   "label": "Postal Code", 
+   "read_only": 0, 
+   "reqd": 0
+  }, 
+  {
+   "fieldname": "country", 
+   "fieldtype": "Link", 
+   "hidden": 0, 
+   "label": "Country", 
+   "options": "Country", 
+   "read_only": 0, 
+   "reqd": 1
+  }, 
+  {
+   "fieldtype": "Column Break", 
+   "hidden": 0, 
+   "read_only": 0, 
+   "reqd": 0
+  }, 
+  {
+   "fieldname": "email_id", 
+   "fieldtype": "Data", 
+   "hidden": 0, 
+   "label": "Email Id", 
+   "read_only": 0, 
+   "reqd": 0
+  }, 
+  {
+   "fieldname": "phone", 
+   "fieldtype": "Data", 
+   "hidden": 0, 
+   "label": "Phone", 
+   "read_only": 0, 
+   "reqd": 1
+  }, 
+  {
+   "default": "0", 
+   "description": "", 
+   "fieldname": "is_primary_address", 
+   "fieldtype": "Check", 
+   "hidden": 0, 
+   "label": "Preferred Billing Address", 
+   "read_only": 0, 
+   "reqd": 0
+  }, 
+  {
+   "default": "0", 
+   "description": "", 
+   "fieldname": "is_shipping_address", 
+   "fieldtype": "Check", 
+   "hidden": 0, 
+   "label": "Preferred Shipping Address", 
+   "read_only": 0, 
+   "reqd": 0
+  }
+ ]
+}
\ No newline at end of file
diff --git a/erpnext/utilities/web_form/addresses/addresses.py b/erpnext/utilities/web_form/addresses/addresses.py
new file mode 100644
index 0000000..2334f8b
--- /dev/null
+++ b/erpnext/utilities/web_form/addresses/addresses.py
@@ -0,0 +1,7 @@
+from __future__ import unicode_literals
+
+import frappe
+
+def get_context(context):
+	# do your magic here
+	pass