Fixes related to Website Route system and other misc fixes
diff --git a/erpnext/config/selling.py b/erpnext/config/selling.py
index a332bc4..200ab6d 100644
--- a/erpnext/config/selling.py
+++ b/erpnext/config/selling.py
@@ -92,6 +92,11 @@
 					"doctype": "Territory",
 				},
 				{
+					"type": "doctype",
+					"name": "Sales Partner",
+					"description": _("Manage Sales Partners."),
+				},
+				{
 					"type": "page",
 					"label": _("Sales Person"),
 					"name": "Sales Browser",
diff --git a/erpnext/selling/doctype/customer/customer.py b/erpnext/selling/doctype/customer/customer.py
index f4312fe3..0d430e3 100644
--- a/erpnext/selling/doctype/customer/customer.py
+++ b/erpnext/selling/doctype/customer/customer.py
@@ -64,6 +64,7 @@
 			c.customer = self.name
 			c.customer_name = self.customer_name
 			c.is_primary_contact = 1
+			c.ignore_permissions = getattr(self, "ignore_permissions", None)
 			try:
 				c.save()
 			except frappe.NameError:
diff --git a/erpnext/selling/doctype/sales_order/sales_order.json b/erpnext/selling/doctype/sales_order/sales_order.json
index 6c330e6..2ac9d93 100644
--- a/erpnext/selling/doctype/sales_order/sales_order.json
+++ b/erpnext/selling/doctype/sales_order/sales_order.json
@@ -1,977 +1,977 @@
 {
- "allow_attach": 1, 
- "allow_import": 1, 
- "autoname": "naming_series:", 
- "creation": "2013-06-18 12:39:59", 
- "docstatus": 0, 
- "doctype": "DocType", 
- "document_type": "Transaction", 
+ "allow_attach": 1,
+ "allow_import": 1,
+ "autoname": "naming_series:",
+ "creation": "2013-06-18 12:39:59",
+ "docstatus": 0,
+ "doctype": "DocType",
+ "document_type": "Transaction",
  "fields": [
   {
-   "fieldname": "customer_section", 
-   "fieldtype": "Section Break", 
-   "label": "Customer", 
-   "options": "icon-user", 
+   "fieldname": "customer_section",
+   "fieldtype": "Section Break",
+   "label": "Customer",
+   "options": "icon-user",
    "permlevel": 0
-  }, 
+  },
   {
-   "fieldname": "column_break0", 
-   "fieldtype": "Column Break", 
-   "in_filter": 0, 
-   "oldfieldtype": "Column Break", 
-   "permlevel": 0, 
-   "search_index": 0, 
+   "fieldname": "column_break0",
+   "fieldtype": "Column Break",
+   "in_filter": 0,
+   "oldfieldtype": "Column Break",
+   "permlevel": 0,
+   "search_index": 0,
    "width": "50%"
-  }, 
+  },
   {
-   "fieldname": "naming_series", 
-   "fieldtype": "Select", 
-   "label": "Series", 
-   "no_copy": 1, 
-   "oldfieldname": "naming_series", 
-   "oldfieldtype": "Select", 
-   "options": "SO-", 
-   "permlevel": 0, 
-   "print_hide": 1, 
+   "fieldname": "naming_series",
+   "fieldtype": "Select",
+   "label": "Series",
+   "no_copy": 1,
+   "oldfieldname": "naming_series",
+   "oldfieldtype": "Select",
+   "options": "SO-",
+   "permlevel": 0,
+   "print_hide": 1,
    "reqd": 1
-  }, 
+  },
   {
-   "fieldname": "customer", 
-   "fieldtype": "Link", 
-   "in_filter": 1, 
-   "in_list_view": 1, 
-   "label": "Customer", 
-   "oldfieldname": "customer", 
-   "oldfieldtype": "Link", 
-   "options": "Customer", 
-   "permlevel": 0, 
-   "print_hide": 1, 
-   "reqd": 1, 
+   "fieldname": "customer",
+   "fieldtype": "Link",
+   "in_filter": 1,
+   "in_list_view": 1,
+   "label": "Customer",
+   "oldfieldname": "customer",
+   "oldfieldtype": "Link",
+   "options": "Customer",
+   "permlevel": 0,
+   "print_hide": 1,
+   "reqd": 1,
    "search_index": 1
-  }, 
+  },
   {
-   "fieldname": "customer_name", 
-   "fieldtype": "Data", 
-   "hidden": 0, 
-   "label": "Name", 
-   "permlevel": 0, 
+   "fieldname": "customer_name",
+   "fieldtype": "Data",
+   "hidden": 0,
+   "label": "Name",
+   "permlevel": 0,
    "read_only": 1
-  }, 
+  },
   {
-   "fieldname": "address_display", 
-   "fieldtype": "Small Text", 
-   "hidden": 1, 
-   "label": "Address", 
-   "permlevel": 0, 
+   "fieldname": "address_display",
+   "fieldtype": "Small Text",
+   "hidden": 1,
+   "label": "Address",
+   "permlevel": 0,
    "read_only": 1
-  }, 
+  },
   {
-   "fieldname": "contact_display", 
-   "fieldtype": "Small Text", 
-   "hidden": 1, 
-   "label": "Contact", 
-   "permlevel": 0, 
+   "fieldname": "contact_display",
+   "fieldtype": "Small Text",
+   "hidden": 1,
+   "label": "Contact",
+   "permlevel": 0,
    "read_only": 1
-  }, 
+  },
   {
-   "fieldname": "contact_mobile", 
-   "fieldtype": "Text", 
-   "hidden": 1, 
-   "label": "Mobile No", 
-   "permlevel": 0, 
+   "fieldname": "contact_mobile",
+   "fieldtype": "Text",
+   "hidden": 1,
+   "label": "Mobile No",
+   "permlevel": 0,
    "read_only": 1
-  }, 
+  },
   {
-   "fieldname": "contact_email", 
-   "fieldtype": "Text", 
-   "hidden": 1, 
-   "label": "Contact Email", 
-   "permlevel": 0, 
-   "print_hide": 1, 
+   "fieldname": "contact_email",
+   "fieldtype": "Text",
+   "hidden": 1,
+   "label": "Contact Email",
+   "permlevel": 0,
+   "print_hide": 1,
    "read_only": 1
-  }, 
+  },
   {
-   "default": "Sales", 
-   "fieldname": "order_type", 
-   "fieldtype": "Select", 
-   "in_list_view": 1, 
-   "label": "Order Type", 
-   "oldfieldname": "order_type", 
-   "oldfieldtype": "Select", 
-   "options": "\nSales\nMaintenance", 
-   "permlevel": 0, 
-   "print_hide": 1, 
+   "default": "Sales",
+   "fieldname": "order_type",
+   "fieldtype": "Select",
+   "in_list_view": 1,
+   "label": "Order Type",
+   "oldfieldname": "order_type",
+   "oldfieldtype": "Select",
+   "options": "\nSales\nMaintenance\nShopping Cart",
+   "permlevel": 0,
+   "print_hide": 1,
    "reqd": 1
-  }, 
+  },
   {
-   "fieldname": "column_break1", 
-   "fieldtype": "Column Break", 
-   "oldfieldtype": "Column Break", 
-   "permlevel": 0, 
+   "fieldname": "column_break1",
+   "fieldtype": "Column Break",
+   "oldfieldtype": "Column Break",
+   "permlevel": 0,
    "width": "50%"
-  }, 
+  },
   {
-   "fieldname": "amended_from", 
-   "fieldtype": "Link", 
-   "hidden": 1, 
-   "ignore_user_permissions": 1, 
-   "label": "Amended From", 
-   "no_copy": 1, 
-   "oldfieldname": "amended_from", 
-   "oldfieldtype": "Data", 
-   "options": "Sales Order", 
-   "permlevel": 0, 
-   "print_hide": 1, 
-   "read_only": 1, 
+   "fieldname": "amended_from",
+   "fieldtype": "Link",
+   "hidden": 1,
+   "ignore_user_permissions": 1,
+   "label": "Amended From",
+   "no_copy": 1,
+   "oldfieldname": "amended_from",
+   "oldfieldtype": "Data",
+   "options": "Sales Order",
+   "permlevel": 0,
+   "print_hide": 1,
+   "read_only": 1,
    "width": "150px"
-  }, 
+  },
   {
-   "description": "Select the relevant company name if you have multiple companies.", 
-   "fieldname": "company", 
-   "fieldtype": "Link", 
-   "in_filter": 1, 
-   "label": "Company", 
-   "oldfieldname": "company", 
-   "oldfieldtype": "Link", 
-   "options": "Company", 
-   "permlevel": 0, 
-   "print_hide": 1, 
-   "reqd": 1, 
-   "search_index": 1, 
+   "description": "Select the relevant company name if you have multiple companies.",
+   "fieldname": "company",
+   "fieldtype": "Link",
+   "in_filter": 1,
+   "label": "Company",
+   "oldfieldname": "company",
+   "oldfieldtype": "Link",
+   "options": "Company",
+   "permlevel": 0,
+   "print_hide": 1,
+   "reqd": 1,
+   "search_index": 1,
    "width": "150px"
-  }, 
+  },
   {
-   "default": "Today", 
-   "fieldname": "transaction_date", 
-   "fieldtype": "Date", 
-   "in_filter": 1, 
-   "label": "Sales Order Date", 
-   "no_copy": 1, 
-   "oldfieldname": "transaction_date", 
-   "oldfieldtype": "Date", 
-   "permlevel": 0, 
-   "print_hide": 0, 
-   "reqd": 1, 
-   "search_index": 1, 
+   "default": "Today",
+   "fieldname": "transaction_date",
+   "fieldtype": "Date",
+   "in_filter": 1,
+   "label": "Sales Order Date",
+   "no_copy": 1,
+   "oldfieldname": "transaction_date",
+   "oldfieldtype": "Date",
+   "permlevel": 0,
+   "print_hide": 0,
+   "reqd": 1,
+   "search_index": 1,
    "width": "160px"
-  }, 
+  },
   {
-   "depends_on": "eval:doc.order_type == 'Sales'", 
-   "fieldname": "delivery_date", 
-   "fieldtype": "Date", 
-   "hidden": 0, 
-   "in_filter": 1, 
-   "label": "Delivery Date", 
-   "oldfieldname": "delivery_date", 
-   "oldfieldtype": "Date", 
-   "permlevel": 0, 
-   "print_hide": 1, 
-   "reqd": 0, 
-   "search_index": 1, 
+   "depends_on": "eval:doc.order_type == 'Sales'",
+   "fieldname": "delivery_date",
+   "fieldtype": "Date",
+   "hidden": 0,
+   "in_filter": 1,
+   "label": "Delivery Date",
+   "oldfieldname": "delivery_date",
+   "oldfieldtype": "Date",
+   "permlevel": 0,
+   "print_hide": 1,
+   "reqd": 0,
+   "search_index": 1,
    "width": "160px"
-  }, 
+  },
   {
-   "description": "Customer's Purchase Order Number", 
-   "fieldname": "po_no", 
-   "fieldtype": "Data", 
-   "hidden": 0, 
-   "label": "PO No", 
-   "oldfieldname": "po_no", 
-   "oldfieldtype": "Data", 
-   "permlevel": 0, 
-   "print_hide": 0, 
-   "reqd": 0, 
+   "description": "Customer's Purchase Order Number",
+   "fieldname": "po_no",
+   "fieldtype": "Data",
+   "hidden": 0,
+   "label": "PO No",
+   "oldfieldname": "po_no",
+   "oldfieldtype": "Data",
+   "permlevel": 0,
+   "print_hide": 0,
+   "reqd": 0,
    "width": "100px"
-  }, 
+  },
   {
-   "depends_on": "eval:doc.po_no", 
-   "description": "Customer's Purchase Order Date", 
-   "fieldname": "po_date", 
-   "fieldtype": "Date", 
-   "hidden": 0, 
-   "label": "PO Date", 
-   "oldfieldname": "po_date", 
-   "oldfieldtype": "Date", 
-   "permlevel": 0, 
-   "print_hide": 0, 
-   "reqd": 0, 
+   "depends_on": "eval:doc.po_no",
+   "description": "Customer's Purchase Order Date",
+   "fieldname": "po_date",
+   "fieldtype": "Date",
+   "hidden": 0,
+   "label": "PO Date",
+   "oldfieldname": "po_date",
+   "oldfieldtype": "Date",
+   "permlevel": 0,
+   "print_hide": 0,
+   "reqd": 0,
    "width": "100px"
-  }, 
+  },
   {
-   "fieldname": "shipping_address_name", 
-   "fieldtype": "Link", 
-   "hidden": 1, 
-   "in_filter": 1, 
-   "label": "Shipping Address", 
-   "options": "Address", 
-   "permlevel": 0, 
-   "print_hide": 1, 
+   "fieldname": "shipping_address_name",
+   "fieldtype": "Link",
+   "hidden": 1,
+   "in_filter": 1,
+   "label": "Shipping Address",
+   "options": "Address",
+   "permlevel": 0,
+   "print_hide": 1,
    "read_only": 0
-  }, 
+  },
   {
-   "fieldname": "shipping_address", 
-   "fieldtype": "Small Text", 
-   "hidden": 1, 
-   "in_filter": 0, 
-   "label": "Shipping Address", 
-   "permlevel": 0, 
-   "print_hide": 1, 
+   "fieldname": "shipping_address",
+   "fieldtype": "Small Text",
+   "hidden": 1,
+   "in_filter": 0,
+   "label": "Shipping Address",
+   "permlevel": 0,
+   "print_hide": 1,
    "read_only": 1
-  }, 
+  },
   {
-   "fieldname": "sec_break45", 
-   "fieldtype": "Section Break", 
-   "label": "Currency and Price List", 
-   "options": "icon-tag", 
+   "fieldname": "sec_break45",
+   "fieldtype": "Section Break",
+   "label": "Currency and Price List",
+   "options": "icon-tag",
    "permlevel": 0
-  }, 
+  },
   {
-   "fieldname": "currency", 
-   "fieldtype": "Link", 
-   "label": "Currency", 
-   "oldfieldname": "currency", 
-   "oldfieldtype": "Select", 
-   "options": "Currency", 
-   "permlevel": 0, 
-   "print_hide": 1, 
-   "reqd": 1, 
+   "fieldname": "currency",
+   "fieldtype": "Link",
+   "label": "Currency",
+   "oldfieldname": "currency",
+   "oldfieldtype": "Select",
+   "options": "Currency",
+   "permlevel": 0,
+   "print_hide": 1,
+   "reqd": 1,
    "width": "100px"
-  }, 
+  },
   {
-   "description": "Rate at which customer's currency is converted to company's base currency", 
-   "fieldname": "conversion_rate", 
-   "fieldtype": "Float", 
-   "label": "Exchange Rate", 
-   "oldfieldname": "conversion_rate", 
-   "oldfieldtype": "Currency", 
-   "permlevel": 0, 
-   "print_hide": 1, 
-   "reqd": 1, 
+   "description": "Rate at which customer's currency is converted to company's base currency",
+   "fieldname": "conversion_rate",
+   "fieldtype": "Float",
+   "label": "Exchange Rate",
+   "oldfieldname": "conversion_rate",
+   "oldfieldtype": "Currency",
+   "permlevel": 0,
+   "print_hide": 1,
+   "reqd": 1,
    "width": "100px"
-  }, 
+  },
   {
-   "fieldname": "column_break2", 
-   "fieldtype": "Column Break", 
-   "permlevel": 0, 
+   "fieldname": "column_break2",
+   "fieldtype": "Column Break",
+   "permlevel": 0,
    "width": "50%"
-  }, 
+  },
   {
-   "fieldname": "selling_price_list", 
-   "fieldtype": "Link", 
-   "label": "Price List", 
-   "oldfieldname": "price_list_name", 
-   "oldfieldtype": "Select", 
-   "options": "Price List", 
-   "permlevel": 0, 
-   "print_hide": 1, 
-   "reqd": 1, 
+   "fieldname": "selling_price_list",
+   "fieldtype": "Link",
+   "label": "Price List",
+   "oldfieldname": "price_list_name",
+   "oldfieldtype": "Select",
+   "options": "Price List",
+   "permlevel": 0,
+   "print_hide": 1,
+   "reqd": 1,
    "width": "100px"
-  }, 
+  },
   {
-   "fieldname": "price_list_currency", 
-   "fieldtype": "Link", 
-   "label": "Price List Currency", 
-   "options": "Currency", 
-   "permlevel": 0, 
-   "print_hide": 1, 
-   "read_only": 1, 
+   "fieldname": "price_list_currency",
+   "fieldtype": "Link",
+   "label": "Price List Currency",
+   "options": "Currency",
+   "permlevel": 0,
+   "print_hide": 1,
+   "read_only": 1,
    "reqd": 1
-  }, 
+  },
   {
-   "description": "Rate at which Price list currency is converted to company's base currency", 
-   "fieldname": "plc_conversion_rate", 
-   "fieldtype": "Float", 
-   "label": "Price List Exchange Rate", 
-   "permlevel": 0, 
-   "print_hide": 1, 
+   "description": "Rate at which Price list currency is converted to company's base currency",
+   "fieldname": "plc_conversion_rate",
+   "fieldtype": "Float",
+   "label": "Price List Exchange Rate",
+   "permlevel": 0,
+   "print_hide": 1,
    "reqd": 1
-  }, 
+  },
   {
-   "fieldname": "ignore_pricing_rule", 
-   "fieldtype": "Check", 
-   "label": "Ignore Pricing Rule", 
-   "no_copy": 1, 
-   "permlevel": 1, 
+   "fieldname": "ignore_pricing_rule",
+   "fieldtype": "Check",
+   "label": "Ignore Pricing Rule",
+   "no_copy": 1,
+   "permlevel": 1,
    "print_hide": 1
-  }, 
+  },
   {
-   "fieldname": "items", 
-   "fieldtype": "Section Break", 
-   "label": "Items", 
-   "oldfieldtype": "Section Break", 
-   "options": "icon-shopping-cart", 
+   "fieldname": "items",
+   "fieldtype": "Section Break",
+   "label": "Items",
+   "oldfieldtype": "Section Break",
+   "options": "icon-shopping-cart",
    "permlevel": 0
-  }, 
+  },
   {
-   "allow_on_submit": 1, 
-   "fieldname": "sales_order_details", 
-   "fieldtype": "Table", 
-   "label": "Sales Order Items", 
-   "oldfieldname": "sales_order_details", 
-   "oldfieldtype": "Table", 
-   "options": "Sales Order Item", 
-   "permlevel": 0, 
-   "print_hide": 0, 
+   "allow_on_submit": 1,
+   "fieldname": "sales_order_details",
+   "fieldtype": "Table",
+   "label": "Sales Order Items",
+   "oldfieldname": "sales_order_details",
+   "oldfieldtype": "Table",
+   "options": "Sales Order Item",
+   "permlevel": 0,
+   "print_hide": 0,
    "reqd": 1
-  }, 
+  },
   {
-   "description": "Display all the individual items delivered with the main items", 
-   "fieldname": "packing_list", 
-   "fieldtype": "Section Break", 
-   "hidden": 0, 
-   "label": "Packing List", 
-   "oldfieldtype": "Section Break", 
-   "options": "icon-suitcase", 
-   "permlevel": 0, 
+   "description": "Display all the individual items delivered with the main items",
+   "fieldname": "packing_list",
+   "fieldtype": "Section Break",
+   "hidden": 0,
+   "label": "Packing List",
+   "oldfieldtype": "Section Break",
+   "options": "icon-suitcase",
+   "permlevel": 0,
    "print_hide": 1
-  }, 
+  },
   {
-   "fieldname": "packing_details", 
-   "fieldtype": "Table", 
-   "label": "Packing Details", 
-   "oldfieldname": "packing_details", 
-   "oldfieldtype": "Table", 
-   "options": "Packed Item", 
-   "permlevel": 0, 
-   "print_hide": 1, 
+   "fieldname": "packing_details",
+   "fieldtype": "Table",
+   "label": "Packing Details",
+   "oldfieldname": "packing_details",
+   "oldfieldtype": "Table",
+   "options": "Packed Item",
+   "permlevel": 0,
+   "print_hide": 1,
    "read_only": 1
-  }, 
+  },
   {
-   "fieldname": "section_break_31", 
-   "fieldtype": "Section Break", 
+   "fieldname": "section_break_31",
+   "fieldtype": "Section Break",
    "permlevel": 0
-  }, 
+  },
   {
-   "fieldname": "net_total_export", 
-   "fieldtype": "Currency", 
-   "label": "Net Total", 
-   "options": "currency", 
-   "permlevel": 0, 
+   "fieldname": "net_total_export",
+   "fieldtype": "Currency",
+   "label": "Net Total",
+   "options": "currency",
+   "permlevel": 0,
    "read_only": 1
-  }, 
+  },
   {
-   "fieldname": "column_break_33", 
-   "fieldtype": "Column Break", 
+   "fieldname": "column_break_33",
+   "fieldtype": "Column Break",
    "permlevel": 0
-  }, 
+  },
   {
-   "fieldname": "net_total", 
-   "fieldtype": "Currency", 
-   "label": "Net Total (Company Currency)", 
-   "oldfieldname": "net_total", 
-   "oldfieldtype": "Currency", 
-   "options": "Company:company:default_currency", 
-   "permlevel": 0, 
-   "print_hide": 1, 
-   "read_only": 1, 
-   "reqd": 0, 
+   "fieldname": "net_total",
+   "fieldtype": "Currency",
+   "label": "Net Total (Company Currency)",
+   "oldfieldname": "net_total",
+   "oldfieldtype": "Currency",
+   "options": "Company:company:default_currency",
+   "permlevel": 0,
+   "print_hide": 1,
+   "read_only": 1,
+   "reqd": 0,
    "width": "150px"
-  }, 
+  },
   {
-   "fieldname": "taxes", 
-   "fieldtype": "Section Break", 
-   "label": "Taxes and Charges", 
-   "oldfieldtype": "Section Break", 
-   "options": "icon-money", 
-   "permlevel": 0, 
+   "fieldname": "taxes",
+   "fieldtype": "Section Break",
+   "label": "Taxes and Charges",
+   "oldfieldtype": "Section Break",
+   "options": "icon-money",
+   "permlevel": 0,
    "print_hide": 0
-  }, 
+  },
   {
-   "fieldname": "taxes_and_charges", 
-   "fieldtype": "Link", 
-   "label": "Taxes and Charges", 
-   "oldfieldname": "charge", 
-   "oldfieldtype": "Link", 
-   "options": "Sales Taxes and Charges Master", 
-   "permlevel": 0, 
+   "fieldname": "taxes_and_charges",
+   "fieldtype": "Link",
+   "label": "Taxes and Charges",
+   "oldfieldname": "charge",
+   "oldfieldtype": "Link",
+   "options": "Sales Taxes and Charges Master",
+   "permlevel": 0,
    "print_hide": 1
-  }, 
+  },
   {
-   "fieldname": "column_break_38", 
-   "fieldtype": "Column Break", 
+   "fieldname": "column_break_38",
+   "fieldtype": "Column Break",
    "permlevel": 0
-  }, 
+  },
   {
-   "fieldname": "shipping_rule", 
-   "fieldtype": "Link", 
-   "label": "Shipping Rule", 
-   "oldfieldtype": "Button", 
-   "options": "Shipping Rule", 
-   "permlevel": 0, 
+   "fieldname": "shipping_rule",
+   "fieldtype": "Link",
+   "label": "Shipping Rule",
+   "oldfieldtype": "Button",
+   "options": "Shipping Rule",
+   "permlevel": 0,
    "print_hide": 1
-  }, 
+  },
   {
-   "fieldname": "section_break_40", 
-   "fieldtype": "Section Break", 
+   "fieldname": "section_break_40",
+   "fieldtype": "Section Break",
    "permlevel": 0
-  }, 
+  },
   {
-   "fieldname": "other_charges", 
-   "fieldtype": "Table", 
-   "label": "Sales Taxes and Charges", 
-   "oldfieldname": "other_charges", 
-   "oldfieldtype": "Table", 
-   "options": "Sales Taxes and Charges", 
+   "fieldname": "other_charges",
+   "fieldtype": "Table",
+   "label": "Sales Taxes and Charges",
+   "oldfieldname": "other_charges",
+   "oldfieldtype": "Table",
+   "options": "Sales Taxes and Charges",
    "permlevel": 0
-  }, 
+  },
   {
-   "fieldname": "other_charges_calculation", 
-   "fieldtype": "HTML", 
-   "label": "Taxes and Charges Calculation", 
-   "oldfieldtype": "HTML", 
-   "permlevel": 0, 
+   "fieldname": "other_charges_calculation",
+   "fieldtype": "HTML",
+   "label": "Taxes and Charges Calculation",
+   "oldfieldtype": "HTML",
+   "permlevel": 0,
    "print_hide": 0
-  }, 
+  },
   {
-   "fieldname": "section_break_43", 
-   "fieldtype": "Section Break", 
+   "fieldname": "section_break_43",
+   "fieldtype": "Section Break",
    "permlevel": 0
-  }, 
+  },
   {
-   "fieldname": "other_charges_total_export", 
-   "fieldtype": "Currency", 
-   "label": "Taxes and Charges Total", 
-   "options": "currency", 
-   "permlevel": 0, 
-   "print_hide": 1, 
+   "fieldname": "other_charges_total_export",
+   "fieldtype": "Currency",
+   "label": "Taxes and Charges Total",
+   "options": "currency",
+   "permlevel": 0,
+   "print_hide": 1,
    "read_only": 1
-  }, 
+  },
   {
-   "fieldname": "column_break_46", 
-   "fieldtype": "Column Break", 
+   "fieldname": "column_break_46",
+   "fieldtype": "Column Break",
    "permlevel": 0
-  }, 
+  },
   {
-   "fieldname": "other_charges_total", 
-   "fieldtype": "Currency", 
-   "label": "Taxes and Charges Total (Company Currency)", 
-   "oldfieldname": "other_charges_total", 
-   "oldfieldtype": "Currency", 
-   "options": "Company:company:default_currency", 
-   "permlevel": 0, 
-   "print_hide": 1, 
-   "read_only": 1, 
+   "fieldname": "other_charges_total",
+   "fieldtype": "Currency",
+   "label": "Taxes and Charges Total (Company Currency)",
+   "oldfieldname": "other_charges_total",
+   "oldfieldtype": "Currency",
+   "options": "Company:company:default_currency",
+   "permlevel": 0,
+   "print_hide": 1,
+   "read_only": 1,
    "width": "150px"
-  }, 
+  },
   {
-   "fieldname": "discount_amount", 
-   "fieldtype": "Currency", 
-   "label": "Discount Amount", 
-   "options": "Company:company:default_currency", 
+   "fieldname": "discount_amount",
+   "fieldtype": "Currency",
+   "label": "Discount Amount",
+   "options": "Company:company:default_currency",
    "permlevel": 0
-  }, 
+  },
   {
-   "fieldname": "totals", 
-   "fieldtype": "Section Break", 
-   "label": "Totals", 
-   "oldfieldtype": "Section Break", 
-   "options": "icon-money", 
-   "permlevel": 0, 
+   "fieldname": "totals",
+   "fieldtype": "Section Break",
+   "label": "Totals",
+   "oldfieldtype": "Section Break",
+   "options": "icon-money",
+   "permlevel": 0,
    "print_hide": 1
-  }, 
+  },
   {
-   "fieldname": "grand_total_export", 
-   "fieldtype": "Currency", 
-   "label": "Grand Total", 
-   "oldfieldname": "grand_total_export", 
-   "oldfieldtype": "Currency", 
-   "options": "currency", 
-   "permlevel": 0, 
-   "print_hide": 0, 
-   "read_only": 1, 
-   "reqd": 0, 
+   "fieldname": "grand_total_export",
+   "fieldtype": "Currency",
+   "label": "Grand Total",
+   "oldfieldname": "grand_total_export",
+   "oldfieldtype": "Currency",
+   "options": "currency",
+   "permlevel": 0,
+   "print_hide": 0,
+   "read_only": 1,
+   "reqd": 0,
    "width": "150px"
-  }, 
+  },
   {
-   "fieldname": "rounded_total_export", 
-   "fieldtype": "Currency", 
-   "label": "Rounded Total", 
-   "oldfieldname": "rounded_total_export", 
-   "oldfieldtype": "Currency", 
-   "options": "currency", 
-   "permlevel": 0, 
-   "print_hide": 0, 
-   "read_only": 1, 
+   "fieldname": "rounded_total_export",
+   "fieldtype": "Currency",
+   "label": "Rounded Total",
+   "oldfieldname": "rounded_total_export",
+   "oldfieldtype": "Currency",
+   "options": "currency",
+   "permlevel": 0,
+   "print_hide": 0,
+   "read_only": 1,
    "width": "150px"
-  }, 
+  },
   {
-   "fieldname": "in_words_export", 
-   "fieldtype": "Data", 
-   "label": "In Words", 
-   "oldfieldname": "in_words_export", 
-   "oldfieldtype": "Data", 
-   "permlevel": 0, 
-   "print_hide": 0, 
-   "read_only": 1, 
+   "fieldname": "in_words_export",
+   "fieldtype": "Data",
+   "label": "In Words",
+   "oldfieldname": "in_words_export",
+   "oldfieldtype": "Data",
+   "permlevel": 0,
+   "print_hide": 0,
+   "read_only": 1,
    "width": "200px"
-  }, 
+  },
   {
-   "fieldname": "column_break3", 
-   "fieldtype": "Column Break", 
-   "oldfieldtype": "Column Break", 
-   "permlevel": 0, 
-   "print_hide": 1, 
+   "fieldname": "column_break3",
+   "fieldtype": "Column Break",
+   "oldfieldtype": "Column Break",
+   "permlevel": 0,
+   "print_hide": 1,
    "width": "50%"
-  }, 
+  },
   {
-   "fieldname": "grand_total", 
-   "fieldtype": "Currency", 
-   "label": "Grand Total (Company Currency)", 
-   "oldfieldname": "grand_total", 
-   "oldfieldtype": "Currency", 
-   "options": "Company:company:default_currency", 
-   "permlevel": 0, 
-   "print_hide": 1, 
-   "read_only": 1, 
-   "reqd": 0, 
+   "fieldname": "grand_total",
+   "fieldtype": "Currency",
+   "label": "Grand Total (Company Currency)",
+   "oldfieldname": "grand_total",
+   "oldfieldtype": "Currency",
+   "options": "Company:company:default_currency",
+   "permlevel": 0,
+   "print_hide": 1,
+   "read_only": 1,
+   "reqd": 0,
    "width": "150px"
-  }, 
+  },
   {
-   "fieldname": "rounded_total", 
-   "fieldtype": "Currency", 
-   "label": "Rounded Total (Company Currency)", 
-   "oldfieldname": "rounded_total", 
-   "oldfieldtype": "Currency", 
-   "options": "Company:company:default_currency", 
-   "permlevel": 0, 
-   "print_hide": 1, 
-   "read_only": 1, 
+   "fieldname": "rounded_total",
+   "fieldtype": "Currency",
+   "label": "Rounded Total (Company Currency)",
+   "oldfieldname": "rounded_total",
+   "oldfieldtype": "Currency",
+   "options": "Company:company:default_currency",
+   "permlevel": 0,
+   "print_hide": 1,
+   "read_only": 1,
    "width": "150px"
-  }, 
+  },
   {
-   "description": "In Words will be visible once you save the Sales Order.", 
-   "fieldname": "in_words", 
-   "fieldtype": "Data", 
-   "label": "In Words (Company Currency)", 
-   "oldfieldname": "in_words", 
-   "oldfieldtype": "Data", 
-   "permlevel": 0, 
-   "print_hide": 1, 
-   "read_only": 1, 
+   "description": "In Words will be visible once you save the Sales Order.",
+   "fieldname": "in_words",
+   "fieldtype": "Data",
+   "label": "In Words (Company Currency)",
+   "oldfieldname": "in_words",
+   "oldfieldtype": "Data",
+   "permlevel": 0,
+   "print_hide": 1,
+   "read_only": 1,
    "width": "200px"
-  }, 
+  },
   {
-   "fieldname": "terms_section_break", 
-   "fieldtype": "Section Break", 
-   "label": "Terms and Conditions", 
-   "oldfieldtype": "Section Break", 
-   "options": "icon-legal", 
-   "permlevel": 0, 
+   "fieldname": "terms_section_break",
+   "fieldtype": "Section Break",
+   "label": "Terms and Conditions",
+   "oldfieldtype": "Section Break",
+   "options": "icon-legal",
+   "permlevel": 0,
    "print_hide": 0
-  }, 
+  },
   {
-   "fieldname": "tc_name", 
-   "fieldtype": "Link", 
-   "label": "Terms", 
-   "oldfieldname": "tc_name", 
-   "oldfieldtype": "Link", 
-   "options": "Terms and Conditions", 
-   "permlevel": 0, 
-   "print_hide": 1, 
+   "fieldname": "tc_name",
+   "fieldtype": "Link",
+   "label": "Terms",
+   "oldfieldname": "tc_name",
+   "oldfieldtype": "Link",
+   "options": "Terms and Conditions",
+   "permlevel": 0,
+   "print_hide": 1,
    "search_index": 0
-  }, 
+  },
   {
-   "fieldname": "terms", 
-   "fieldtype": "Text Editor", 
-   "label": "Terms and Conditions Details", 
-   "oldfieldname": "terms", 
-   "oldfieldtype": "Text Editor", 
-   "permlevel": 0, 
+   "fieldname": "terms",
+   "fieldtype": "Text Editor",
+   "label": "Terms and Conditions Details",
+   "oldfieldname": "terms",
+   "oldfieldtype": "Text Editor",
+   "permlevel": 0,
    "print_hide": 0
-  }, 
+  },
   {
-   "depends_on": "customer", 
-   "fieldname": "contact_info", 
-   "fieldtype": "Section Break", 
-   "label": "Contact Info", 
-   "options": "icon-bullhorn", 
+   "depends_on": "customer",
+   "fieldname": "contact_info",
+   "fieldtype": "Section Break",
+   "label": "Contact Info",
+   "options": "icon-bullhorn",
    "permlevel": 0
-  }, 
+  },
   {
-   "fieldname": "col_break45", 
-   "fieldtype": "Column Break", 
-   "permlevel": 0, 
+   "fieldname": "col_break45",
+   "fieldtype": "Column Break",
+   "permlevel": 0,
    "width": "50%"
-  }, 
+  },
   {
-   "description": "<a href=\"#Sales Browser/Territory\">Add / Edit</a>", 
-   "fieldname": "territory", 
-   "fieldtype": "Link", 
-   "in_filter": 1, 
-   "label": "Territory", 
-   "options": "Territory", 
-   "permlevel": 0, 
-   "print_hide": 1, 
-   "reqd": 1, 
+   "description": "<a href=\"#Sales Browser/Territory\">Add / Edit</a>",
+   "fieldname": "territory",
+   "fieldtype": "Link",
+   "in_filter": 1,
+   "label": "Territory",
+   "options": "Territory",
+   "permlevel": 0,
+   "print_hide": 1,
+   "reqd": 1,
    "search_index": 1
-  }, 
+  },
   {
-   "description": "<a href=\"#Sales Browser/Customer Group\">Add / Edit</a>", 
-   "fieldname": "customer_group", 
-   "fieldtype": "Link", 
-   "in_filter": 1, 
-   "label": "Customer Group", 
-   "options": "Customer Group", 
-   "permlevel": 0, 
-   "print_hide": 1, 
-   "reqd": 1, 
+   "description": "<a href=\"#Sales Browser/Customer Group\">Add / Edit</a>",
+   "fieldname": "customer_group",
+   "fieldtype": "Link",
+   "in_filter": 1,
+   "label": "Customer Group",
+   "options": "Customer Group",
+   "permlevel": 0,
+   "print_hide": 1,
+   "reqd": 1,
    "search_index": 1
-  }, 
+  },
   {
-   "fieldname": "col_break46", 
-   "fieldtype": "Column Break", 
-   "permlevel": 0, 
+   "fieldname": "col_break46",
+   "fieldtype": "Column Break",
+   "permlevel": 0,
    "width": "50%"
-  }, 
+  },
   {
-   "fieldname": "customer_address", 
-   "fieldtype": "Link", 
-   "hidden": 0, 
-   "in_filter": 1, 
-   "label": "Customer Address", 
-   "options": "Address", 
-   "permlevel": 0, 
+   "fieldname": "customer_address",
+   "fieldtype": "Link",
+   "hidden": 0,
+   "in_filter": 1,
+   "label": "Customer Address",
+   "options": "Address",
+   "permlevel": 0,
    "print_hide": 1
-  }, 
+  },
   {
-   "fieldname": "contact_person", 
-   "fieldtype": "Link", 
-   "in_filter": 1, 
-   "label": "Contact Person", 
-   "options": "Contact", 
-   "permlevel": 0, 
+   "fieldname": "contact_person",
+   "fieldtype": "Link",
+   "in_filter": 1,
+   "label": "Contact Person",
+   "options": "Contact",
+   "permlevel": 0,
    "print_hide": 1
-  }, 
+  },
   {
-   "fieldname": "more_info", 
-   "fieldtype": "Section Break", 
-   "label": "More Info", 
-   "oldfieldtype": "Section Break", 
-   "options": "icon-file-text", 
-   "permlevel": 0, 
+   "fieldname": "more_info",
+   "fieldtype": "Section Break",
+   "label": "More Info",
+   "oldfieldtype": "Section Break",
+   "options": "icon-file-text",
+   "permlevel": 0,
    "print_hide": 1
-  }, 
+  },
   {
-   "description": "Track this Sales Order against any Project", 
-   "fieldname": "project_name", 
-   "fieldtype": "Link", 
-   "in_filter": 1, 
-   "label": "Project Name", 
-   "oldfieldname": "project_name", 
-   "oldfieldtype": "Link", 
-   "options": "Project", 
-   "permlevel": 0, 
+   "description": "Track this Sales Order against any Project",
+   "fieldname": "project_name",
+   "fieldtype": "Link",
+   "in_filter": 1,
+   "label": "Project Name",
+   "oldfieldname": "project_name",
+   "oldfieldtype": "Link",
+   "options": "Project",
+   "permlevel": 0,
    "search_index": 1
-  }, 
+  },
   {
-   "depends_on": "eval:doc.source == 'Campaign'", 
-   "fieldname": "campaign", 
-   "fieldtype": "Link", 
-   "label": "Campaign", 
-   "oldfieldname": "campaign", 
-   "oldfieldtype": "Link", 
-   "options": "Campaign", 
-   "permlevel": 0, 
+   "depends_on": "eval:doc.source == 'Campaign'",
+   "fieldname": "campaign",
+   "fieldtype": "Link",
+   "label": "Campaign",
+   "oldfieldname": "campaign",
+   "oldfieldtype": "Link",
+   "options": "Campaign",
+   "permlevel": 0,
    "print_hide": 1
-  }, 
+  },
   {
-   "fieldname": "source", 
-   "fieldtype": "Select", 
-   "label": "Source", 
-   "oldfieldname": "source", 
-   "oldfieldtype": "Select", 
-   "options": "\nExisting Customer\nReference\nAdvertisement\nCold Calling\nExhibition\nSupplier Reference\nMass Mailing\nCustomer's Vendor\nCampaign", 
-   "permlevel": 0, 
+   "fieldname": "source",
+   "fieldtype": "Select",
+   "label": "Source",
+   "oldfieldname": "source",
+   "oldfieldtype": "Select",
+   "options": "\nExisting Customer\nReference\nAdvertisement\nCold Calling\nExhibition\nSupplier Reference\nMass Mailing\nCustomer's Vendor\nCampaign",
+   "permlevel": 0,
    "print_hide": 1
-  }, 
+  },
   {
-   "fieldname": "column_break4", 
-   "fieldtype": "Column Break", 
-   "oldfieldtype": "Column Break", 
-   "permlevel": 0, 
-   "print_hide": 1, 
+   "fieldname": "column_break4",
+   "fieldtype": "Column Break",
+   "oldfieldtype": "Column Break",
+   "permlevel": 0,
+   "print_hide": 1,
    "width": "50%"
-  }, 
+  },
   {
-   "allow_on_submit": 1, 
-   "fieldname": "letter_head", 
-   "fieldtype": "Link", 
-   "label": "Letter Head", 
-   "oldfieldname": "letter_head", 
-   "oldfieldtype": "Select", 
-   "options": "Letter Head", 
-   "permlevel": 0, 
+   "allow_on_submit": 1,
+   "fieldname": "letter_head",
+   "fieldtype": "Link",
+   "label": "Letter Head",
+   "oldfieldname": "letter_head",
+   "oldfieldtype": "Select",
+   "options": "Letter Head",
+   "permlevel": 0,
    "print_hide": 1
-  }, 
+  },
   {
-   "allow_on_submit": 1, 
-   "fieldname": "select_print_heading", 
-   "fieldtype": "Link", 
-   "label": "Print Heading", 
-   "no_copy": 1, 
-   "oldfieldname": "select_print_heading", 
-   "oldfieldtype": "Link", 
-   "options": "Print Heading", 
-   "permlevel": 0, 
-   "print_hide": 1, 
+   "allow_on_submit": 1,
+   "fieldname": "select_print_heading",
+   "fieldtype": "Link",
+   "label": "Print Heading",
+   "no_copy": 1,
+   "oldfieldname": "select_print_heading",
+   "oldfieldtype": "Link",
+   "options": "Print Heading",
+   "permlevel": 0,
+   "print_hide": 1,
    "report_hide": 1
-  }, 
+  },
   {
-   "fieldname": "fiscal_year", 
-   "fieldtype": "Link", 
-   "in_filter": 1, 
-   "label": "Fiscal Year", 
-   "oldfieldname": "fiscal_year", 
-   "oldfieldtype": "Select", 
-   "options": "Fiscal Year", 
-   "permlevel": 0, 
-   "print_hide": 1, 
-   "reqd": 1, 
-   "search_index": 1, 
+   "fieldname": "fiscal_year",
+   "fieldtype": "Link",
+   "in_filter": 1,
+   "label": "Fiscal Year",
+   "oldfieldname": "fiscal_year",
+   "oldfieldtype": "Select",
+   "options": "Fiscal Year",
+   "permlevel": 0,
+   "print_hide": 1,
+   "reqd": 1,
+   "search_index": 1,
    "width": "150px"
-  }, 
+  },
   {
-   "fieldname": "section_break_78", 
-   "fieldtype": "Section Break", 
-   "oldfieldtype": "Column Break", 
-   "permlevel": 0, 
-   "print_hide": 1, 
+   "fieldname": "section_break_78",
+   "fieldtype": "Section Break",
+   "oldfieldtype": "Column Break",
+   "permlevel": 0,
+   "print_hide": 1,
    "width": "50%"
-  }, 
+  },
   {
-   "default": "Draft", 
-   "fieldname": "status", 
-   "fieldtype": "Select", 
-   "in_filter": 1, 
-   "in_list_view": 1, 
-   "label": "Status", 
-   "no_copy": 1, 
-   "oldfieldname": "status", 
-   "oldfieldtype": "Select", 
-   "options": "\nDraft\nSubmitted\nStopped\nCancelled", 
-   "permlevel": 0, 
-   "print_hide": 1, 
-   "read_only": 1, 
-   "reqd": 1, 
-   "search_index": 1, 
+   "default": "Draft",
+   "fieldname": "status",
+   "fieldtype": "Select",
+   "in_filter": 1,
+   "in_list_view": 1,
+   "label": "Status",
+   "no_copy": 1,
+   "oldfieldname": "status",
+   "oldfieldtype": "Select",
+   "options": "\nDraft\nSubmitted\nStopped\nCancelled",
+   "permlevel": 0,
+   "print_hide": 1,
+   "read_only": 1,
+   "reqd": 1,
+   "search_index": 1,
    "width": "100px"
-  }, 
+  },
   {
-   "fieldname": "delivery_status", 
-   "fieldtype": "Select", 
-   "hidden": 1, 
-   "label": "Delivery Status", 
-   "no_copy": 1, 
-   "options": "Delivered\nNot Delivered\nPartly Delivered\nClosed\nNot Applicable", 
-   "permlevel": 0, 
+   "fieldname": "delivery_status",
+   "fieldtype": "Select",
+   "hidden": 1,
+   "label": "Delivery Status",
+   "no_copy": 1,
+   "options": "Delivered\nNot Delivered\nPartly Delivered\nClosed\nNot Applicable",
+   "permlevel": 0,
    "print_hide": 1
-  }, 
+  },
   {
-   "depends_on": "eval:!doc.__islocal", 
-   "description": "% of materials delivered against this Sales Order", 
-   "fieldname": "per_delivered", 
-   "fieldtype": "Percent", 
-   "in_filter": 1, 
-   "in_list_view": 1, 
-   "label": "%  Delivered", 
-   "no_copy": 1, 
-   "oldfieldname": "per_delivered", 
-   "oldfieldtype": "Currency", 
-   "permlevel": 0, 
-   "print_hide": 1, 
-   "read_only": 1, 
+   "depends_on": "eval:!doc.__islocal",
+   "description": "% of materials delivered against this Sales Order",
+   "fieldname": "per_delivered",
+   "fieldtype": "Percent",
+   "in_filter": 1,
+   "in_list_view": 1,
+   "label": "%  Delivered",
+   "no_copy": 1,
+   "oldfieldname": "per_delivered",
+   "oldfieldtype": "Currency",
+   "permlevel": 0,
+   "print_hide": 1,
+   "read_only": 1,
    "width": "100px"
-  }, 
+  },
   {
-   "fieldname": "column_break_81", 
-   "fieldtype": "Column Break", 
+   "fieldname": "column_break_81",
+   "fieldtype": "Column Break",
    "permlevel": 0
-  }, 
+  },
   {
-   "depends_on": "eval:!doc.__islocal", 
-   "description": "% of materials billed against this Sales Order", 
-   "fieldname": "per_billed", 
-   "fieldtype": "Percent", 
-   "in_filter": 1, 
-   "in_list_view": 1, 
-   "label": "% Amount Billed", 
-   "no_copy": 1, 
-   "oldfieldname": "per_billed", 
-   "oldfieldtype": "Currency", 
-   "permlevel": 0, 
-   "print_hide": 1, 
-   "read_only": 1, 
+   "depends_on": "eval:!doc.__islocal",
+   "description": "% of materials billed against this Sales Order",
+   "fieldname": "per_billed",
+   "fieldtype": "Percent",
+   "in_filter": 1,
+   "in_list_view": 1,
+   "label": "% Amount Billed",
+   "no_copy": 1,
+   "oldfieldname": "per_billed",
+   "oldfieldtype": "Currency",
+   "permlevel": 0,
+   "print_hide": 1,
+   "read_only": 1,
    "width": "100px"
-  }, 
+  },
   {
-   "fieldname": "billing_status", 
-   "fieldtype": "Select", 
-   "hidden": 1, 
-   "label": "Billing Status", 
-   "no_copy": 1, 
-   "options": "Billed\nNot Billed\nPartly Billed\nClosed", 
-   "permlevel": 0, 
+   "fieldname": "billing_status",
+   "fieldtype": "Select",
+   "hidden": 1,
+   "label": "Billing Status",
+   "no_copy": 1,
+   "options": "Billed\nNot Billed\nPartly Billed\nClosed",
+   "permlevel": 0,
    "print_hide": 1
-  }, 
+  },
   {
-   "fieldname": "sales_team_section_break", 
-   "fieldtype": "Section Break", 
-   "label": "Sales Team", 
-   "oldfieldtype": "Section Break", 
-   "options": "icon-group", 
-   "permlevel": 0, 
+   "fieldname": "sales_team_section_break",
+   "fieldtype": "Section Break",
+   "label": "Sales Team",
+   "oldfieldtype": "Section Break",
+   "options": "icon-group",
+   "permlevel": 0,
    "print_hide": 1
-  }, 
+  },
   {
-   "fieldname": "sales_partner", 
-   "fieldtype": "Link", 
-   "in_filter": 1, 
-   "label": "Sales Partner", 
-   "oldfieldname": "sales_partner", 
-   "oldfieldtype": "Link", 
-   "options": "Sales Partner", 
-   "permlevel": 0, 
-   "print_hide": 1, 
-   "search_index": 1, 
+   "fieldname": "sales_partner",
+   "fieldtype": "Link",
+   "in_filter": 1,
+   "label": "Sales Partner",
+   "oldfieldname": "sales_partner",
+   "oldfieldtype": "Link",
+   "options": "Sales Partner",
+   "permlevel": 0,
+   "print_hide": 1,
+   "search_index": 1,
    "width": "150px"
-  }, 
+  },
   {
-   "fieldname": "column_break7", 
-   "fieldtype": "Column Break", 
-   "permlevel": 0, 
-   "print_hide": 1, 
+   "fieldname": "column_break7",
+   "fieldtype": "Column Break",
+   "permlevel": 0,
+   "print_hide": 1,
    "width": "50%"
-  }, 
+  },
   {
-   "fieldname": "commission_rate", 
-   "fieldtype": "Float", 
-   "label": "Commission Rate", 
-   "oldfieldname": "commission_rate", 
-   "oldfieldtype": "Currency", 
-   "permlevel": 0, 
-   "print_hide": 1, 
+   "fieldname": "commission_rate",
+   "fieldtype": "Float",
+   "label": "Commission Rate",
+   "oldfieldname": "commission_rate",
+   "oldfieldtype": "Currency",
+   "permlevel": 0,
+   "print_hide": 1,
    "width": "100px"
-  }, 
+  },
   {
-   "fieldname": "total_commission", 
-   "fieldtype": "Currency", 
-   "label": "Total Commission", 
-   "oldfieldname": "total_commission", 
-   "oldfieldtype": "Currency", 
-   "options": "Company:company:default_currency", 
-   "permlevel": 0, 
+   "fieldname": "total_commission",
+   "fieldtype": "Currency",
+   "label": "Total Commission",
+   "oldfieldname": "total_commission",
+   "oldfieldtype": "Currency",
+   "options": "Company:company:default_currency",
+   "permlevel": 0,
    "print_hide": 1
-  }, 
+  },
   {
-   "fieldname": "section_break1", 
-   "fieldtype": "Section Break", 
-   "permlevel": 0, 
+   "fieldname": "section_break1",
+   "fieldtype": "Section Break",
+   "permlevel": 0,
    "print_hide": 1
-  }, 
+  },
   {
-   "fieldname": "sales_team", 
-   "fieldtype": "Table", 
-   "label": "Sales Team1", 
-   "oldfieldname": "sales_team", 
-   "oldfieldtype": "Table", 
-   "options": "Sales Team", 
-   "permlevel": 0, 
+   "fieldname": "sales_team",
+   "fieldtype": "Table",
+   "label": "Sales Team1",
+   "oldfieldname": "sales_team",
+   "oldfieldtype": "Table",
+   "options": "Sales Team",
+   "permlevel": 0,
    "print_hide": 1
   }
- ], 
- "icon": "icon-file-text", 
- "idx": 1, 
- "is_submittable": 1, 
- "issingle": 0, 
- "modified": "2014-06-23 07:55:52.555192", 
- "modified_by": "Administrator", 
- "module": "Selling", 
- "name": "Sales Order", 
- "owner": "Administrator", 
+ ],
+ "icon": "icon-file-text",
+ "idx": 1,
+ "is_submittable": 1,
+ "issingle": 0,
+ "modified": "2014-06-27 07:55:52.555192",
+ "modified_by": "Administrator",
+ "module": "Selling",
+ "name": "Sales Order",
+ "owner": "Administrator",
  "permissions": [
   {
-   "amend": 1, 
-   "apply_user_permissions": 1, 
-   "cancel": 1, 
-   "create": 1, 
-   "delete": 1, 
-   "email": 1, 
-   "permlevel": 0, 
-   "print": 1, 
-   "read": 1, 
-   "report": 1, 
-   "role": "Sales User", 
-   "submit": 1, 
+   "amend": 1,
+   "apply_user_permissions": 1,
+   "cancel": 1,
+   "create": 1,
+   "delete": 1,
+   "email": 1,
+   "permlevel": 0,
+   "print": 1,
+   "read": 1,
+   "report": 1,
+   "role": "Sales User",
+   "submit": 1,
    "write": 1
-  }, 
+  },
   {
-   "amend": 1, 
-   "cancel": 1, 
-   "create": 1, 
-   "delete": 1, 
-   "email": 1, 
-   "export": 1, 
-   "import": 1, 
-   "permlevel": 0, 
-   "print": 1, 
-   "read": 1, 
-   "report": 1, 
-   "role": "Sales Manager", 
-   "set_user_permissions": 1, 
-   "submit": 1, 
+   "amend": 1,
+   "cancel": 1,
+   "create": 1,
+   "delete": 1,
+   "email": 1,
+   "export": 1,
+   "import": 1,
+   "permlevel": 0,
+   "print": 1,
+   "read": 1,
+   "report": 1,
+   "role": "Sales Manager",
+   "set_user_permissions": 1,
+   "submit": 1,
    "write": 1
-  }, 
+  },
   {
-   "amend": 1, 
-   "apply_user_permissions": 1, 
-   "cancel": 1, 
-   "create": 1, 
-   "delete": 1, 
-   "email": 1, 
-   "permlevel": 0, 
-   "print": 1, 
-   "read": 1, 
-   "report": 1, 
-   "role": "Maintenance User", 
-   "submit": 1, 
+   "amend": 1,
+   "apply_user_permissions": 1,
+   "cancel": 1,
+   "create": 1,
+   "delete": 1,
+   "email": 1,
+   "permlevel": 0,
+   "print": 1,
+   "read": 1,
+   "report": 1,
+   "role": "Maintenance User",
+   "submit": 1,
    "write": 1
-  }, 
+  },
   {
-   "apply_user_permissions": 1, 
-   "cancel": 0, 
-   "delete": 0, 
-   "email": 1, 
-   "permlevel": 0, 
-   "print": 1, 
-   "read": 1, 
+   "apply_user_permissions": 1,
+   "cancel": 0,
+   "delete": 0,
+   "email": 1,
+   "permlevel": 0,
+   "print": 1,
+   "read": 1,
    "role": "Accounts User"
-  }, 
+  },
   {
-   "apply_user_permissions": 1, 
-   "cancel": 0, 
-   "delete": 0, 
-   "email": 1, 
-   "permlevel": 0, 
-   "print": 1, 
-   "read": 1, 
+   "apply_user_permissions": 1,
+   "cancel": 0,
+   "delete": 0,
+   "email": 1,
+   "permlevel": 0,
+   "print": 1,
+   "read": 1,
    "role": "Customer"
-  }, 
+  },
   {
-   "apply_user_permissions": 1, 
-   "permlevel": 0, 
-   "read": 1, 
-   "report": 1, 
+   "apply_user_permissions": 1,
+   "permlevel": 0,
+   "read": 1,
+   "report": 1,
    "role": "Material User"
-  }, 
+  },
   {
-   "permlevel": 1, 
-   "read": 1, 
-   "role": "Sales Manager", 
+   "permlevel": 1,
+   "read": 1,
+   "role": "Sales Manager",
    "write": 1
   }
- ], 
- "read_only_onload": 1, 
- "search_fields": "status,transaction_date,customer,customer_name, territory,order_type,company", 
- "sort_field": "modified", 
+ ],
+ "read_only_onload": 1,
+ "search_fields": "status,transaction_date,customer,customer_name, territory,order_type,company",
+ "sort_field": "modified",
  "sort_order": "DESC"
-}
\ No newline at end of file
+}
diff --git a/erpnext/setup/doctype/item_group/item_group.py b/erpnext/setup/doctype/item_group/item_group.py
index 94cd3ec..3f6d2e5 100644
--- a/erpnext/setup/doctype/item_group/item_group.py
+++ b/erpnext/setup/doctype/item_group/item_group.py
@@ -102,5 +102,6 @@
 		item_group = doc.name
 
 	for i in get_parent_item_groups(item_group):
-		if i.page_name:
-			clear_cache(i.page_name)
+		route = frappe.db.get_value("Website Route", {"ref_doctype":"Item Group", "docname": i.name})
+		if route:
+			clear_cache(route)
diff --git a/erpnext/setup/doctype/sales_partner/sales_partner.js b/erpnext/setup/doctype/sales_partner/sales_partner.js
index b12c01b..02af9f7 100644
--- a/erpnext/setup/doctype/sales_partner/sales_partner.js
+++ b/erpnext/setup/doctype/sales_partner/sales_partner.js
@@ -17,6 +17,11 @@
 		// make lists
 		cur_frm.cscript.make_address(doc,dt,dn);
 		cur_frm.cscript.make_contact(doc,dt,dn);
+
+		if (doc.show_in_website) {
+			cur_frm.set_intro(__("Published on website at: {0}",
+				[repl('<a href="/%(website_route)s" target="_blank">/%(website_route)s</a>', doc.__onload)]));
+		}
 	}
 }
 
diff --git a/erpnext/setup/doctype/sales_partner/sales_partner.json b/erpnext/setup/doctype/sales_partner/sales_partner.json
index bd006dc..ef91814 100644
--- a/erpnext/setup/doctype/sales_partner/sales_partner.json
+++ b/erpnext/setup/doctype/sales_partner/sales_partner.json
@@ -188,6 +188,7 @@
    "permlevel": 0
   }, 
   {
+   "default": "partners", 
    "fieldname": "parent_website_route", 
    "fieldtype": "Link", 
    "label": "Parent Website Route", 
@@ -198,7 +199,7 @@
  "icon": "icon-user", 
  "idx": 1, 
  "in_create": 0, 
- "modified": "2014-05-27 03:49:18.661354", 
+ "modified": "2014-06-27 09:21:33.687012", 
  "modified_by": "Administrator", 
  "module": "Setup", 
  "name": "Sales Partner", 
diff --git a/erpnext/setup/doctype/sales_partner/sales_partner.py b/erpnext/setup/doctype/sales_partner/sales_partner.py
index 6969519..296cd6a 100644
--- a/erpnext/setup/doctype/sales_partner/sales_partner.py
+++ b/erpnext/setup/doctype/sales_partner/sales_partner.py
@@ -46,3 +46,6 @@
 
 		return context
 
+	def get_parent_website_route(self):
+		parent_website_sitemap = super(SalesPartner, self).get_parent_website_route()
+		return parent_website_sitemap or "partners"
diff --git a/erpnext/stock/doctype/item/item.py b/erpnext/stock/doctype/item/item.py
index f68f0e9..8140f40 100644
--- a/erpnext/stock/doctype/item/item.py
+++ b/erpnext/stock/doctype/item/item.py
@@ -50,8 +50,10 @@
 		if not self.parent_website_route:
 			self.parent_website_route = frappe.get_website_route("Item Group", self.item_group)
 
-		if self.name:
-			self.old_page_name = frappe.db.get_value('Item', self.name, 'page_name')
+		if not self.get("__islocal"):
+			self.old_item_group = frappe.db.get_value(self.doctype, self.name, "item_group")
+			self.old_website_item_groups = frappe.db.sql_list("""select item_group from `tabWebsite Item Group`
+				where parentfield='website_item_groups' and parenttype='Item' and parent=%s""", self.name)
 
 	def on_update(self):
 		super(Item, self).on_update()
@@ -216,7 +218,7 @@
 		if self.name==self.item_name:
 			page_name_from = self.name
 		else:
-			page_name_from = self.name + " " + self.item_name
+			page_name_from = self.name + " - " + self.item_name
 
 		return page_name_from
 
@@ -363,6 +365,12 @@
 
 def invalidate_cache_for_item(doc):
 	invalidate_cache_for(doc, doc.item_group)
-	for d in doc.get({"doctype":"Website Item Group"}):
-		if d.item_group:
-			invalidate_cache_for(doc, d.item_group)
+
+	website_item_groups = list(set((doc.get("old_website_item_groups") or [])
+		+ [d.item_group for d in doc.get({"doctype":"Website Item Group"}) if d.item_group]))
+
+	for item_group in website_item_groups:
+		invalidate_cache_for(doc, item_group)
+
+	if doc.get("old_item_group"):
+		invalidate_cache_for(doc, doc.old_item_group)
diff --git a/erpnext/templates/generators/partner.html b/erpnext/templates/generators/sales_partner.html
similarity index 100%
rename from erpnext/templates/generators/partner.html
rename to erpnext/templates/generators/sales_partner.html
diff --git a/erpnext/templates/pages/partners.html b/erpnext/templates/pages/partners.html
index 089c15b..181c6b3 100644
--- a/erpnext/templates/pages/partners.html
+++ b/erpnext/templates/pages/partners.html
@@ -9,13 +9,13 @@
 		<div class="col-md-3">
 			{% if partner_info.logo -%}
 			<a href="{{ partner_info.page_name }}">
-				<img itemprop="brand" src="{{ partner_info.logo }}" class="partner-logo" 
+				<img itemprop="brand" src="{{ partner_info.logo }}" class="partner-logo"
 					alt="{{ partner_info.partner_name }}" title="{{ partner_info.partner_name }}" />
 			</a>
 			{%- endif %}
 		</div>
 		<div class="col-md-9">
-			<a href="{{ partner_info.page_name }}">
+			<a href="{{ partner_info.route }}">
 				<h4>{{ partner_info.partner_name }}</h4>
 			</a>
 			<p style="color: #999">{{ partner_info.territory }} - {{ partner_info.partner_type }}</p>
@@ -27,4 +27,4 @@
 </div>
 {% endblock %}
 
-{% block sidebar %}{% include "templates/includes/sidebar.html" %}{% endblock %}
\ No newline at end of file
+{% block sidebar %}{% include "templates/includes/sidebar.html" %}{% endblock %}
diff --git a/erpnext/templates/pages/partners.py b/erpnext/templates/pages/partners.py
index 94b553c..7dc20d4 100644
--- a/erpnext/templates/pages/partners.py
+++ b/erpnext/templates/pages/partners.py
@@ -5,9 +5,16 @@
 import frappe
 import frappe.website.render
 
+page_title = "Partners"
+
 def get_context(context):
+	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": frappe.db.sql("""select * from `tabSales Partner`
-			where show_in_website=1 order by name asc""", as_dict=True),
-		"title": "Partners"
+		"partners": partners,
+		"title": page_title
 	}