Permission relogication continued
diff --git a/erpnext/accounts/doctype/account/account.json b/erpnext/accounts/doctype/account/account.json
index ccb0d24..ab88305 100644
--- a/erpnext/accounts/doctype/account/account.json
+++ b/erpnext/accounts/doctype/account/account.json
@@ -218,7 +218,7 @@
  "permissions": [
   {
    "amend": 0,
-   "cancel": 0,
+   "apply_user_permissions": 1,
    "create": 1,
    "delete": 1,
    "email": 1,
@@ -234,7 +234,7 @@
   },
   {
    "amend": 0,
-   "cancel": 0,
+   "apply_user_permissions": 1,
    "create": 0,
    "delete": 0,
    "email": 1,
@@ -248,7 +248,7 @@
   },
   {
    "amend": 0,
-   "cancel": 0,
+   "apply_user_permissions": 1,
    "create": 0,
    "delete": 0,
    "email": 1,
@@ -262,7 +262,7 @@
   },
   {
    "amend": 0,
-   "cancel": 0,
+   "apply_user_permissions": 1,
    "create": 0,
    "delete": 0,
    "email": 1,
@@ -288,7 +288,6 @@
   },
   {
    "amend": 0,
-   "cancel": 0,
    "create": 1,
    "delete": 1,
    "email": 1,
@@ -298,8 +297,8 @@
    "print": 1,
    "read": 1,
    "report": 1,
-   "set_user_permissions": 1,
    "role": "Accounts Manager",
+   "set_user_permissions": 1,
    "submit": 0,
    "write": 1
   },
diff --git a/erpnext/accounts/doctype/bank_reconciliation/bank_reconciliation.json b/erpnext/accounts/doctype/bank_reconciliation/bank_reconciliation.json
index d0757fd..6af86ed 100644
--- a/erpnext/accounts/doctype/bank_reconciliation/bank_reconciliation.json
+++ b/erpnext/accounts/doctype/bank_reconciliation/bank_reconciliation.json
@@ -85,7 +85,7 @@
  "icon": "icon-check", 
  "idx": 1, 
  "issingle": 1, 
- "modified": "2014-05-06 16:26:08.984595", 
+ "modified": "2014-05-27 03:37:21.783216", 
  "modified_by": "Administrator", 
  "module": "Accounts", 
  "name": "Bank Reconciliation", 
@@ -93,6 +93,7 @@
  "permissions": [
   {
    "amend": 0, 
+   "apply_user_permissions": 0, 
    "cancel": 0, 
    "create": 1, 
    "permlevel": 0, 
diff --git a/erpnext/accounts/doctype/c_form/c_form.json b/erpnext/accounts/doctype/c_form/c_form.json
index 6ba4578..8782a11 100644
--- a/erpnext/accounts/doctype/c_form/c_form.json
+++ b/erpnext/accounts/doctype/c_form/c_form.json
@@ -139,13 +139,14 @@
  "idx": 1, 
  "is_submittable": 1, 
  "max_attachments": 3, 
- "modified": "2014-05-26 03:05:47.144265", 
+ "modified": "2014-05-27 03:49:08.272135", 
  "modified_by": "Administrator", 
  "module": "Accounts", 
  "name": "C-Form", 
  "owner": "Administrator", 
  "permissions": [
   {
+   "apply_user_permissions": 1, 
    "create": 1, 
    "email": 1, 
    "permlevel": 0, 
diff --git a/erpnext/accounts/doctype/cost_center/cost_center.json b/erpnext/accounts/doctype/cost_center/cost_center.json
index 2e3efc1..36cb6ae 100644
--- a/erpnext/accounts/doctype/cost_center/cost_center.json
+++ b/erpnext/accounts/doctype/cost_center/cost_center.json
@@ -145,7 +145,7 @@
  "icon": "icon-money", 
  "idx": 1, 
  "in_create": 1, 
- "modified": "2014-05-26 03:05:47.474366", 
+ "modified": "2014-05-27 03:49:08.910126", 
  "modified_by": "Administrator", 
  "module": "Accounts", 
  "name": "Cost Center", 
@@ -153,7 +153,6 @@
  "permissions": [
   {
    "amend": 0, 
-   "cancel": 0, 
    "create": 1, 
    "delete": 1, 
    "email": 1, 
@@ -167,7 +166,7 @@
   }, 
   {
    "amend": 0, 
-   "cancel": 0, 
+   "apply_user_permissions": 1, 
    "create": 0, 
    "delete": 0, 
    "email": 1, 
@@ -180,16 +179,19 @@
    "write": 0
   }, 
   {
+   "apply_user_permissions": 1, 
    "permlevel": 0, 
    "read": 1, 
    "role": "Sales User"
   }, 
   {
+   "apply_user_permissions": 1, 
    "permlevel": 0, 
    "read": 1, 
    "role": "Purchase User"
   }, 
   {
+   "apply_user_permissions": 1, 
    "permlevel": 0, 
    "read": 1, 
    "role": "Material User"
diff --git a/erpnext/accounts/doctype/fiscal_year/fiscal_year.json b/erpnext/accounts/doctype/fiscal_year/fiscal_year.json
index 314dfab..dcd5a76 100644
--- a/erpnext/accounts/doctype/fiscal_year/fiscal_year.json
+++ b/erpnext/accounts/doctype/fiscal_year/fiscal_year.json
@@ -1,7 +1,7 @@
 {
  "allow_import": 1, 
  "autoname": "field:year", 
- "creation": "2013-01-22 16:50:25.000000", 
+ "creation": "2013-01-22 16:50:25", 
  "description": "**Fiscal Year** represents a Financial Year. All accounting entries and other major transactions are tracked against **Fiscal Year**.", 
  "docstatus": 0, 
  "doctype": "DocType", 
@@ -11,6 +11,7 @@
    "description": "For e.g. 2012, 2012-13", 
    "fieldname": "year", 
    "fieldtype": "Data", 
+   "in_list_view": 1, 
    "label": "Year Name", 
    "oldfieldname": "year", 
    "oldfieldtype": "Data", 
@@ -20,6 +21,7 @@
   {
    "fieldname": "year_start_date", 
    "fieldtype": "Date", 
+   "in_list_view": 1, 
    "label": "Year Start Date", 
    "no_copy": 1, 
    "oldfieldname": "year_start_date", 
@@ -30,6 +32,7 @@
   {
    "fieldname": "year_end_date", 
    "fieldtype": "Date", 
+   "in_list_view": 1, 
    "label": "Year End Date", 
    "no_copy": 1, 
    "permlevel": 0, 
@@ -40,6 +43,7 @@
    "description": "Entries are not allowed against this Fiscal Year if the year is closed.", 
    "fieldname": "is_fiscal_year_closed", 
    "fieldtype": "Select", 
+   "in_list_view": 1, 
    "label": "Year Closed", 
    "no_copy": 1, 
    "oldfieldname": "is_fiscal_year_closed", 
@@ -51,14 +55,13 @@
  ], 
  "icon": "icon-calendar", 
  "idx": 1, 
- "modified": "2014-01-20 17:48:46.000000", 
+ "modified": "2014-05-27 03:49:10.942338", 
  "modified_by": "Administrator", 
  "module": "Accounts", 
  "name": "Fiscal Year", 
  "owner": "Administrator", 
  "permissions": [
   {
-   "cancel": 0, 
    "create": 1, 
    "delete": 1, 
    "email": 1, 
@@ -71,6 +74,7 @@
    "write": 1
   }, 
   {
+   "apply_user_permissions": 1, 
    "delete": 0, 
    "email": 1, 
    "permlevel": 0, 
diff --git a/erpnext/accounts/doctype/gl_entry/gl_entry.json b/erpnext/accounts/doctype/gl_entry/gl_entry.json
index e6290a3..7f7d2bc 100644
--- a/erpnext/accounts/doctype/gl_entry/gl_entry.json
+++ b/erpnext/accounts/doctype/gl_entry/gl_entry.json
@@ -186,7 +186,7 @@
  "icon": "icon-list", 
  "idx": 1, 
  "in_create": 1, 
- "modified": "2014-05-09 02:16:29.981405", 
+ "modified": "2014-05-27 03:49:10.998572", 
  "modified_by": "Administrator", 
  "module": "Accounts", 
  "name": "GL Entry", 
@@ -194,7 +194,7 @@
  "permissions": [
   {
    "amend": 0, 
-   "cancel": 0, 
+   "apply_user_permissions": 1, 
    "create": 0, 
    "email": 1, 
    "permlevel": 0, 
@@ -207,7 +207,6 @@
   }, 
   {
    "amend": 0, 
-   "cancel": 0, 
    "create": 0, 
    "email": 1, 
    "permlevel": 0, 
diff --git a/erpnext/accounts/doctype/journal_voucher/journal_voucher.json b/erpnext/accounts/doctype/journal_voucher/journal_voucher.json
index bafc6df..ac40266 100644
--- a/erpnext/accounts/doctype/journal_voucher/journal_voucher.json
+++ b/erpnext/accounts/doctype/journal_voucher/journal_voucher.json
@@ -440,7 +440,7 @@
  "icon": "icon-file-text", 
  "idx": 1, 
  "is_submittable": 1, 
- "modified": "2014-05-26 03:05:49.482476", 
+ "modified": "2014-05-27 03:49:12.326026", 
  "modified_by": "Administrator", 
  "module": "Accounts", 
  "name": "Journal Voucher", 
@@ -448,6 +448,7 @@
  "permissions": [
   {
    "amend": 1, 
+   "apply_user_permissions": 1, 
    "cancel": 1, 
    "create": 1, 
    "delete": 1, 
@@ -476,6 +477,7 @@
   }, 
   {
    "amend": 0, 
+   "apply_user_permissions": 1, 
    "cancel": 0, 
    "create": 0, 
    "delete": 0, 
diff --git a/erpnext/accounts/doctype/mode_of_payment/mode_of_payment.json b/erpnext/accounts/doctype/mode_of_payment/mode_of_payment.json
index decdc0a..2ad9897 100644
--- a/erpnext/accounts/doctype/mode_of_payment/mode_of_payment.json
+++ b/erpnext/accounts/doctype/mode_of_payment/mode_of_payment.json
@@ -41,7 +41,7 @@
  ], 
  "icon": "icon-credit-card", 
  "idx": 1, 
- "modified": "2014-05-26 03:05:50.299354", 
+ "modified": "2014-05-27 03:49:13.846602", 
  "modified_by": "Administrator", 
  "module": "Accounts", 
  "name": "Mode of Payment", 
@@ -59,6 +59,7 @@
    "write": 1
   }, 
   {
+   "apply_user_permissions": 1, 
    "permlevel": 0, 
    "read": 1, 
    "report": 1, 
diff --git a/erpnext/accounts/doctype/pos_setting/pos_setting.json b/erpnext/accounts/doctype/pos_setting/pos_setting.json
index 5bc3a07..27d79f3 100755
--- a/erpnext/accounts/doctype/pos_setting/pos_setting.json
+++ b/erpnext/accounts/doctype/pos_setting/pos_setting.json
@@ -205,14 +205,13 @@
  ], 
  "icon": "icon-cog", 
  "idx": 1, 
- "modified": "2014-05-09 02:17:34.814856", 
+ "modified": "2014-05-27 03:49:14.735138", 
  "modified_by": "Administrator", 
  "module": "Accounts", 
  "name": "POS Setting", 
  "owner": "Administrator", 
  "permissions": [
   {
-   "cancel": 0, 
    "create": 1, 
    "delete": 1, 
    "email": 1, 
@@ -225,7 +224,7 @@
    "write": 1
   }, 
   {
-   "cancel": 0, 
+   "apply_user_permissions": 1, 
    "delete": 0, 
    "email": 1, 
    "permlevel": 0, 
diff --git a/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.json b/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.json
index 23bf3d8..dfe5704 100755
--- a/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.json
+++ b/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.json
@@ -744,7 +744,7 @@
  "icon": "icon-file-text", 
  "idx": 1, 
  "is_submittable": 1, 
- "modified": "2014-05-26 03:05:50.996094", 
+ "modified": "2014-05-27 03:49:15.589404", 
  "modified_by": "Administrator", 
  "module": "Accounts", 
  "name": "Purchase Invoice", 
@@ -752,6 +752,7 @@
  "permissions": [
   {
    "amend": 0, 
+   "apply_user_permissions": 1, 
    "cancel": 0, 
    "create": 0, 
    "delete": 0, 
@@ -766,6 +767,7 @@
   }, 
   {
    "amend": 0, 
+   "apply_user_permissions": 1, 
    "cancel": 0, 
    "create": 0, 
    "delete": 0, 
@@ -780,6 +782,7 @@
   }, 
   {
    "amend": 0, 
+   "apply_user_permissions": 1, 
    "cancel": 0, 
    "create": 0, 
    "delete": 0, 
@@ -808,6 +811,7 @@
   }, 
   {
    "amend": 0, 
+   "apply_user_permissions": 1, 
    "cancel": 0, 
    "create": 0, 
    "delete": 0, 
diff --git a/erpnext/accounts/doctype/sales_invoice/sales_invoice.json b/erpnext/accounts/doctype/sales_invoice/sales_invoice.json
index 5d3c50f..983f2bb 100644
--- a/erpnext/accounts/doctype/sales_invoice/sales_invoice.json
+++ b/erpnext/accounts/doctype/sales_invoice/sales_invoice.json
@@ -1180,7 +1180,7 @@
  "icon": "icon-file-text", 
  "idx": 1, 
  "is_submittable": 1, 
- "modified": "2014-05-26 03:05:52.871209", 
+ "modified": "2014-05-27 03:49:17.806077", 
  "modified_by": "Administrator", 
  "module": "Accounts", 
  "name": "Sales Invoice", 
@@ -1202,6 +1202,7 @@
   }, 
   {
    "amend": 1, 
+   "apply_user_permissions": 1, 
    "cancel": 0, 
    "create": 1, 
    "delete": 0, 
@@ -1215,6 +1216,7 @@
    "write": 1
   }, 
   {
+   "apply_user_permissions": 1, 
    "cancel": 0, 
    "delete": 0, 
    "email": 1, 
diff --git a/erpnext/accounts/doctype/sales_taxes_and_charges_master/sales_taxes_and_charges_master.json b/erpnext/accounts/doctype/sales_taxes_and_charges_master/sales_taxes_and_charges_master.json
index 81cd189..47d385b 100644
--- a/erpnext/accounts/doctype/sales_taxes_and_charges_master/sales_taxes_and_charges_master.json
+++ b/erpnext/accounts/doctype/sales_taxes_and_charges_master/sales_taxes_and_charges_master.json
@@ -2,7 +2,7 @@
  "allow_import": 1, 
  "allow_rename": 1, 
  "autoname": "field:title", 
- "creation": "2013-01-10 16:34:09.000000", 
+ "creation": "2013-01-10 16:34:09", 
  "description": "Standard tax template that can be applied to all Sales Transactions. This template can contain list of tax heads and also other expense / income heads like \"Shipping\", \"Insurance\", \"Handling\" etc.\n\n#### Note\n\nThe tax rate you define here will be the standard tax rate for all **Items**. If there are **Items** that have different rates, they must be added in the **Item Tax** table in the **Item** master.\n\n#### Description of Columns\n\n1. Calculation Type: \n    - This can be on **Net Total** (that is the sum of basic amount).\n    - **On Previous Row Total / Amount** (for cumulative taxes or charges). If you select this option, the tax will be applied as a percentage of the previous row (in the tax table) amount or total.\n    - **Actual** (as mentioned).\n2. Account Head: The Account ledger under which this tax will be booked\n3. Cost Center: If the tax / charge is an income (like shipping) or expense it needs to be booked against a Cost Center.\n4. Description: Description of the tax (that will be printed in invoices / quotes).\n5. Rate: Tax rate.\n6. Amount: Tax amount.\n7. Total: Cumulative total to this point.\n8. Enter Row: If based on \"Previous Row Total\" you can select the row number which will be taken as a base for this calculation (default is the previous row).\n9. Is this Tax included in Basic Rate?: If you check this, it means that this tax will not be shown below the item table, but will be included in the Basic Rate in your main item table. This is useful where you want give a flat price (inclusive of all taxes) price to customers.", 
  "docstatus": 0, 
  "doctype": "DocType", 
@@ -12,6 +12,7 @@
    "fieldname": "title", 
    "fieldtype": "Data", 
    "in_filter": 1, 
+   "in_list_view": 1, 
    "label": "Title", 
    "oldfieldname": "title", 
    "oldfieldtype": "Data", 
@@ -22,6 +23,7 @@
   {
    "fieldname": "is_default", 
    "fieldtype": "Check", 
+   "in_list_view": 1, 
    "label": "Default", 
    "permlevel": 0
   }, 
@@ -34,6 +36,7 @@
    "fieldname": "company", 
    "fieldtype": "Link", 
    "in_filter": 1, 
+   "in_list_view": 1, 
    "label": "Company", 
    "oldfieldname": "company", 
    "oldfieldtype": "Link", 
@@ -69,7 +72,7 @@
  ], 
  "icon": "icon-money", 
  "idx": 1, 
- "modified": "2014-01-28 12:28:27.000000", 
+ "modified": "2014-05-27 03:49:19.023941", 
  "modified_by": "Administrator", 
  "module": "Accounts", 
  "name": "Sales Taxes and Charges Master", 
@@ -77,7 +80,7 @@
  "permissions": [
   {
    "amend": 0, 
-   "cancel": 0, 
+   "apply_user_permissions": 1, 
    "create": 0, 
    "delete": 0, 
    "email": 1, 
@@ -91,7 +94,6 @@
   }, 
   {
    "amend": 0, 
-   "cancel": 0, 
    "create": 1, 
    "delete": 1, 
    "email": 1, 
@@ -105,7 +107,6 @@
   }, 
   {
    "amend": 0, 
-   "cancel": 0, 
    "create": 1, 
    "delete": 1, 
    "email": 1, 
diff --git a/erpnext/accounts/doctype/shipping_rule/shipping_rule.json b/erpnext/accounts/doctype/shipping_rule/shipping_rule.json
index d46bfdf..1701c88 100644
--- a/erpnext/accounts/doctype/shipping_rule/shipping_rule.json
+++ b/erpnext/accounts/doctype/shipping_rule/shipping_rule.json
@@ -1,6 +1,6 @@
 {
  "autoname": "Prompt", 
- "creation": "2013-06-25 11:48:03.000000", 
+ "creation": "2013-06-25 11:48:03", 
  "description": "Specify conditions to calculate shipping amount", 
  "docstatus": 0, 
  "doctype": "DocType", 
@@ -102,13 +102,14 @@
  ], 
  "icon": "icon-truck", 
  "idx": 1, 
- "modified": "2014-01-20 17:49:27.000000", 
+ "modified": "2014-05-27 03:49:19.387875", 
  "modified_by": "Administrator", 
  "module": "Accounts", 
  "name": "Shipping Rule", 
  "owner": "Administrator", 
  "permissions": [
   {
+   "apply_user_permissions": 1, 
    "delete": 0, 
    "email": 1, 
    "permlevel": 0, 
@@ -118,6 +119,7 @@
    "role": "Accounts User"
   }, 
   {
+   "apply_user_permissions": 1, 
    "delete": 0, 
    "email": 1, 
    "permlevel": 0, 
@@ -127,7 +129,6 @@
    "role": "Sales User"
   }, 
   {
-   "cancel": 1, 
    "create": 1, 
    "delete": 1, 
    "email": 1, 
@@ -139,7 +140,6 @@
    "write": 1
   }, 
   {
-   "cancel": 1, 
    "create": 1, 
    "delete": 1, 
    "email": 1, 
diff --git a/erpnext/accounts/party.py b/erpnext/accounts/party.py
index 539ebd1..9792da1 100644
--- a/erpnext/accounts/party.py
+++ b/erpnext/accounts/party.py
@@ -86,9 +86,9 @@
 
 def set_price_list(out, party, party_type, given_price_list):
 	# price list
-	price_list = get_user_permissions().get("Price List")
+	price_list = filter(None, get_user_permissions().get("Price List", []))
 	if isinstance(price_list, list):
-		price_list = None
+		price_list = price_list[0] if len(price_list)==1 else None
 
 	if not price_list:
 		price_list = party.default_price_list
diff --git a/erpnext/buying/doctype/purchase_order/purchase_order.json b/erpnext/buying/doctype/purchase_order/purchase_order.json
index 839e788..d293683 100644
--- a/erpnext/buying/doctype/purchase_order/purchase_order.json
+++ b/erpnext/buying/doctype/purchase_order/purchase_order.json
@@ -636,7 +636,7 @@
  "icon": "icon-file-text", 
  "idx": 1, 
  "is_submittable": 1, 
- "modified": "2014-05-26 03:05:51.544591", 
+ "modified": "2014-05-27 03:49:15.948363", 
  "modified_by": "Administrator", 
  "module": "Buying", 
  "name": "Purchase Order", 
@@ -644,6 +644,7 @@
  "permissions": [
   {
    "amend": 0, 
+   "apply_user_permissions": 1, 
    "cancel": 0, 
    "create": 0, 
    "delete": 0, 
@@ -672,6 +673,7 @@
   }, 
   {
    "amend": 1, 
+   "apply_user_permissions": 1, 
    "cancel": 1, 
    "create": 1, 
    "delete": 1, 
@@ -685,6 +687,7 @@
    "write": 1
   }, 
   {
+   "apply_user_permissions": 1, 
    "cancel": 0, 
    "delete": 0, 
    "email": 1, 
diff --git a/erpnext/buying/doctype/supplier/supplier.json b/erpnext/buying/doctype/supplier/supplier.json
index c418d01..752f342 100644
--- a/erpnext/buying/doctype/supplier/supplier.json
+++ b/erpnext/buying/doctype/supplier/supplier.json
@@ -186,7 +186,7 @@
  ], 
  "icon": "icon-user", 
  "idx": 1, 
- "modified": "2014-05-26 03:05:54.108284", 
+ "modified": "2014-05-27 03:49:20.060872", 
  "modified_by": "Administrator", 
  "module": "Buying", 
  "name": "Supplier", 
@@ -194,7 +194,6 @@
  "permissions": [
   {
    "amend": 0, 
-   "cancel": 0, 
    "create": 0, 
    "delete": 0, 
    "email": 1, 
@@ -208,7 +207,6 @@
   }, 
   {
    "amend": 0, 
-   "cancel": 0, 
    "create": 1, 
    "delete": 1, 
    "email": 1, 
@@ -221,11 +219,13 @@
    "write": 1
   }, 
   {
+   "apply_user_permissions": 1, 
    "permlevel": 0, 
    "read": 1, 
    "role": "Material User"
   }, 
   {
+   "apply_user_permissions": 1, 
    "permlevel": 0, 
    "read": 1, 
    "role": "Accounts User"
diff --git a/erpnext/buying/doctype/supplier_quotation/supplier_quotation.json b/erpnext/buying/doctype/supplier_quotation/supplier_quotation.json
index e41d59b..19b0283 100644
--- a/erpnext/buying/doctype/supplier_quotation/supplier_quotation.json
+++ b/erpnext/buying/doctype/supplier_quotation/supplier_quotation.json
@@ -562,7 +562,7 @@
  "icon": "icon-shopping-cart", 
  "idx": 1, 
  "is_submittable": 1, 
- "modified": "2014-05-26 03:05:54.245409", 
+ "modified": "2014-05-27 03:49:20.226683", 
  "modified_by": "Administrator", 
  "module": "Buying", 
  "name": "Supplier Quotation", 
@@ -598,6 +598,7 @@
   }, 
   {
    "amend": 1, 
+   "apply_user_permissions": 1, 
    "cancel": 0, 
    "create": 1, 
    "delete": 0, 
@@ -612,6 +613,7 @@
   }, 
   {
    "amend": 0, 
+   "apply_user_permissions": 1, 
    "cancel": 0, 
    "create": 0, 
    "delete": 0, 
@@ -626,6 +628,7 @@
   }, 
   {
    "amend": 0, 
+   "apply_user_permissions": 1, 
    "cancel": 0, 
    "create": 0, 
    "delete": 0, 
diff --git a/erpnext/contacts/doctype/party_type/party_type.json b/erpnext/contacts/doctype/party_type/party_type.json
index e5e99d6..0f9e760 100644
--- a/erpnext/contacts/doctype/party_type/party_type.json
+++ b/erpnext/contacts/doctype/party_type/party_type.json
@@ -64,13 +64,14 @@
    "read_only": 1
   }
  ], 
- "modified": "2014-05-26 03:05:50.667527", 
+ "modified": "2014-05-27 03:49:14.598212", 
  "modified_by": "Administrator", 
  "module": "Contacts", 
  "name": "Party Type", 
  "owner": "Administrator", 
  "permissions": [
   {
+   "apply_user_permissions": 1, 
    "create": 1, 
    "permlevel": 0, 
    "read": 1, 
@@ -78,6 +79,7 @@
    "write": 1
   }, 
   {
+   "apply_user_permissions": 1, 
    "create": 1, 
    "permlevel": 0, 
    "read": 1, 
diff --git a/erpnext/home/doctype/feed/feed.json b/erpnext/home/doctype/feed/feed.json
index 1513661..a401870 100644
--- a/erpnext/home/doctype/feed/feed.json
+++ b/erpnext/home/doctype/feed/feed.json
@@ -48,7 +48,7 @@
  ], 
  "icon": "icon-rss", 
  "idx": 1, 
- "modified": "2014-05-02 08:27:23.936733", 
+ "modified": "2014-05-27 03:49:10.882587", 
  "modified_by": "Administrator", 
  "module": "Home", 
  "name": "Feed", 
@@ -63,6 +63,7 @@
    "role": "System Manager"
   }, 
   {
+   "apply_user_permissions": 1, 
    "permlevel": 0, 
    "read": 1, 
    "role": "All"
diff --git a/erpnext/hooks.py b/erpnext/hooks.py
index 58341ca..5bf383b 100644
--- a/erpnext/hooks.py
+++ b/erpnext/hooks.py
@@ -48,7 +48,7 @@
 		"on_cancel": "erpnext.stock.doctype.material_request.material_request.update_completed_qty"
 	},
 	"User": {
-		"on_update": "erpnext.hr.doctype.employee.employee.update_user_default"
+		"on_update": "erpnext.hr.doctype.employee.employee.update_user_permissions"
 	}
 }
 
diff --git a/erpnext/hr/doctype/appraisal/appraisal.json b/erpnext/hr/doctype/appraisal/appraisal.json
index 4893b35..2fec94f 100644
--- a/erpnext/hr/doctype/appraisal/appraisal.json
+++ b/erpnext/hr/doctype/appraisal/appraisal.json
@@ -196,7 +196,7 @@
  "icon": "icon-thumbs-up", 
  "idx": 1, 
  "is_submittable": 1, 
- "modified": "2014-05-26 03:05:46.761819", 
+ "modified": "2014-05-27 03:49:07.393120", 
  "modified_by": "Administrator", 
  "module": "HR", 
  "name": "Appraisal", 
@@ -232,6 +232,7 @@
   }, 
   {
    "amend": 1, 
+   "apply_user_permissions": 1, 
    "cancel": 1, 
    "create": 1, 
    "delete": 1, 
diff --git a/erpnext/hr/doctype/appraisal_template/appraisal_template.json b/erpnext/hr/doctype/appraisal_template/appraisal_template.json
index 1ef6307..68661e3 100644
--- a/erpnext/hr/doctype/appraisal_template/appraisal_template.json
+++ b/erpnext/hr/doctype/appraisal_template/appraisal_template.json
@@ -1,7 +1,7 @@
 {
  "allow_import": 1, 
  "autoname": "field:kra_title", 
- "creation": "2012-07-03 13:30:39.000000", 
+ "creation": "2012-07-03 13:30:39", 
  "docstatus": 0, 
  "doctype": "DocType", 
  "document_type": "Master", 
@@ -9,6 +9,7 @@
   {
    "fieldname": "kra_title", 
    "fieldtype": "Data", 
+   "in_list_view": 1, 
    "label": "Appraisal Template Title", 
    "oldfieldname": "kra_title", 
    "oldfieldtype": "Data", 
@@ -18,6 +19,7 @@
   {
    "fieldname": "description", 
    "fieldtype": "Small Text", 
+   "in_list_view": 1, 
    "label": "Description", 
    "oldfieldname": "description", 
    "oldfieldtype": "Small Text", 
@@ -37,19 +39,21 @@
   {
    "fieldname": "total_points", 
    "fieldtype": "Int", 
+   "in_list_view": 1, 
    "label": "Total Points", 
    "permlevel": 0
   }
  ], 
  "icon": "icon-file-text", 
  "idx": 1, 
- "modified": "2013-12-20 19:23:55.000000", 
+ "modified": "2014-05-27 03:49:07.533203", 
  "modified_by": "Administrator", 
  "module": "HR", 
  "name": "Appraisal Template", 
  "owner": "ashwini@webnotestech.com", 
  "permissions": [
   {
+   "apply_user_permissions": 1, 
    "create": 1, 
    "email": 1, 
    "permlevel": 0, 
diff --git a/erpnext/hr/doctype/attendance/attendance.json b/erpnext/hr/doctype/attendance/attendance.json
index 2c77810..2ca5b33 100644
--- a/erpnext/hr/doctype/attendance/attendance.json
+++ b/erpnext/hr/doctype/attendance/attendance.json
@@ -129,7 +129,7 @@
  "icon": "icon-ok", 
  "idx": 1, 
  "is_submittable": 1, 
- "modified": "2014-05-26 03:05:46.906637", 
+ "modified": "2014-05-27 03:49:07.580876", 
  "modified_by": "Administrator", 
  "module": "HR", 
  "name": "Attendance", 
@@ -149,6 +149,7 @@
    "write": 1
   }, 
   {
+   "apply_user_permissions": 1, 
    "cancel": 1, 
    "create": 1, 
    "delete": 1, 
diff --git a/erpnext/hr/doctype/branch/branch.json b/erpnext/hr/doctype/branch/branch.json
index eeca12d..03a726a 100644
--- a/erpnext/hr/doctype/branch/branch.json
+++ b/erpnext/hr/doctype/branch/branch.json
@@ -20,14 +20,14 @@
  ], 
  "icon": "icon-code-fork", 
  "idx": 1, 
- "modified": "2014-05-07 06:39:31.752490", 
+ "modified": "2014-05-27 03:49:08.179137", 
  "modified_by": "Administrator", 
  "module": "HR", 
  "name": "Branch", 
  "owner": "Administrator", 
  "permissions": [
   {
-   "cancel": 0, 
+   "apply_user_permissions": 1, 
    "create": 1, 
    "delete": 1, 
    "email": 1, 
@@ -40,7 +40,6 @@
    "write": 1
   }, 
   {
-   "cancel": 0, 
    "create": 1, 
    "delete": 1, 
    "email": 1, 
diff --git a/erpnext/hr/doctype/deduction_type/deduction_type.json b/erpnext/hr/doctype/deduction_type/deduction_type.json
index 0556a0b..4d9b0aa 100644
--- a/erpnext/hr/doctype/deduction_type/deduction_type.json
+++ b/erpnext/hr/doctype/deduction_type/deduction_type.json
@@ -30,14 +30,14 @@
  ], 
  "icon": "icon-flag", 
  "idx": 1, 
- "modified": "2014-05-07 06:39:38.154345", 
+ "modified": "2014-05-27 03:49:09.624972", 
  "modified_by": "Administrator", 
  "module": "HR", 
  "name": "Deduction Type", 
  "owner": "Administrator", 
  "permissions": [
   {
-   "cancel": 0, 
+   "apply_user_permissions": 1, 
    "create": 1, 
    "delete": 1, 
    "email": 1, 
diff --git a/erpnext/hr/doctype/department/department.json b/erpnext/hr/doctype/department/department.json
index 992a76f..17b1f6e 100644
--- a/erpnext/hr/doctype/department/department.json
+++ b/erpnext/hr/doctype/department/department.json
@@ -29,14 +29,14 @@
  ], 
  "icon": "icon-sitemap", 
  "idx": 1, 
- "modified": "2014-05-07 06:39:39.931091", 
+ "modified": "2014-05-27 03:49:10.061057", 
  "modified_by": "Administrator", 
  "module": "HR", 
  "name": "Department", 
  "owner": "Administrator", 
  "permissions": [
   {
-   "cancel": 0, 
+   "apply_user_permissions": 1, 
    "create": 1, 
    "delete": 1, 
    "email": 1, 
diff --git a/erpnext/hr/doctype/designation/designation.json b/erpnext/hr/doctype/designation/designation.json
index 5af04d9..b792548 100644
--- a/erpnext/hr/doctype/designation/designation.json
+++ b/erpnext/hr/doctype/designation/designation.json
@@ -20,14 +20,14 @@
  ], 
  "icon": "icon-bookmark", 
  "idx": 1, 
- "modified": "2014-05-07 06:39:38.265440", 
+ "modified": "2014-05-27 03:49:10.099099", 
  "modified_by": "Administrator", 
  "module": "HR", 
  "name": "Designation", 
  "owner": "Administrator", 
  "permissions": [
   {
-   "cancel": 0, 
+   "apply_user_permissions": 1, 
    "create": 1, 
    "delete": 1, 
    "email": 1, 
diff --git a/erpnext/hr/doctype/earning_type/earning_type.json b/erpnext/hr/doctype/earning_type/earning_type.json
index bb05a8e..85c6323 100644
--- a/erpnext/hr/doctype/earning_type/earning_type.json
+++ b/erpnext/hr/doctype/earning_type/earning_type.json
@@ -53,14 +53,14 @@
  ], 
  "icon": "icon-flag", 
  "idx": 1, 
- "modified": "2014-05-07 06:39:38.414922", 
+ "modified": "2014-05-27 03:49:10.133416", 
  "modified_by": "Administrator", 
  "module": "HR", 
  "name": "Earning Type", 
  "owner": "Administrator", 
  "permissions": [
   {
-   "cancel": 0, 
+   "apply_user_permissions": 1, 
    "create": 1, 
    "delete": 1, 
    "email": 1, 
diff --git a/erpnext/hr/doctype/employee/employee.json b/erpnext/hr/doctype/employee/employee.json
index d7cf5ae..79cf0ac 100644
--- a/erpnext/hr/doctype/employee/employee.json
+++ b/erpnext/hr/doctype/employee/employee.json
@@ -1,736 +1,734 @@
 {
- "allow_attach": 1,
- "allow_import": 1,
- "allow_rename": 1,
- "autoname": "naming_series:",
- "creation": "2013-03-07 09:04:18",
- "docstatus": 0,
- "doctype": "DocType",
- "document_type": "Master",
+ "allow_attach": 1, 
+ "allow_import": 1, 
+ "allow_rename": 1, 
+ "autoname": "naming_series:", 
+ "creation": "2013-03-07 09:04:18", 
+ "docstatus": 0, 
+ "doctype": "DocType", 
+ "document_type": "Master", 
  "fields": [
   {
-   "fieldname": "basic_information",
-   "fieldtype": "Section Break",
-   "label": "Basic Information",
-   "oldfieldtype": "Section Break",
+   "fieldname": "basic_information", 
+   "fieldtype": "Section Break", 
+   "label": "Basic Information", 
+   "oldfieldtype": "Section Break", 
    "permlevel": 0
-  },
+  }, 
   {
-   "fieldname": "column_break0",
-   "fieldtype": "Column Break",
-   "permlevel": 0,
+   "fieldname": "column_break0", 
+   "fieldtype": "Column Break", 
+   "permlevel": 0, 
    "width": "50%"
-  },
+  }, 
   {
-   "fieldname": "image_view",
-   "fieldtype": "Image",
-   "in_list_view": 0,
-   "label": "Image View",
-   "options": "image",
+   "fieldname": "image_view", 
+   "fieldtype": "Image", 
+   "in_list_view": 0, 
+   "label": "Image View", 
+   "options": "image", 
    "permlevel": 0
-  },
+  }, 
   {
-   "fieldname": "employee",
-   "fieldtype": "Data",
-   "hidden": 1,
-   "label": "Employee",
-   "no_copy": 1,
-   "permlevel": 0,
-   "print_hide": 1,
+   "fieldname": "employee", 
+   "fieldtype": "Data", 
+   "hidden": 1, 
+   "label": "Employee", 
+   "no_copy": 1, 
+   "permlevel": 0, 
+   "print_hide": 1, 
    "report_hide": 1
-  },
+  }, 
   {
-   "fieldname": "naming_series",
-   "fieldtype": "Select",
-   "label": "Series",
-   "no_copy": 1,
-   "oldfieldname": "naming_series",
-   "oldfieldtype": "Select",
-   "options": "EMP/",
-   "permlevel": 0,
+   "fieldname": "naming_series", 
+   "fieldtype": "Select", 
+   "label": "Series", 
+   "no_copy": 1, 
+   "oldfieldname": "naming_series", 
+   "oldfieldtype": "Select", 
+   "options": "EMP/", 
+   "permlevel": 0, 
    "reqd": 0
-  },
+  }, 
   {
-   "fieldname": "salutation",
-   "fieldtype": "Select",
-   "label": "Salutation",
-   "oldfieldname": "salutation",
-   "oldfieldtype": "Select",
-   "options": "\nMr\nMs",
-   "permlevel": 0,
+   "fieldname": "salutation", 
+   "fieldtype": "Select", 
+   "label": "Salutation", 
+   "oldfieldname": "salutation", 
+   "oldfieldtype": "Select", 
+   "options": "\nMr\nMs", 
+   "permlevel": 0, 
    "search_index": 0
-  },
+  }, 
   {
-   "fieldname": "employee_name",
-   "fieldtype": "Data",
-   "in_list_view": 1,
-   "label": "Full Name",
-   "oldfieldname": "employee_name",
-   "oldfieldtype": "Data",
-   "permlevel": 0,
+   "fieldname": "employee_name", 
+   "fieldtype": "Data", 
+   "in_list_view": 1, 
+   "label": "Full Name", 
+   "oldfieldname": "employee_name", 
+   "oldfieldtype": "Data", 
+   "permlevel": 0, 
    "reqd": 1
-  },
+  }, 
   {
-   "fieldname": "image",
-   "fieldtype": "Select",
-   "label": "Image",
-   "options": "attach_files:",
+   "fieldname": "image", 
+   "fieldtype": "Select", 
+   "label": "Image", 
+   "options": "attach_files:", 
    "permlevel": 0
-  },
+  }, 
   {
-   "fieldname": "column_break1",
-   "fieldtype": "Column Break",
-   "permlevel": 0,
+   "fieldname": "column_break1", 
+   "fieldtype": "Column Break", 
+   "permlevel": 0, 
    "width": "50%"
-  },
+  }, 
   {
-   "description": "System User (login) ID. If set, it will become default for all HR forms.",
-   "fieldname": "user_id",
-   "fieldtype": "Link",
-   "label": "User ID",
-   "options": "User",
+   "description": "System User (login) ID. If set, it will become default for all HR forms.", 
+   "fieldname": "user_id", 
+   "fieldtype": "Link", 
+   "label": "User ID", 
+   "options": "User", 
    "permlevel": 0
-  },
+  }, 
   {
-   "fieldname": "employee_number",
-   "fieldtype": "Data",
-   "in_filter": 1,
-   "label": "Employee Number",
-   "oldfieldname": "employee_number",
-   "oldfieldtype": "Data",
-   "permlevel": 0,
+   "fieldname": "employee_number", 
+   "fieldtype": "Data", 
+   "in_filter": 1, 
+   "label": "Employee Number", 
+   "oldfieldname": "employee_number", 
+   "oldfieldtype": "Data", 
+   "permlevel": 0, 
    "search_index": 0
-  },
+  }, 
   {
-   "fieldname": "date_of_joining",
-   "fieldtype": "Date",
-   "label": "Date of Joining",
-   "oldfieldname": "date_of_joining",
-   "oldfieldtype": "Date",
-   "permlevel": 0,
+   "fieldname": "date_of_joining", 
+   "fieldtype": "Date", 
+   "label": "Date of Joining", 
+   "oldfieldname": "date_of_joining", 
+   "oldfieldtype": "Date", 
+   "permlevel": 0, 
    "reqd": 1
-  },
+  }, 
   {
-   "description": "You can enter any date manually",
-   "fieldname": "date_of_birth",
-   "fieldtype": "Date",
-   "in_filter": 1,
-   "label": "Date of Birth",
-   "oldfieldname": "date_of_birth",
-   "oldfieldtype": "Date",
-   "permlevel": 0,
-   "reqd": 1,
+   "description": "You can enter any date manually", 
+   "fieldname": "date_of_birth", 
+   "fieldtype": "Date", 
+   "in_filter": 1, 
+   "label": "Date of Birth", 
+   "oldfieldname": "date_of_birth", 
+   "oldfieldtype": "Date", 
+   "permlevel": 0, 
+   "reqd": 1, 
    "search_index": 0
-  },
+  }, 
   {
-   "fieldname": "gender",
-   "fieldtype": "Select",
-   "in_filter": 1,
-   "label": "Gender",
-   "oldfieldname": "gender",
-   "oldfieldtype": "Select",
-   "options": "\nMale\nFemale",
-   "permlevel": 0,
-   "reqd": 1,
+   "fieldname": "gender", 
+   "fieldtype": "Select", 
+   "in_filter": 1, 
+   "label": "Gender", 
+   "oldfieldname": "gender", 
+   "oldfieldtype": "Select", 
+   "options": "\nMale\nFemale", 
+   "permlevel": 0, 
+   "reqd": 1, 
    "search_index": 0
-  },
+  }, 
   {
-   "fieldname": "company",
-   "fieldtype": "Link",
-   "in_filter": 1,
-   "label": "Company",
-   "options": "Company",
-   "permlevel": 0,
-   "print_hide": 1,
+   "fieldname": "company", 
+   "fieldtype": "Link", 
+   "in_filter": 1, 
+   "label": "Company", 
+   "options": "Company", 
+   "permlevel": 0, 
+   "print_hide": 1, 
    "reqd": 1
-  },
+  }, 
   {
-   "fieldname": "employment_details",
-   "fieldtype": "Section Break",
-   "label": "Employment Details",
+   "fieldname": "employment_details", 
+   "fieldtype": "Section Break", 
+   "label": "Employment Details", 
    "permlevel": 0
-  },
+  }, 
   {
-   "fieldname": "col_break_21",
-   "fieldtype": "Column Break",
+   "fieldname": "col_break_21", 
+   "fieldtype": "Column Break", 
    "permlevel": 0
-  },
+  }, 
   {
-   "default": "Active",
-   "fieldname": "status",
-   "fieldtype": "Select",
-   "in_filter": 1,
-   "in_list_view": 1,
-   "label": "Status",
-   "oldfieldname": "status",
-   "oldfieldtype": "Select",
-   "options": "\nActive\nLeft",
-   "permlevel": 0,
-   "reqd": 1,
+   "default": "Active", 
+   "fieldname": "status", 
+   "fieldtype": "Select", 
+   "in_filter": 1, 
+   "in_list_view": 1, 
+   "label": "Status", 
+   "oldfieldname": "status", 
+   "oldfieldtype": "Select", 
+   "options": "\nActive\nLeft", 
+   "permlevel": 0, 
+   "reqd": 1, 
    "search_index": 1
-  },
+  }, 
   {
-   "fieldname": "employment_type",
-   "fieldtype": "Link",
-   "in_filter": 1,
-   "in_list_view": 1,
-   "label": "Employment Type",
-   "oldfieldname": "employment_type",
-   "oldfieldtype": "Link",
-   "options": "Employment Type",
-   "permlevel": 0,
+   "fieldname": "employment_type", 
+   "fieldtype": "Link", 
+   "in_filter": 1, 
+   "in_list_view": 1, 
+   "label": "Employment Type", 
+   "oldfieldname": "employment_type", 
+   "oldfieldtype": "Link", 
+   "options": "Employment Type", 
+   "permlevel": 0, 
    "search_index": 0
-  },
+  }, 
   {
-   "description": "Applicable Holiday List",
-   "fieldname": "holiday_list",
-   "fieldtype": "Link",
-   "label": "Holiday List",
-   "oldfieldname": "holiday_list",
-   "oldfieldtype": "Link",
-   "options": "Holiday List",
+   "description": "Applicable Holiday List", 
+   "fieldname": "holiday_list", 
+   "fieldtype": "Link", 
+   "label": "Holiday List", 
+   "oldfieldname": "holiday_list", 
+   "oldfieldtype": "Link", 
+   "options": "Holiday List", 
    "permlevel": 0
-  },
+  }, 
   {
-   "fieldname": "col_break_22",
-   "fieldtype": "Column Break",
+   "fieldname": "col_break_22", 
+   "fieldtype": "Column Break", 
    "permlevel": 0
-  },
+  }, 
   {
-   "fieldname": "scheduled_confirmation_date",
-   "fieldtype": "Date",
-   "in_filter": 1,
-   "label": "Offer Date",
-   "oldfieldname": "scheduled_confirmation_date",
-   "oldfieldtype": "Date",
-   "permlevel": 0,
+   "fieldname": "scheduled_confirmation_date", 
+   "fieldtype": "Date", 
+   "in_filter": 1, 
+   "label": "Offer Date", 
+   "oldfieldname": "scheduled_confirmation_date", 
+   "oldfieldtype": "Date", 
+   "permlevel": 0, 
    "search_index": 0
-  },
+  }, 
   {
-   "fieldname": "final_confirmation_date",
-   "fieldtype": "Date",
-   "label": "Confirmation Date",
-   "oldfieldname": "final_confirmation_date",
-   "oldfieldtype": "Date",
-   "permlevel": 0,
+   "fieldname": "final_confirmation_date", 
+   "fieldtype": "Date", 
+   "label": "Confirmation Date", 
+   "oldfieldname": "final_confirmation_date", 
+   "oldfieldtype": "Date", 
+   "permlevel": 0, 
    "search_index": 0
-  },
+  }, 
   {
-   "fieldname": "contract_end_date",
-   "fieldtype": "Date",
-   "in_filter": 1,
-   "label": "Contract End Date",
-   "oldfieldname": "contract_end_date",
-   "oldfieldtype": "Date",
-   "permlevel": 0,
+   "fieldname": "contract_end_date", 
+   "fieldtype": "Date", 
+   "in_filter": 1, 
+   "label": "Contract End Date", 
+   "oldfieldname": "contract_end_date", 
+   "oldfieldtype": "Date", 
+   "permlevel": 0, 
    "search_index": 0
-  },
+  }, 
   {
-   "fieldname": "date_of_retirement",
-   "fieldtype": "Date",
-   "label": "Date Of Retirement",
-   "oldfieldname": "date_of_retirement",
-   "oldfieldtype": "Date",
+   "fieldname": "date_of_retirement", 
+   "fieldtype": "Date", 
+   "label": "Date Of Retirement", 
+   "oldfieldname": "date_of_retirement", 
+   "oldfieldtype": "Date", 
    "permlevel": 0
-  },
+  }, 
   {
-   "fieldname": "job_profile",
-   "fieldtype": "Section Break",
-   "label": "Job Profile",
+   "fieldname": "job_profile", 
+   "fieldtype": "Section Break", 
+   "label": "Job Profile", 
    "permlevel": 0
-  },
+  }, 
   {
-   "fieldname": "column_break2",
-   "fieldtype": "Column Break",
-   "permlevel": 0,
+   "fieldname": "column_break2", 
+   "fieldtype": "Column Break", 
+   "permlevel": 0, 
    "width": "50%"
-  },
+  }, 
   {
-   "fieldname": "branch",
-   "fieldtype": "Link",
-   "in_filter": 1,
-   "label": "Branch",
-   "oldfieldname": "branch",
-   "oldfieldtype": "Link",
-   "options": "Branch",
-   "permlevel": 0,
+   "fieldname": "branch", 
+   "fieldtype": "Link", 
+   "in_filter": 1, 
+   "label": "Branch", 
+   "oldfieldname": "branch", 
+   "oldfieldtype": "Link", 
+   "options": "Branch", 
+   "permlevel": 0, 
    "reqd": 0
-  },
+  }, 
   {
-   "fieldname": "department",
-   "fieldtype": "Link",
-   "in_filter": 1,
-   "label": "Department",
-   "oldfieldname": "department",
-   "oldfieldtype": "Link",
-   "options": "Department",
-   "permlevel": 0,
+   "fieldname": "department", 
+   "fieldtype": "Link", 
+   "in_filter": 1, 
+   "label": "Department", 
+   "oldfieldname": "department", 
+   "oldfieldtype": "Link", 
+   "options": "Department", 
+   "permlevel": 0, 
    "reqd": 0
-  },
+  }, 
   {
-   "fieldname": "designation",
-   "fieldtype": "Link",
-   "in_filter": 1,
-   "label": "Designation",
-   "oldfieldname": "designation",
-   "oldfieldtype": "Link",
-   "options": "Designation",
-   "permlevel": 0,
-   "reqd": 0,
+   "fieldname": "designation", 
+   "fieldtype": "Link", 
+   "in_filter": 1, 
+   "label": "Designation", 
+   "oldfieldname": "designation", 
+   "oldfieldtype": "Link", 
+   "options": "Designation", 
+   "permlevel": 0, 
+   "reqd": 0, 
    "search_index": 1
-  },
+  }, 
   {
-   "description": "Provide email id registered in company",
-   "fieldname": "company_email",
-   "fieldtype": "Data",
-   "in_filter": 1,
-   "label": "Company Email",
-   "oldfieldname": "company_email",
-   "oldfieldtype": "Data",
-   "permlevel": 0,
+   "description": "Provide email id registered in company", 
+   "fieldname": "company_email", 
+   "fieldtype": "Data", 
+   "in_filter": 1, 
+   "label": "Company Email", 
+   "oldfieldname": "company_email", 
+   "oldfieldtype": "Data", 
+   "permlevel": 0, 
    "reqd": 0
-  },
+  }, 
   {
-   "fieldname": "notice_number_of_days",
-   "fieldtype": "Int",
-   "label": "Notice (days)",
-   "oldfieldname": "notice_number_of_days",
-   "oldfieldtype": "Int",
+   "fieldname": "notice_number_of_days", 
+   "fieldtype": "Int", 
+   "label": "Notice (days)", 
+   "oldfieldname": "notice_number_of_days", 
+   "oldfieldtype": "Int", 
    "permlevel": 0
-  },
+  }, 
   {
-   "fieldname": "salary_information",
-   "fieldtype": "Column Break",
-   "label": "Salary Information",
-   "oldfieldtype": "Section Break",
-   "permlevel": 0,
+   "fieldname": "salary_information", 
+   "fieldtype": "Column Break", 
+   "label": "Salary Information", 
+   "oldfieldtype": "Section Break", 
+   "permlevel": 0, 
    "width": "50%"
-  },
+  }, 
   {
-   "fieldname": "salary_mode",
-   "fieldtype": "Select",
-   "label": "Salary Mode",
-   "oldfieldname": "salary_mode",
-   "oldfieldtype": "Select",
-   "options": "\nBank\nCash\nCheque",
+   "fieldname": "salary_mode", 
+   "fieldtype": "Select", 
+   "label": "Salary Mode", 
+   "oldfieldname": "salary_mode", 
+   "oldfieldtype": "Select", 
+   "options": "\nBank\nCash\nCheque", 
    "permlevel": 0
-  },
+  }, 
   {
-   "depends_on": "eval:doc.salary_mode == 'Bank'",
-   "fieldname": "bank_name",
-   "fieldtype": "Data",
-   "hidden": 0,
-   "in_filter": 1,
-   "label": "Bank Name",
-   "oldfieldname": "bank_name",
-   "oldfieldtype": "Link",
-   "options": "Suggest",
+   "depends_on": "eval:doc.salary_mode == 'Bank'", 
+   "fieldname": "bank_name", 
+   "fieldtype": "Data", 
+   "hidden": 0, 
+   "in_filter": 1, 
+   "label": "Bank Name", 
+   "oldfieldname": "bank_name", 
+   "oldfieldtype": "Link", 
+   "options": "Suggest", 
    "permlevel": 0
-  },
+  }, 
   {
-   "depends_on": "eval:doc.salary_mode == 'Bank'",
-   "fieldname": "bank_ac_no",
-   "fieldtype": "Data",
-   "hidden": 0,
-   "label": "Bank A/C No.",
-   "oldfieldname": "bank_ac_no",
-   "oldfieldtype": "Data",
+   "depends_on": "eval:doc.salary_mode == 'Bank'", 
+   "fieldname": "bank_ac_no", 
+   "fieldtype": "Data", 
+   "hidden": 0, 
+   "label": "Bank A/C No.", 
+   "oldfieldname": "bank_ac_no", 
+   "oldfieldtype": "Data", 
    "permlevel": 0
-  },
+  }, 
   {
-   "fieldname": "organization_profile",
-   "fieldtype": "Section Break",
-   "label": "Organization Profile",
+   "fieldname": "organization_profile", 
+   "fieldtype": "Section Break", 
+   "label": "Organization Profile", 
    "permlevel": 0
-  },
+  }, 
   {
-   "fieldname": "reports_to",
-   "fieldtype": "Link",
-   "ignore_user_permissions": 1,
-   "label": "Reports to",
-   "oldfieldname": "reports_to",
-   "oldfieldtype": "Link",
-   "options": "Employee",
+   "fieldname": "reports_to", 
+   "fieldtype": "Link", 
+   "ignore_user_permissions": 1, 
+   "label": "Reports to", 
+   "oldfieldname": "reports_to", 
+   "oldfieldtype": "Link", 
+   "options": "Employee", 
    "permlevel": 0
-  },
+  }, 
   {
-   "description": "The first Leave Approver in the list will be set as the default Leave Approver",
-   "fieldname": "employee_leave_approvers",
-   "fieldtype": "Table",
-   "label": "Leave Approvers",
-   "options": "Employee Leave Approver",
+   "description": "The first Leave Approver in the list will be set as the default Leave Approver", 
+   "fieldname": "employee_leave_approvers", 
+   "fieldtype": "Table", 
+   "label": "Leave Approvers", 
+   "options": "Employee Leave Approver", 
    "permlevel": 0
-  },
+  }, 
   {
-   "fieldname": "contact_details",
-   "fieldtype": "Section Break",
-   "label": "Contact Details",
+   "fieldname": "contact_details", 
+   "fieldtype": "Section Break", 
+   "label": "Contact Details", 
    "permlevel": 0
-  },
+  }, 
   {
-   "fieldname": "column_break3",
-   "fieldtype": "Column Break",
-   "permlevel": 0,
+   "fieldname": "column_break3", 
+   "fieldtype": "Column Break", 
+   "permlevel": 0, 
    "width": "50%"
-  },
+  }, 
   {
-   "fieldname": "cell_number",
-   "fieldtype": "Data",
-   "label": "Cell Number",
+   "fieldname": "cell_number", 
+   "fieldtype": "Data", 
+   "label": "Cell Number", 
    "permlevel": 0
-  },
+  }, 
   {
-   "fieldname": "personal_email",
-   "fieldtype": "Data",
-   "label": "Personal Email",
+   "fieldname": "personal_email", 
+   "fieldtype": "Data", 
+   "label": "Personal Email", 
    "permlevel": 0
-  },
+  }, 
   {
-   "fieldname": "unsubscribed",
-   "fieldtype": "Check",
-   "label": "Unsubscribed",
+   "fieldname": "unsubscribed", 
+   "fieldtype": "Check", 
+   "label": "Unsubscribed", 
    "permlevel": 0
-  },
+  }, 
   {
-   "fieldname": "emergency_contact_details",
-   "fieldtype": "HTML",
-   "label": "Emergency Contact Details",
-   "options": "<h4 class=\"text-muted\">Emergency Contact Details</h4>",
+   "fieldname": "emergency_contact_details", 
+   "fieldtype": "HTML", 
+   "label": "Emergency Contact Details", 
+   "options": "<h4 class=\"text-muted\">Emergency Contact Details</h4>", 
    "permlevel": 0
-  },
+  }, 
   {
-   "fieldname": "person_to_be_contacted",
-   "fieldtype": "Data",
-   "label": "Emergency Contact",
+   "fieldname": "person_to_be_contacted", 
+   "fieldtype": "Data", 
+   "label": "Emergency Contact", 
    "permlevel": 0
-  },
+  }, 
   {
-   "fieldname": "relation",
-   "fieldtype": "Data",
-   "label": "Relation",
+   "fieldname": "relation", 
+   "fieldtype": "Data", 
+   "label": "Relation", 
    "permlevel": 0
-  },
+  }, 
   {
-   "fieldname": "emergency_phone_number",
-   "fieldtype": "Data",
-   "label": "Emergency Phone",
+   "fieldname": "emergency_phone_number", 
+   "fieldtype": "Data", 
+   "label": "Emergency Phone", 
    "permlevel": 0
-  },
+  }, 
   {
-   "fieldname": "column_break4",
-   "fieldtype": "Column Break",
-   "permlevel": 0,
+   "fieldname": "column_break4", 
+   "fieldtype": "Column Break", 
+   "permlevel": 0, 
    "width": "50%"
-  },
+  }, 
   {
-   "fieldname": "permanent_accommodation_type",
-   "fieldtype": "Select",
-   "label": "Permanent Address Is",
-   "options": "\nRented\nOwned",
+   "fieldname": "permanent_accommodation_type", 
+   "fieldtype": "Select", 
+   "label": "Permanent Address Is", 
+   "options": "\nRented\nOwned", 
    "permlevel": 0
-  },
+  }, 
   {
-   "fieldname": "permanent_address",
-   "fieldtype": "Small Text",
-   "label": "Permanent Address",
+   "fieldname": "permanent_address", 
+   "fieldtype": "Small Text", 
+   "label": "Permanent Address", 
    "permlevel": 0
-  },
+  }, 
   {
-   "fieldname": "current_accommodation_type",
-   "fieldtype": "Select",
-   "label": "Current Address Is",
-   "options": "\nRented\nOwned",
+   "fieldname": "current_accommodation_type", 
+   "fieldtype": "Select", 
+   "label": "Current Address Is", 
+   "options": "\nRented\nOwned", 
    "permlevel": 0
-  },
+  }, 
   {
-   "fieldname": "current_address",
-   "fieldtype": "Small Text",
-   "label": "Current Address",
+   "fieldname": "current_address", 
+   "fieldtype": "Small Text", 
+   "label": "Current Address", 
    "permlevel": 0
-  },
+  }, 
   {
-   "fieldname": "sb53",
-   "fieldtype": "Section Break",
-   "label": "Bio",
+   "fieldname": "sb53", 
+   "fieldtype": "Section Break", 
+   "label": "Bio", 
    "permlevel": 0
-  },
+  }, 
   {
-   "description": "Short biography for website and other publications.",
-   "fieldname": "bio",
-   "fieldtype": "Text Editor",
-   "label": "Bio",
+   "description": "Short biography for website and other publications.", 
+   "fieldname": "bio", 
+   "fieldtype": "Text Editor", 
+   "label": "Bio", 
    "permlevel": 0
-  },
+  }, 
   {
-   "fieldname": "personal_details",
-   "fieldtype": "Section Break",
-   "label": "Personal Details",
+   "fieldname": "personal_details", 
+   "fieldtype": "Section Break", 
+   "label": "Personal Details", 
    "permlevel": 0
-  },
+  }, 
   {
-   "fieldname": "column_break5",
-   "fieldtype": "Column Break",
-   "permlevel": 0,
+   "fieldname": "column_break5", 
+   "fieldtype": "Column Break", 
+   "permlevel": 0, 
    "width": "50%"
-  },
+  }, 
   {
-   "fieldname": "passport_number",
-   "fieldtype": "Data",
-   "label": "Passport Number",
+   "fieldname": "passport_number", 
+   "fieldtype": "Data", 
+   "label": "Passport Number", 
    "permlevel": 0
-  },
+  }, 
   {
-   "fieldname": "date_of_issue",
-   "fieldtype": "Date",
-   "label": "Date of Issue",
+   "fieldname": "date_of_issue", 
+   "fieldtype": "Date", 
+   "label": "Date of Issue", 
    "permlevel": 0
-  },
+  }, 
   {
-   "fieldname": "valid_upto",
-   "fieldtype": "Date",
-   "label": "Valid Upto",
+   "fieldname": "valid_upto", 
+   "fieldtype": "Date", 
+   "label": "Valid Upto", 
    "permlevel": 0
-  },
+  }, 
   {
-   "fieldname": "place_of_issue",
-   "fieldtype": "Data",
-   "label": "Place of Issue",
+   "fieldname": "place_of_issue", 
+   "fieldtype": "Data", 
+   "label": "Place of Issue", 
    "permlevel": 0
-  },
+  }, 
   {
-   "fieldname": "column_break6",
-   "fieldtype": "Column Break",
-   "permlevel": 0,
+   "fieldname": "column_break6", 
+   "fieldtype": "Column Break", 
+   "permlevel": 0, 
    "width": "50%"
-  },
+  }, 
   {
-   "fieldname": "marital_status",
-   "fieldtype": "Select",
-   "label": "Marital Status",
-   "options": "\nSingle\nMarried\nDivorced\nWidowed",
+   "fieldname": "marital_status", 
+   "fieldtype": "Select", 
+   "label": "Marital Status", 
+   "options": "\nSingle\nMarried\nDivorced\nWidowed", 
    "permlevel": 0
-  },
+  }, 
   {
-   "fieldname": "blood_group",
-   "fieldtype": "Select",
-   "label": "Blood Group",
-   "options": "\nA+\nA-\nB+\nB-\nAB+\nAB-\nO+\nO-",
+   "fieldname": "blood_group", 
+   "fieldtype": "Select", 
+   "label": "Blood Group", 
+   "options": "\nA+\nA-\nB+\nB-\nAB+\nAB-\nO+\nO-", 
    "permlevel": 0
-  },
+  }, 
   {
-   "description": "Here you can maintain family details like name and occupation of parent, spouse and children",
-   "fieldname": "family_background",
-   "fieldtype": "Small Text",
-   "label": "Family Background",
+   "description": "Here you can maintain family details like name and occupation of parent, spouse and children", 
+   "fieldname": "family_background", 
+   "fieldtype": "Small Text", 
+   "label": "Family Background", 
    "permlevel": 0
-  },
+  }, 
   {
-   "description": "Here you can maintain height, weight, allergies, medical concerns etc",
-   "fieldname": "health_details",
-   "fieldtype": "Small Text",
-   "label": "Health Details",
+   "description": "Here you can maintain height, weight, allergies, medical concerns etc", 
+   "fieldname": "health_details", 
+   "fieldtype": "Small Text", 
+   "label": "Health Details", 
    "permlevel": 0
-  },
+  }, 
   {
-   "fieldname": "educational_qualification",
-   "fieldtype": "Section Break",
-   "label": "Educational Qualification",
+   "fieldname": "educational_qualification", 
+   "fieldtype": "Section Break", 
+   "label": "Educational Qualification", 
    "permlevel": 0
-  },
+  }, 
   {
-   "fieldname": "educational_qualification_details",
-   "fieldtype": "Table",
-   "label": "Educational Qualification Details",
-   "options": "Employee Education",
+   "fieldname": "educational_qualification_details", 
+   "fieldtype": "Table", 
+   "label": "Educational Qualification Details", 
+   "options": "Employee Education", 
    "permlevel": 0
-  },
+  }, 
   {
-   "fieldname": "previous_work_experience",
-   "fieldtype": "Section Break",
-   "label": "Previous Work Experience",
-   "options": "Simple",
+   "fieldname": "previous_work_experience", 
+   "fieldtype": "Section Break", 
+   "label": "Previous Work Experience", 
+   "options": "Simple", 
    "permlevel": 0
-  },
+  }, 
   {
-   "fieldname": "previous_experience_details",
-   "fieldtype": "Table",
-   "label": "Employee External Work History",
-   "options": "Employee External Work History",
+   "fieldname": "previous_experience_details", 
+   "fieldtype": "Table", 
+   "label": "Employee External Work History", 
+   "options": "Employee External Work History", 
    "permlevel": 0
-  },
+  }, 
   {
-   "fieldname": "history_in_company",
-   "fieldtype": "Section Break",
-   "label": "History In Company",
-   "options": "Simple",
+   "fieldname": "history_in_company", 
+   "fieldtype": "Section Break", 
+   "label": "History In Company", 
+   "options": "Simple", 
    "permlevel": 0
-  },
+  }, 
   {
-   "fieldname": "experience_in_company_details",
-   "fieldtype": "Table",
-   "label": "Employee Internal Work Historys",
-   "options": "Employee Internal Work History",
+   "fieldname": "experience_in_company_details", 
+   "fieldtype": "Table", 
+   "label": "Employee Internal Work Historys", 
+   "options": "Employee Internal Work History", 
    "permlevel": 0
-  },
+  }, 
   {
-   "fieldname": "exit",
-   "fieldtype": "Section Break",
-   "label": "Exit",
-   "oldfieldtype": "Section Break",
+   "fieldname": "exit", 
+   "fieldtype": "Section Break", 
+   "label": "Exit", 
+   "oldfieldtype": "Section Break", 
    "permlevel": 0
-  },
+  }, 
   {
-   "fieldname": "column_break7",
-   "fieldtype": "Column Break",
-   "permlevel": 0,
+   "fieldname": "column_break7", 
+   "fieldtype": "Column Break", 
+   "permlevel": 0, 
    "width": "50%"
-  },
+  }, 
   {
-   "fieldname": "resignation_letter_date",
-   "fieldtype": "Date",
-   "label": "Resignation Letter Date",
-   "oldfieldname": "resignation_letter_date",
-   "oldfieldtype": "Date",
+   "fieldname": "resignation_letter_date", 
+   "fieldtype": "Date", 
+   "label": "Resignation Letter Date", 
+   "oldfieldname": "resignation_letter_date", 
+   "oldfieldtype": "Date", 
    "permlevel": 0
-  },
+  }, 
   {
-   "fieldname": "relieving_date",
-   "fieldtype": "Date",
-   "in_filter": 1,
-   "label": "Relieving Date",
-   "oldfieldname": "relieving_date",
-   "oldfieldtype": "Date",
+   "fieldname": "relieving_date", 
+   "fieldtype": "Date", 
+   "in_filter": 1, 
+   "label": "Relieving Date", 
+   "oldfieldname": "relieving_date", 
+   "oldfieldtype": "Date", 
    "permlevel": 0
-  },
+  }, 
   {
-   "fieldname": "reason_for_leaving",
-   "fieldtype": "Data",
-   "label": "Reason for Leaving",
-   "oldfieldname": "reason_for_leaving",
-   "oldfieldtype": "Data",
+   "fieldname": "reason_for_leaving", 
+   "fieldtype": "Data", 
+   "label": "Reason for Leaving", 
+   "oldfieldname": "reason_for_leaving", 
+   "oldfieldtype": "Data", 
    "permlevel": 0
-  },
+  }, 
   {
-   "fieldname": "leave_encashed",
-   "fieldtype": "Select",
-   "label": "Leave Encashed?",
-   "oldfieldname": "leave_encashed",
-   "oldfieldtype": "Select",
-   "options": "\nYes\nNo",
+   "fieldname": "leave_encashed", 
+   "fieldtype": "Select", 
+   "label": "Leave Encashed?", 
+   "oldfieldname": "leave_encashed", 
+   "oldfieldtype": "Select", 
+   "options": "\nYes\nNo", 
    "permlevel": 0
-  },
+  }, 
   {
-   "fieldname": "encashment_date",
-   "fieldtype": "Date",
-   "label": "Encashment Date",
-   "oldfieldname": "encashment_date",
-   "oldfieldtype": "Date",
+   "fieldname": "encashment_date", 
+   "fieldtype": "Date", 
+   "label": "Encashment Date", 
+   "oldfieldname": "encashment_date", 
+   "oldfieldtype": "Date", 
    "permlevel": 0
-  },
+  }, 
   {
-   "fieldname": "exit_interview_details",
-   "fieldtype": "Column Break",
-   "label": "Exit Interview Details",
-   "oldfieldname": "col_brk6",
-   "oldfieldtype": "Column Break",
-   "permlevel": 0,
+   "fieldname": "exit_interview_details", 
+   "fieldtype": "Column Break", 
+   "label": "Exit Interview Details", 
+   "oldfieldname": "col_brk6", 
+   "oldfieldtype": "Column Break", 
+   "permlevel": 0, 
    "width": "50%"
-  },
+  }, 
   {
-   "fieldname": "held_on",
-   "fieldtype": "Date",
-   "label": "Held On",
-   "oldfieldname": "held_on",
-   "oldfieldtype": "Date",
+   "fieldname": "held_on", 
+   "fieldtype": "Date", 
+   "label": "Held On", 
+   "oldfieldname": "held_on", 
+   "oldfieldtype": "Date", 
    "permlevel": 0
-  },
+  }, 
   {
-   "fieldname": "reason_for_resignation",
-   "fieldtype": "Select",
-   "label": "Reason for Resignation",
-   "oldfieldname": "reason_for_resignation",
-   "oldfieldtype": "Select",
-   "options": "\nBetter Prospects\nHealth Concerns",
+   "fieldname": "reason_for_resignation", 
+   "fieldtype": "Select", 
+   "label": "Reason for Resignation", 
+   "oldfieldname": "reason_for_resignation", 
+   "oldfieldtype": "Select", 
+   "options": "\nBetter Prospects\nHealth Concerns", 
    "permlevel": 0
-  },
+  }, 
   {
-   "fieldname": "new_workplace",
-   "fieldtype": "Data",
-   "label": "New Workplace",
-   "oldfieldname": "new_workplace",
-   "oldfieldtype": "Data",
+   "fieldname": "new_workplace", 
+   "fieldtype": "Data", 
+   "label": "New Workplace", 
+   "oldfieldname": "new_workplace", 
+   "oldfieldtype": "Data", 
    "permlevel": 0
-  },
+  }, 
   {
-   "fieldname": "feedback",
-   "fieldtype": "Small Text",
-   "label": "Feedback",
-   "oldfieldname": "feedback",
-   "oldfieldtype": "Text",
+   "fieldname": "feedback", 
+   "fieldtype": "Small Text", 
+   "label": "Feedback", 
+   "oldfieldname": "feedback", 
+   "oldfieldtype": "Text", 
    "permlevel": 0
   }
- ],
- "icon": "icon-user",
- "idx": 1,
- "modified": "2014-05-26 03:05:48.422199",
- "modified_by": "Administrator",
- "module": "HR",
- "name": "Employee",
- "owner": "Administrator",
+ ], 
+ "icon": "icon-user", 
+ "idx": 1, 
+ "modified": "2014-05-27 03:49:10.297398", 
+ "modified_by": "Administrator", 
+ "module": "HR", 
+ "name": "Employee", 
+ "owner": "Administrator", 
  "permissions": [
   {
-   "amend": 0,
-   "apply_user_permissions": 1,
-   "cancel": 0,
-   "create": 0,
-   "delete": 0,
-   "email": 1,
-   "permlevel": 0,
-   "print": 1,
-   "read": 1,
-   "report": 1,
-   "role": "Employee",
-   "submit": 0,
+   "amend": 0, 
+   "apply_user_permissions": 1, 
+   "create": 0, 
+   "delete": 0, 
+   "email": 1, 
+   "permlevel": 0, 
+   "print": 1, 
+   "read": 1, 
+   "report": 1, 
+   "role": "Employee", 
+   "submit": 0, 
    "write": 0
-  },
+  }, 
   {
-   "amend": 0,
-   "cancel": 0,
-   "create": 1,
-   "delete": 1,
-   "email": 1,
-   "permlevel": 0,
-   "print": 1,
-   "read": 1,
-   "report": 1,
-   "role": "HR User",
-   "submit": 0,
+   "amend": 0, 
+   "apply_user_permissions": 1, 
+   "create": 1, 
+   "delete": 1, 
+   "email": 1, 
+   "permlevel": 0, 
+   "print": 1, 
+   "read": 1, 
+   "report": 1, 
+   "role": "HR User", 
+   "submit": 0, 
    "write": 1
-  },
+  }, 
   {
-   "amend": 0,
-   "cancel": 0,
-   "create": 1,
-   "delete": 1,
-   "email": 1,
-   "permlevel": 0,
-   "print": 1,
-   "read": 1,
-   "report": 1,
-   "set_user_permissions": 1,
-   "role": "HR Manager",
-   "submit": 0,
+   "amend": 0, 
+   "create": 1, 
+   "delete": 1, 
+   "email": 1, 
+   "permlevel": 0, 
+   "print": 1, 
+   "read": 1, 
+   "report": 1, 
+   "role": "HR Manager", 
+   "set_user_permissions": 1, 
+   "submit": 0, 
    "write": 1
-  },
+  }, 
   {
-   "apply_user_permissions": 1,
-   "permlevel": 0,
-   "read": 1,
+   "apply_user_permissions": 1, 
+   "permlevel": 0, 
+   "read": 1, 
    "role": "Leave Approver"
   }
- ],
- "search_fields": "employee_name",
- "sort_field": "modified",
- "sort_order": "DESC",
+ ], 
+ "search_fields": "employee_name", 
+ "sort_field": "modified", 
+ "sort_order": "DESC", 
  "title_field": "employee_name"
-}
+}
\ No newline at end of file
diff --git a/erpnext/hr/doctype/employee/employee.py b/erpnext/hr/doctype/employee/employee.py
index 1876916..0a4ae03 100644
--- a/erpnext/hr/doctype/employee/employee.py
+++ b/erpnext/hr/doctype/employee/employee.py
@@ -8,7 +8,6 @@
 from frappe.model.naming import make_autoname
 from frappe import throw, _
 import frappe.permissions
-from frappe.defaults import get_user_permissions
 from frappe.model.document import Document
 from frappe.model.mapper import get_mapped_doc
 
@@ -45,36 +44,24 @@
 
 	def on_update(self):
 		if self.user_id:
-			self.update_user_default()
 			self.update_user()
+			self.update_user_permissions()
 
 		self.update_dob_event()
-		self.restrict_leave_approver()
+		self.update_leave_approver_user_permissions()
 
-	def restrict_user(self):
-		"""restrict to this employee for user"""
-		self.add_restriction_if_required("Employee", self.user_id)
+	def update_user_permissions(self):
+		frappe.permissions.add_user_permission("Employee", self.name, self.user_id)
+		frappe.permissions.set_user_permission_if_allowed("Company", self.company, self.user_id)
 
-	def update_user_default(self):
-		self.restrict_user()
-		frappe.db.set_default("employee_name", self.employee_name, self.user_id)
-		frappe.db.set_default("company", self.company, self.user_id)
-
-	def restrict_leave_approver(self):
+	def update_leave_approver_user_permissions(self):
 		"""restrict to this employee for leave approver"""
 		employee_leave_approvers = [d.leave_approver for d in self.get("employee_leave_approvers")]
 		if self.reports_to and self.reports_to not in employee_leave_approvers:
 			employee_leave_approvers.append(frappe.db.get_value("Employee", self.reports_to, "user_id"))
 
 		for user in employee_leave_approvers:
-			self.add_restriction_if_required("Employee", user)
-			self.add_restriction_if_required("Leave Application", user)
-
-	def add_restriction_if_required(self, doctype, user):
-		if frappe.permissions.has_only_non_restrict_role(doctype, user) \
-			and self.name not in get_user_permissions(user).get("Employee", []):
-
-			frappe.defaults.add_default("Employee", self.name, user, "User Permission")
+			frappe.permissions.add_user_permission("Employee", self.name, user)
 
 	def update_user(self):
 		# add employee role if missing
@@ -85,7 +72,7 @@
 			user.add_roles("Employee")
 
 		# copy details like Fullname, DOB and Image to User
-		if self.employee_name:
+		if self.employee_name and not (user.first_name and user.last_name):
 			employee_name = self.employee_name.split(" ")
 			if len(employee_name) >= 3:
 				user.last_name = " ".join(employee_name[2:])
@@ -111,7 +98,7 @@
 						"attached_to_doctype": "User",
 						"attached_to_name": self.user_id
 					}).insert()
-				except frappe.DuplicateEntryError, e:
+				except frappe.DuplicateEntryError:
 					# already exists
 					pass
 
@@ -217,10 +204,13 @@
 	target.make_earn_ded_table()
 	return target
 
-def update_user_default(doc, method):
+def update_user_permissions(doc, method):
 	# called via User hook
-	try:
-		employee = frappe.get_doc("Employee", {"user_id": doc.name})
-		employee.update_user_default()
-	except frappe.DoesNotExistError:
-		pass
+
+	if "Employee" in [d.role for d in doc.get("user_roles")]:
+		try:
+			employee = frappe.get_doc("Employee", {"user_id": doc.name})
+			employee.update_user_permissions()
+		except frappe.DoesNotExistError:
+			frappe.msgprint("Please set User ID field in an Employee record to set Employee Role")
+			doc.get("user_roles").remove(doc.get("user_roles", {"role": "Employee"})[0])
diff --git a/erpnext/hr/doctype/employment_type/employment_type.json b/erpnext/hr/doctype/employment_type/employment_type.json
index fdb710b..bc337f1 100644
--- a/erpnext/hr/doctype/employment_type/employment_type.json
+++ b/erpnext/hr/doctype/employment_type/employment_type.json
@@ -19,14 +19,14 @@
  ], 
  "icon": "icon-flag", 
  "idx": 1, 
- "modified": "2014-05-07 06:39:38.630562", 
+ "modified": "2014-05-27 03:49:10.551828", 
  "modified_by": "Administrator", 
  "module": "HR", 
  "name": "Employment Type", 
  "owner": "Administrator", 
  "permissions": [
   {
-   "cancel": 0, 
+   "apply_user_permissions": 1, 
    "create": 1, 
    "delete": 1, 
    "email": 1, 
@@ -39,7 +39,6 @@
    "write": 1
   }, 
   {
-   "cancel": 0, 
    "create": 1, 
    "delete": 1, 
    "email": 1, 
diff --git a/erpnext/hr/doctype/expense_claim/expense_claim.json b/erpnext/hr/doctype/expense_claim/expense_claim.json
index 311903f..4ebc30f 100644
--- a/erpnext/hr/doctype/expense_claim/expense_claim.json
+++ b/erpnext/hr/doctype/expense_claim/expense_claim.json
@@ -187,7 +187,7 @@
  "icon": "icon-money", 
  "idx": 1, 
  "is_submittable": 1, 
- "modified": "2014-05-26 03:05:48.690180", 
+ "modified": "2014-05-27 03:49:10.736177", 
  "modified_by": "Administrator", 
  "module": "HR", 
  "name": "Expense Claim", 
@@ -207,6 +207,7 @@
   }, 
   {
    "amend": 1, 
+   "apply_user_permissions": 1, 
    "cancel": 1, 
    "create": 1, 
    "delete": 1, 
@@ -221,6 +222,7 @@
   }, 
   {
    "amend": 1, 
+   "apply_user_permissions": 1, 
    "cancel": 1, 
    "create": 1, 
    "delete": 1, 
diff --git a/erpnext/hr/doctype/job_applicant/job_applicant.json b/erpnext/hr/doctype/job_applicant/job_applicant.json
index ae9e9f6..21eb7f7 100644
--- a/erpnext/hr/doctype/job_applicant/job_applicant.json
+++ b/erpnext/hr/doctype/job_applicant/job_applicant.json
@@ -1,7 +1,7 @@
 {
  "allow_attach": 1, 
  "autoname": "field:applicant_name", 
- "creation": "2013-01-29 19:25:37.000000", 
+ "creation": "2013-01-29 19:25:37", 
  "description": "Applicant for a Job", 
  "docstatus": 0, 
  "doctype": "DocType", 
@@ -66,14 +66,14 @@
  ], 
  "icon": "icon-user", 
  "idx": 1, 
- "modified": "2014-01-20 17:48:50.000000", 
+ "modified": "2014-05-27 03:49:12.168814", 
  "modified_by": "Administrator", 
  "module": "HR", 
  "name": "Job Applicant", 
  "owner": "Administrator", 
  "permissions": [
   {
-   "cancel": 1, 
+   "apply_user_permissions": 1, 
    "create": 1, 
    "delete": 1, 
    "email": 1, 
diff --git a/erpnext/hr/doctype/job_opening/job_opening.json b/erpnext/hr/doctype/job_opening/job_opening.json
index a5bff4b..36e31f8 100644
--- a/erpnext/hr/doctype/job_opening/job_opening.json
+++ b/erpnext/hr/doctype/job_opening/job_opening.json
@@ -1,6 +1,6 @@
 {
  "autoname": "field:job_title", 
- "creation": "2013-01-15 16:13:36.000000", 
+ "creation": "2013-01-15 16:13:36", 
  "description": "Description of a Job Opening", 
  "docstatus": 0, 
  "doctype": "DocType", 
@@ -9,6 +9,7 @@
   {
    "fieldname": "job_title", 
    "fieldtype": "Data", 
+   "in_list_view": 1, 
    "label": "Job Title", 
    "permlevel": 0, 
    "reqd": 1
@@ -16,6 +17,7 @@
   {
    "fieldname": "status", 
    "fieldtype": "Select", 
+   "in_list_view": 1, 
    "label": "Status", 
    "options": "Open\nClosed", 
    "permlevel": 0
@@ -24,20 +26,21 @@
    "description": "Job profile, qualifications required etc.", 
    "fieldname": "description", 
    "fieldtype": "Text Editor", 
+   "in_list_view": 1, 
    "label": "Description", 
    "permlevel": 0
   }
  ], 
  "icon": "icon-bookmark", 
  "idx": 1, 
- "modified": "2014-01-20 17:48:51.000000", 
+ "modified": "2014-05-27 03:49:12.248194", 
  "modified_by": "Administrator", 
  "module": "HR", 
  "name": "Job Opening", 
  "owner": "Administrator", 
  "permissions": [
   {
-   "cancel": 1, 
+   "apply_user_permissions": 1, 
    "create": 1, 
    "delete": 1, 
    "email": 1, 
diff --git a/erpnext/hr/doctype/leave_allocation/leave_allocation.json b/erpnext/hr/doctype/leave_allocation/leave_allocation.json
index 99845bb..ca583a1 100644
--- a/erpnext/hr/doctype/leave_allocation/leave_allocation.json
+++ b/erpnext/hr/doctype/leave_allocation/leave_allocation.json
@@ -136,7 +136,7 @@
  "icon": "icon-ok", 
  "idx": 1, 
  "is_submittable": 1, 
- "modified": "2014-05-26 03:05:49.674303", 
+ "modified": "2014-05-27 03:49:12.744348", 
  "modified_by": "Administrator", 
  "module": "HR", 
  "name": "Leave Allocation", 
diff --git a/erpnext/hr/doctype/leave_application/leave_application.json b/erpnext/hr/doctype/leave_application/leave_application.json
index 8dd58bb..7a7e129 100644
--- a/erpnext/hr/doctype/leave_application/leave_application.json
+++ b/erpnext/hr/doctype/leave_application/leave_application.json
@@ -1,269 +1,272 @@
 {
- "allow_attach": 1,
- "autoname": "LAP/.#####",
- "creation": "2013-02-20 11:18:11",
- "description": "Apply / Approve Leaves",
- "docstatus": 0,
- "doctype": "DocType",
- "document_type": "Transaction",
+ "allow_attach": 1, 
+ "autoname": "LAP/.#####", 
+ "creation": "2013-02-20 11:18:11", 
+ "description": "Apply / Approve Leaves", 
+ "docstatus": 0, 
+ "doctype": "DocType", 
+ "document_type": "Transaction", 
  "fields": [
   {
-   "default": "Open",
-   "fieldname": "status",
-   "fieldtype": "Select",
-   "in_list_view": 1,
-   "label": "Status",
-   "no_copy": 1,
-   "options": "Open\nApproved\nRejected",
+   "default": "Open", 
+   "fieldname": "status", 
+   "fieldtype": "Select", 
+   "in_list_view": 1, 
+   "label": "Status", 
+   "no_copy": 1, 
+   "options": "Open\nApproved\nRejected", 
    "permlevel": 1
-  },
+  }, 
   {
-   "description": "Leave can be approved by users with Role, \"Leave Approver\"",
-   "fieldname": "leave_approver",
-   "fieldtype": "Select",
-   "label": "Leave Approver",
-   "options": "[Select]",
+   "description": "Leave can be approved by users with Role, \"Leave Approver\"", 
+   "fieldname": "leave_approver", 
+   "fieldtype": "Select", 
+   "label": "Leave Approver", 
+   "options": "[Select]", 
    "permlevel": 0
-  },
+  }, 
   {
-   "fieldname": "leave_type",
-   "fieldtype": "Link",
-   "in_filter": 1,
-   "in_list_view": 1,
-   "label": "Leave Type",
-   "options": "Leave Type",
-   "permlevel": 0,
-   "reqd": 1,
+   "fieldname": "leave_type", 
+   "fieldtype": "Link", 
+   "in_filter": 1, 
+   "in_list_view": 1, 
+   "label": "Leave Type", 
+   "options": "Leave Type", 
+   "permlevel": 0, 
+   "reqd": 1, 
    "search_index": 1
-  },
+  }, 
   {
-   "fieldname": "from_date",
-   "fieldtype": "Date",
-   "in_list_view": 1,
-   "label": "From Date",
-   "permlevel": 0,
-   "reqd": 1,
+   "fieldname": "from_date", 
+   "fieldtype": "Date", 
+   "in_list_view": 1, 
+   "label": "From Date", 
+   "permlevel": 0, 
+   "reqd": 1, 
    "search_index": 1
-  },
+  }, 
   {
-   "fieldname": "to_date",
-   "fieldtype": "Date",
-   "in_list_view": 0,
-   "label": "To Date",
-   "permlevel": 0,
-   "reqd": 1,
+   "fieldname": "to_date", 
+   "fieldtype": "Date", 
+   "in_list_view": 0, 
+   "label": "To Date", 
+   "permlevel": 0, 
+   "reqd": 1, 
    "search_index": 1
-  },
+  }, 
   {
-   "fieldname": "half_day",
-   "fieldtype": "Check",
-   "label": "Half Day",
+   "fieldname": "half_day", 
+   "fieldtype": "Check", 
+   "label": "Half Day", 
    "permlevel": 0
-  },
+  }, 
   {
-   "fieldname": "column_break1",
-   "fieldtype": "Column Break",
-   "permlevel": 0,
-   "print_width": "50%",
+   "fieldname": "column_break1", 
+   "fieldtype": "Column Break", 
+   "permlevel": 0, 
+   "print_width": "50%", 
    "width": "50%"
-  },
+  }, 
   {
-   "fieldname": "description",
-   "fieldtype": "Small Text",
-   "label": "Reason",
+   "fieldname": "description", 
+   "fieldtype": "Small Text", 
+   "label": "Reason", 
    "permlevel": 0
-  },
+  }, 
   {
-   "fieldname": "employee",
-   "fieldtype": "Link",
-   "in_filter": 1,
-   "label": "Employee",
-   "options": "Employee",
-   "permlevel": 0,
-   "reqd": 1,
+   "fieldname": "employee", 
+   "fieldtype": "Link", 
+   "in_filter": 1, 
+   "label": "Employee", 
+   "options": "Employee", 
+   "permlevel": 0, 
+   "reqd": 1, 
    "search_index": 1
-  },
+  }, 
   {
-   "fieldname": "employee_name",
-   "fieldtype": "Data",
-   "in_filter": 1,
-   "in_list_view": 1,
-   "label": "Employee Name",
-   "permlevel": 0,
-   "read_only": 1,
+   "fieldname": "employee_name", 
+   "fieldtype": "Data", 
+   "in_filter": 1, 
+   "in_list_view": 1, 
+   "label": "Employee Name", 
+   "permlevel": 0, 
+   "read_only": 1, 
    "search_index": 0
-  },
+  }, 
   {
-   "fieldname": "leave_balance",
-   "fieldtype": "Float",
-   "label": "Leave Balance Before Application",
-   "no_copy": 1,
-   "permlevel": 0,
+   "fieldname": "leave_balance", 
+   "fieldtype": "Float", 
+   "label": "Leave Balance Before Application", 
+   "no_copy": 1, 
+   "permlevel": 0, 
    "read_only": 1
-  },
+  }, 
   {
-   "fieldname": "total_leave_days",
-   "fieldtype": "Float",
-   "label": "Total Leave Days",
-   "no_copy": 1,
-   "permlevel": 0,
+   "fieldname": "total_leave_days", 
+   "fieldtype": "Float", 
+   "label": "Total Leave Days", 
+   "no_copy": 1, 
+   "permlevel": 0, 
    "read_only": 1
-  },
+  }, 
   {
-   "fieldname": "sb10",
-   "fieldtype": "Section Break",
-   "label": "More Info",
+   "fieldname": "sb10", 
+   "fieldtype": "Section Break", 
+   "label": "More Info", 
    "permlevel": 0
-  },
+  }, 
   {
-   "allow_on_submit": 1,
-   "default": "1",
-   "fieldname": "follow_via_email",
-   "fieldtype": "Check",
-   "label": "Follow via Email",
-   "permlevel": 0,
+   "allow_on_submit": 1, 
+   "default": "1", 
+   "fieldname": "follow_via_email", 
+   "fieldtype": "Check", 
+   "label": "Follow via Email", 
+   "permlevel": 0, 
    "print_hide": 1
-  },
+  }, 
   {
-   "default": "Today",
-   "fieldname": "posting_date",
-   "fieldtype": "Date",
-   "label": "Posting Date",
-   "no_copy": 1,
-   "permlevel": 0,
+   "default": "Today", 
+   "fieldname": "posting_date", 
+   "fieldtype": "Date", 
+   "label": "Posting Date", 
+   "no_copy": 1, 
+   "permlevel": 0, 
    "reqd": 1
-  },
+  }, 
   {
-   "fieldname": "fiscal_year",
-   "fieldtype": "Link",
-   "in_filter": 1,
-   "label": "Fiscal Year",
-   "options": "Fiscal Year",
-   "permlevel": 0,
-   "read_only": 0,
-   "reqd": 1,
+   "fieldname": "fiscal_year", 
+   "fieldtype": "Link", 
+   "in_filter": 1, 
+   "label": "Fiscal Year", 
+   "options": "Fiscal Year", 
+   "permlevel": 0, 
+   "read_only": 0, 
+   "reqd": 1, 
    "search_index": 0
-  },
+  }, 
   {
-   "fieldname": "column_break_17",
-   "fieldtype": "Column Break",
+   "fieldname": "column_break_17", 
+   "fieldtype": "Column Break", 
    "permlevel": 0
-  },
+  }, 
   {
-   "fieldname": "company",
-   "fieldtype": "Link",
-   "label": "Company",
-   "options": "Company",
-   "permlevel": 0,
+   "fieldname": "company", 
+   "fieldtype": "Link", 
+   "label": "Company", 
+   "options": "Company", 
+   "permlevel": 0, 
    "reqd": 1
-  },
+  }, 
   {
-   "fieldname": "letter_head",
-   "fieldtype": "Link",
-   "label": "Letter Head",
-   "options": "Letter Head",
-   "permlevel": 0,
-   "print_hide": 1,
+   "fieldname": "letter_head", 
+   "fieldtype": "Link", 
+   "label": "Letter Head", 
+   "options": "Letter Head", 
+   "permlevel": 0, 
+   "print_hide": 1, 
    "read_only": 0
-  },
+  }, 
   {
-   "fieldname": "amended_from",
-   "fieldtype": "Link",
-   "ignore_user_permissions": 1,
-   "label": "Amended From",
-   "no_copy": 1,
-   "options": "Leave Application",
-   "permlevel": 0,
-   "print_hide": 1,
+   "fieldname": "amended_from", 
+   "fieldtype": "Link", 
+   "ignore_user_permissions": 1, 
+   "label": "Amended From", 
+   "no_copy": 1, 
+   "options": "Leave Application", 
+   "permlevel": 0, 
+   "print_hide": 1, 
    "read_only": 1
   }
- ],
- "icon": "icon-calendar",
- "idx": 1,
- "is_submittable": 1,
- "max_attachments": 3,
- "modified": "2014-05-26 03:05:49.838899",
- "modified_by": "Administrator",
- "module": "HR",
- "name": "Leave Application",
- "owner": "Administrator",
+ ], 
+ "icon": "icon-calendar", 
+ "idx": 1, 
+ "is_submittable": 1, 
+ "max_attachments": 3, 
+ "modified": "2014-05-27 03:49:12.957706", 
+ "modified_by": "Administrator", 
+ "module": "HR", 
+ "name": "Leave Application", 
+ "owner": "Administrator", 
  "permissions": [
   {
-   "create": 1,
-   "delete": 0,
-   "email": 1,
-   "permlevel": 0,
-   "print": 1,
-   "read": 1,
-   "report": 1,
-   "role": "Employee",
+   "apply_user_permissions": 1, 
+   "create": 1, 
+   "delete": 0, 
+   "email": 1, 
+   "permlevel": 0, 
+   "print": 1, 
+   "read": 1, 
+   "report": 1, 
+   "role": "Employee", 
    "write": 1
-  },
+  }, 
   {
-   "amend": 0,
-   "cancel": 0,
-   "create": 0,
-   "delete": 0,
-   "permlevel": 1,
-   "read": 1,
-   "role": "All",
+   "amend": 0, 
+   "cancel": 0, 
+   "create": 0, 
+   "delete": 0, 
+   "permlevel": 1, 
+   "read": 1, 
+   "role": "All", 
    "submit": 0
-  },
+  }, 
   {
-   "amend": 1,
-   "cancel": 1,
-   "create": 1,
-   "delete": 1,
-   "email": 1,
-   "permlevel": 0,
-   "print": 1,
-   "read": 1,
-   "report": 1,
-   "set_user_permissions": 1,
-   "role": "HR 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": "HR User", 
+   "set_user_permissions": 1, 
+   "submit": 1, 
    "write": 1
-  },
+  }, 
   {
-   "amend": 1,
-   "cancel": 0,
-   "create": 0,
-   "delete": 0,
-   "email": 1,
-   "permlevel": 0,
-   "print": 1,
-   "read": 1,
-   "report": 1,
-   "role": "Leave Approver",
-   "submit": 1,
+   "amend": 1, 
+   "apply_user_permissions": 1, 
+   "cancel": 0, 
+   "create": 0, 
+   "delete": 0, 
+   "email": 1, 
+   "permlevel": 0, 
+   "print": 1, 
+   "read": 1, 
+   "report": 1, 
+   "role": "Leave Approver", 
+   "submit": 1, 
    "write": 1
-  },
+  }, 
   {
-   "amend": 0,
-   "cancel": 0,
-   "create": 0,
-   "delete": 0,
-   "permlevel": 1,
-   "read": 1,
-   "report": 1,
-   "role": "HR User",
-   "submit": 0,
+   "amend": 0, 
+   "cancel": 0, 
+   "create": 0, 
+   "delete": 0, 
+   "permlevel": 1, 
+   "read": 1, 
+   "report": 1, 
+   "role": "HR User", 
+   "submit": 0, 
    "write": 1
-  },
+  }, 
   {
-   "amend": 0,
-   "cancel": 0,
-   "create": 0,
-   "delete": 0,
-   "permlevel": 1,
-   "read": 1,
-   "report": 1,
-   "role": "Leave Approver",
-   "submit": 0,
+   "amend": 0, 
+   "cancel": 0, 
+   "create": 0, 
+   "delete": 0, 
+   "permlevel": 1, 
+   "read": 1, 
+   "report": 1, 
+   "role": "Leave Approver", 
+   "submit": 0, 
    "write": 1
   }
- ],
- "search_fields": "employee,employee_name,leave_type,from_date,to_date,total_leave_days,fiscal_year",
- "sort_field": "modified",
+ ], 
+ "search_fields": "employee,employee_name,leave_type,from_date,to_date,total_leave_days,fiscal_year", 
+ "sort_field": "modified", 
  "sort_order": "DESC"
-}
+}
\ No newline at end of file
diff --git a/erpnext/hr/doctype/leave_application/test_leave_application.py b/erpnext/hr/doctype/leave_application/test_leave_application.py
index dbf8a71..f547640 100644
--- a/erpnext/hr/doctype/leave_application/test_leave_application.py
+++ b/erpnext/hr/doctype/leave_application/test_leave_application.py
@@ -5,7 +5,7 @@
 import unittest
 
 from erpnext.hr.doctype.leave_application.leave_application import LeaveDayBlockedError, OverlapError
-from frappe.core.page.user_permissions.user_permissions import clear_user_permissions
+from frappe.permissions import clear_user_permissions_for_doctype
 
 test_dependencies = ["Leave Allocation", "Leave Block List"]
 
@@ -91,7 +91,7 @@
 
 		from frappe.utils.user import add_role
 		add_role("test1@example.com", "HR User")
-		clear_user_permissions("Employee")
+		clear_user_permissions_for_doctype("Employee")
 
 		frappe.db.set_value("Department", "_Test Department",
 			"leave_block_list", "_Test Leave Block List")
diff --git a/erpnext/hr/doctype/leave_block_list/leave_block_list.json b/erpnext/hr/doctype/leave_block_list/leave_block_list.json
index cb3b653..916e356 100644
--- a/erpnext/hr/doctype/leave_block_list/leave_block_list.json
+++ b/erpnext/hr/doctype/leave_block_list/leave_block_list.json
@@ -1,7 +1,7 @@
 {
  "allow_import": 1, 
  "autoname": "field:leave_block_list_name", 
- "creation": "2013-02-18 17:43:12.000000", 
+ "creation": "2013-02-18 17:43:12", 
  "description": "Block Holidays on important days.", 
  "docstatus": 0, 
  "doctype": "DocType", 
@@ -10,6 +10,7 @@
   {
    "fieldname": "leave_block_list_name", 
    "fieldtype": "Data", 
+   "in_list_view": 1, 
    "label": "Leave Block List Name", 
    "permlevel": 0, 
    "reqd": 1
@@ -17,6 +18,7 @@
   {
    "fieldname": "year", 
    "fieldtype": "Link", 
+   "in_list_view": 1, 
    "label": "Year", 
    "options": "Fiscal Year", 
    "permlevel": 0, 
@@ -25,6 +27,7 @@
   {
    "fieldname": "company", 
    "fieldtype": "Link", 
+   "in_list_view": 1, 
    "label": "Company", 
    "options": "Company", 
    "permlevel": 0, 
@@ -34,6 +37,7 @@
    "description": "If not checked, the list will have to be added to each Department where it has to be applied.", 
    "fieldname": "applies_to_all_departments", 
    "fieldtype": "Check", 
+   "in_list_view": 1, 
    "label": "Applies to Company", 
    "permlevel": 0
   }, 
@@ -68,13 +72,14 @@
  ], 
  "icon": "icon-calendar", 
  "idx": 1, 
- "modified": "2013-12-20 19:24:13.000000", 
+ "modified": "2014-05-27 03:49:13.198735", 
  "modified_by": "Administrator", 
  "module": "HR", 
  "name": "Leave Block List", 
  "owner": "Administrator", 
  "permissions": [
   {
+   "apply_user_permissions": 1, 
    "create": 1, 
    "email": 1, 
    "permlevel": 0, 
diff --git a/erpnext/hr/doctype/leave_type/leave_type.json b/erpnext/hr/doctype/leave_type/leave_type.json
index 808b26f..9ce967fe 100644
--- a/erpnext/hr/doctype/leave_type/leave_type.json
+++ b/erpnext/hr/doctype/leave_type/leave_type.json
@@ -62,14 +62,14 @@
  ], 
  "icon": "icon-flag", 
  "idx": 1, 
- "modified": "2014-05-07 06:39:38.884656", 
+ "modified": "2014-05-27 03:49:13.297832", 
  "modified_by": "Administrator", 
  "module": "HR", 
  "name": "Leave Type", 
  "owner": "Administrator", 
  "permissions": [
   {
-   "cancel": 0, 
+   "apply_user_permissions": 1, 
    "create": 1, 
    "delete": 1, 
    "email": 1, 
@@ -82,7 +82,6 @@
    "write": 1
   }, 
   {
-   "cancel": 0, 
    "create": 1, 
    "delete": 1, 
    "email": 1, 
@@ -95,6 +94,7 @@
    "write": 1
   }, 
   {
+   "apply_user_permissions": 1, 
    "permlevel": 0, 
    "read": 1, 
    "role": "Employee"
diff --git a/erpnext/hr/doctype/salary_slip/salary_slip.json b/erpnext/hr/doctype/salary_slip/salary_slip.json
index 4035481..374d11e 100644
--- a/erpnext/hr/doctype/salary_slip/salary_slip.json
+++ b/erpnext/hr/doctype/salary_slip/salary_slip.json
@@ -325,7 +325,7 @@
  "icon": "icon-file-text", 
  "idx": 1, 
  "is_submittable": 1, 
- "modified": "2014-05-26 03:05:52.624169", 
+ "modified": "2014-05-27 03:49:17.213045", 
  "modified_by": "Administrator", 
  "module": "HR", 
  "name": "Salary Slip", 
@@ -333,6 +333,7 @@
  "permissions": [
   {
    "amend": 0, 
+   "apply_user_permissions": 1, 
    "create": 1, 
    "delete": 0, 
    "email": 1, 
@@ -359,6 +360,7 @@
    "write": 1
   }, 
   {
+   "apply_user_permissions": 1, 
    "permlevel": 0, 
    "read": 1, 
    "role": "Employee"
diff --git a/erpnext/hr/doctype/salary_structure/salary_structure.json b/erpnext/hr/doctype/salary_structure/salary_structure.json
index 5931c77..c31696c 100644
--- a/erpnext/hr/doctype/salary_structure/salary_structure.json
+++ b/erpnext/hr/doctype/salary_structure/salary_structure.json
@@ -227,7 +227,7 @@
  ], 
  "icon": "icon-file-text", 
  "idx": 1, 
- "modified": "2014-05-09 02:16:46.711184", 
+ "modified": "2014-05-27 03:49:17.438605", 
  "modified_by": "Administrator", 
  "module": "HR", 
  "name": "Salary Structure", 
@@ -235,6 +235,7 @@
  "permissions": [
   {
    "amend": 0, 
+   "apply_user_permissions": 1, 
    "create": 1, 
    "email": 1, 
    "permlevel": 0, 
diff --git a/erpnext/manufacturing/doctype/bom/bom.json b/erpnext/manufacturing/doctype/bom/bom.json
index 958d6bf..3b0d5fc 100644
--- a/erpnext/manufacturing/doctype/bom/bom.json
+++ b/erpnext/manufacturing/doctype/bom/bom.json
@@ -233,7 +233,7 @@
  "is_submittable": 1, 
  "issingle": 0, 
  "istable": 0, 
- "modified": "2014-05-26 03:05:46.985950", 
+ "modified": "2014-05-27 03:49:08.024523", 
  "modified_by": "Administrator", 
  "module": "Manufacturing", 
  "name": "BOM", 
@@ -253,6 +253,7 @@
    "write": 1
   }, 
   {
+   "apply_user_permissions": 1, 
    "cancel": 1, 
    "create": 1, 
    "delete": 1, 
diff --git a/erpnext/manufacturing/doctype/production_order/production_order.json b/erpnext/manufacturing/doctype/production_order/production_order.json
index 4ade719..b1b19e4 100644
--- a/erpnext/manufacturing/doctype/production_order/production_order.json
+++ b/erpnext/manufacturing/doctype/production_order/production_order.json
@@ -224,7 +224,7 @@
  "idx": 1, 
  "in_create": 0, 
  "is_submittable": 1, 
- "modified": "2014-05-26 03:05:50.799576", 
+ "modified": "2014-05-27 03:49:15.008942", 
  "modified_by": "Administrator", 
  "module": "Manufacturing", 
  "name": "Production Order", 
@@ -232,6 +232,7 @@
  "permissions": [
   {
    "amend": 1, 
+   "apply_user_permissions": 1, 
    "cancel": 1, 
    "create": 1, 
    "delete": 1, 
@@ -245,6 +246,7 @@
    "write": 1
   }, 
   {
+   "apply_user_permissions": 1, 
    "permlevel": 0, 
    "read": 1, 
    "report": 1, 
diff --git a/erpnext/manufacturing/doctype/workstation/workstation.json b/erpnext/manufacturing/doctype/workstation/workstation.json
index e15c241..278707e 100644
--- a/erpnext/manufacturing/doctype/workstation/workstation.json
+++ b/erpnext/manufacturing/doctype/workstation/workstation.json
@@ -132,14 +132,14 @@
  ], 
  "icon": "icon-wrench", 
  "idx": 1, 
- "modified": "2014-05-06 12:12:33.424191", 
+ "modified": "2014-05-27 03:49:22.635046", 
  "modified_by": "Administrator", 
  "module": "Manufacturing", 
  "name": "Workstation", 
  "owner": "Administrator", 
  "permissions": [
   {
-   "cancel": 0, 
+   "apply_user_permissions": 1, 
    "create": 1, 
    "delete": 1, 
    "email": 1, 
diff --git a/erpnext/projects/doctype/activity_type/activity_type.json b/erpnext/projects/doctype/activity_type/activity_type.json
index 7ef2ec1..abbbbdb 100644
--- a/erpnext/projects/doctype/activity_type/activity_type.json
+++ b/erpnext/projects/doctype/activity_type/activity_type.json
@@ -1,7 +1,7 @@
 {
  "allow_import": 1, 
  "autoname": "field:activity_type", 
- "creation": "2013-03-05 10:14:59.000000", 
+ "creation": "2013-03-05 10:14:59", 
  "docstatus": 0, 
  "doctype": "DocType", 
  "document_type": "Master", 
@@ -9,6 +9,7 @@
   {
    "fieldname": "activity_type", 
    "fieldtype": "Data", 
+   "in_list_view": 1, 
    "label": "Activity Type", 
    "permlevel": 0, 
    "reqd": 1
@@ -17,7 +18,7 @@
  "icon": "icon-flag", 
  "idx": 1, 
  "in_dialog": 0, 
- "modified": "2013-12-20 19:23:54.000000", 
+ "modified": "2014-05-27 03:49:07.219341", 
  "modified_by": "Administrator", 
  "module": "Projects", 
  "name": "Activity Type", 
@@ -34,6 +35,7 @@
    "write": 1
   }, 
   {
+   "apply_user_permissions": 1, 
    "create": 1, 
    "email": 1, 
    "permlevel": 0, 
diff --git a/erpnext/projects/doctype/project/project.json b/erpnext/projects/doctype/project/project.json
index 675cd86..5489d33 100644
--- a/erpnext/projects/doctype/project/project.json
+++ b/erpnext/projects/doctype/project/project.json
@@ -258,7 +258,7 @@
  "icon": "icon-puzzle-piece", 
  "idx": 1, 
  "max_attachments": 4, 
- "modified": "2014-05-07 06:03:31.085767", 
+ "modified": "2014-05-27 03:49:15.252736", 
  "modified_by": "Administrator", 
  "module": "Projects", 
  "name": "Project", 
@@ -266,7 +266,7 @@
  "permissions": [
   {
    "amend": 0, 
-   "cancel": 0, 
+   "apply_user_permissions": 1, 
    "create": 1, 
    "delete": 1, 
    "email": 1, 
diff --git a/erpnext/projects/doctype/task/task.json b/erpnext/projects/doctype/task/task.json
index 71327bb..83b6f80 100644
--- a/erpnext/projects/doctype/task/task.json
+++ b/erpnext/projects/doctype/task/task.json
@@ -2,7 +2,7 @@
  "allow_attach": 1, 
  "allow_import": 1, 
  "autoname": "TASK.#####", 
- "creation": "2013-01-29 19:25:50.000000", 
+ "creation": "2013-01-29 19:25:50", 
  "docstatus": 0, 
  "doctype": "DocType", 
  "document_type": "Master", 
@@ -218,14 +218,14 @@
  "icon": "icon-check", 
  "idx": 1, 
  "max_attachments": 5, 
- "modified": "2014-01-24 13:01:46.000000", 
+ "modified": "2014-05-27 03:49:20.708319", 
  "modified_by": "Administrator", 
  "module": "Projects", 
  "name": "Task", 
  "owner": "Administrator", 
  "permissions": [
   {
-   "cancel": 0, 
+   "apply_user_permissions": 1, 
    "create": 1, 
    "delete": 1, 
    "email": 1, 
diff --git a/erpnext/projects/doctype/time_log/time_log.json b/erpnext/projects/doctype/time_log/time_log.json
index 49c52f7d..daeddba 100644
--- a/erpnext/projects/doctype/time_log/time_log.json
+++ b/erpnext/projects/doctype/time_log/time_log.json
@@ -152,7 +152,7 @@
  "icon": "icon-time", 
  "idx": 1, 
  "is_submittable": 1, 
- "modified": "2014-05-26 03:05:54.597160", 
+ "modified": "2014-05-27 03:49:21.143356", 
  "modified_by": "Administrator", 
  "module": "Projects", 
  "name": "Time Log", 
diff --git a/erpnext/projects/doctype/time_log_batch/time_log_batch.json b/erpnext/projects/doctype/time_log_batch/time_log_batch.json
index a20f45e..9d24643 100644
--- a/erpnext/projects/doctype/time_log_batch/time_log_batch.json
+++ b/erpnext/projects/doctype/time_log_batch/time_log_batch.json
@@ -83,7 +83,7 @@
  "icon": "icon-time", 
  "idx": 1, 
  "is_submittable": 1, 
- "modified": "2014-05-26 03:05:54.728928", 
+ "modified": "2014-05-27 03:49:21.339026", 
  "modified_by": "Administrator", 
  "module": "Projects", 
  "name": "Time Log Batch", 
@@ -91,6 +91,7 @@
  "permissions": [
   {
    "amend": 1, 
+   "apply_user_permissions": 1, 
    "cancel": 1, 
    "create": 1, 
    "delete": 1, 
diff --git a/erpnext/selling/doctype/campaign/campaign.json b/erpnext/selling/doctype/campaign/campaign.json
index f179b2c..03e8ec3 100644
--- a/erpnext/selling/doctype/campaign/campaign.json
+++ b/erpnext/selling/doctype/campaign/campaign.json
@@ -48,7 +48,7 @@
  ],
  "icon": "icon-bullhorn",
  "idx": 1,
- "modified": "2014-05-26 03:45:48.713672",
+ "modified": "2014-05-27 03:49:08.416532",
  "modified_by": "Administrator",
  "module": "Selling",
  "name": "Campaign",
@@ -56,7 +56,6 @@
  "permissions": [
   {
    "amend": 0,
-   "cancel": 0,
    "create": 0,
    "delete": 0,
    "email": 1,
@@ -71,7 +70,7 @@
   },
   {
    "amend": 0,
-   "cancel": 0,
+   "apply_user_permissions": 1,
    "create": 0,
    "delete": 0,
    "email": 1,
@@ -85,7 +84,6 @@
   },
   {
    "amend": 0,
-   "cancel": 0,
    "create": 1,
    "delete": 1,
    "email": 1,
diff --git a/erpnext/selling/doctype/customer/customer.json b/erpnext/selling/doctype/customer/customer.json
index 5b82281..794b763 100644
--- a/erpnext/selling/doctype/customer/customer.json
+++ b/erpnext/selling/doctype/customer/customer.json
@@ -1,337 +1,336 @@
 {
- "allow_import": 1,
- "allow_rename": 1,
- "autoname": "naming_series:",
- "creation": "2013-06-11 14:26:44",
- "description": "Buyer of Goods and Services.",
- "docstatus": 0,
- "doctype": "DocType",
- "document_type": "Master",
+ "allow_import": 1, 
+ "allow_rename": 1, 
+ "autoname": "naming_series:", 
+ "creation": "2013-06-11 14:26:44", 
+ "description": "Buyer of Goods and Services.", 
+ "docstatus": 0, 
+ "doctype": "DocType", 
+ "document_type": "Master", 
  "fields": [
   {
-   "fieldname": "basic_info",
-   "fieldtype": "Section Break",
-   "label": "Basic Info",
-   "oldfieldtype": "Section Break",
-   "options": "icon-user",
-   "permlevel": 0,
+   "fieldname": "basic_info", 
+   "fieldtype": "Section Break", 
+   "label": "Basic Info", 
+   "oldfieldtype": "Section Break", 
+   "options": "icon-user", 
+   "permlevel": 0, 
    "reqd": 0
-  },
+  }, 
   {
-   "fieldname": "naming_series",
-   "fieldtype": "Select",
-   "label": "Series",
-   "no_copy": 1,
-   "options": "CUST-",
-   "permlevel": 0,
+   "fieldname": "naming_series", 
+   "fieldtype": "Select", 
+   "label": "Series", 
+   "no_copy": 1, 
+   "options": "CUST-", 
+   "permlevel": 0, 
    "print_hide": 0
-  },
+  }, 
   {
-   "fieldname": "customer_name",
-   "fieldtype": "Data",
-   "hidden": 0,
-   "in_filter": 1,
-   "in_list_view": 1,
-   "label": "Full Name",
-   "no_copy": 1,
-   "oldfieldname": "customer_name",
-   "oldfieldtype": "Data",
-   "permlevel": 0,
-   "print_hide": 0,
-   "report_hide": 0,
-   "reqd": 1,
+   "fieldname": "customer_name", 
+   "fieldtype": "Data", 
+   "hidden": 0, 
+   "in_filter": 1, 
+   "in_list_view": 1, 
+   "label": "Full Name", 
+   "no_copy": 1, 
+   "oldfieldname": "customer_name", 
+   "oldfieldtype": "Data", 
+   "permlevel": 0, 
+   "print_hide": 0, 
+   "report_hide": 0, 
+   "reqd": 1, 
    "search_index": 1
-  },
+  }, 
   {
-   "fieldname": "customer_type",
-   "fieldtype": "Select",
-   "label": "Type",
-   "oldfieldname": "customer_type",
-   "oldfieldtype": "Select",
-   "options": "\nCompany\nIndividual",
-   "permlevel": 0,
+   "fieldname": "customer_type", 
+   "fieldtype": "Select", 
+   "label": "Type", 
+   "oldfieldname": "customer_type", 
+   "oldfieldtype": "Select", 
+   "options": "\nCompany\nIndividual", 
+   "permlevel": 0, 
    "reqd": 1
-  },
+  }, 
   {
-   "fieldname": "lead_name",
-   "fieldtype": "Link",
-   "hidden": 0,
-   "in_filter": 1,
-   "label": "From Lead",
-   "no_copy": 1,
-   "oldfieldname": "lead_name",
-   "oldfieldtype": "Link",
-   "options": "Lead",
-   "permlevel": 0,
-   "print_hide": 1,
+   "fieldname": "lead_name", 
+   "fieldtype": "Link", 
+   "hidden": 0, 
+   "in_filter": 1, 
+   "label": "From Lead", 
+   "no_copy": 1, 
+   "oldfieldname": "lead_name", 
+   "oldfieldtype": "Link", 
+   "options": "Lead", 
+   "permlevel": 0, 
+   "print_hide": 1, 
    "report_hide": 1
-  },
+  }, 
   {
-   "fieldname": "column_break0",
-   "fieldtype": "Column Break",
-   "permlevel": 0,
+   "fieldname": "column_break0", 
+   "fieldtype": "Column Break", 
+   "permlevel": 0, 
    "width": "50%"
-  },
+  }, 
   {
-   "description": "<a href=\"#Sales Browser/Customer Group\">Add / Edit</a>",
-   "fieldname": "customer_group",
-   "fieldtype": "Link",
-   "hidden": 0,
-   "in_filter": 1,
-   "label": "Customer Group",
-   "oldfieldname": "customer_group",
-   "oldfieldtype": "Link",
-   "options": "Customer Group",
-   "permlevel": 0,
-   "print_hide": 0,
-   "reqd": 1,
+   "description": "<a href=\"#Sales Browser/Customer Group\">Add / Edit</a>", 
+   "fieldname": "customer_group", 
+   "fieldtype": "Link", 
+   "hidden": 0, 
+   "in_filter": 1, 
+   "label": "Customer Group", 
+   "oldfieldname": "customer_group", 
+   "oldfieldtype": "Link", 
+   "options": "Customer Group", 
+   "permlevel": 0, 
+   "print_hide": 0, 
+   "reqd": 1, 
    "search_index": 1
-  },
+  }, 
   {
-   "description": "<a href=\"#Sales Browser/Territory\">Add / Edit</a>",
-   "fieldname": "territory",
-   "fieldtype": "Link",
-   "in_list_view": 1,
-   "label": "Territory",
-   "oldfieldname": "territory",
-   "oldfieldtype": "Link",
-   "options": "Territory",
-   "permlevel": 0,
-   "print_hide": 1,
+   "description": "<a href=\"#Sales Browser/Territory\">Add / Edit</a>", 
+   "fieldname": "territory", 
+   "fieldtype": "Link", 
+   "in_list_view": 1, 
+   "label": "Territory", 
+   "oldfieldname": "territory", 
+   "oldfieldtype": "Link", 
+   "options": "Territory", 
+   "permlevel": 0, 
+   "print_hide": 1, 
    "reqd": 1
-  },
+  }, 
   {
-   "depends_on": "eval:!doc.__islocal",
-   "fieldname": "address_contacts",
-   "fieldtype": "Section Break",
-   "label": "Address & Contacts",
-   "options": "icon-map-marker",
+   "depends_on": "eval:!doc.__islocal", 
+   "fieldname": "address_contacts", 
+   "fieldtype": "Section Break", 
+   "label": "Address & Contacts", 
+   "options": "icon-map-marker", 
    "permlevel": 0
-  },
+  }, 
   {
-   "fieldname": "address_html",
-   "fieldtype": "HTML",
-   "label": "Address HTML",
-   "permlevel": 0,
+   "fieldname": "address_html", 
+   "fieldtype": "HTML", 
+   "label": "Address HTML", 
+   "permlevel": 0, 
    "read_only": 1
-  },
+  }, 
   {
-   "fieldname": "column_break1",
-   "fieldtype": "Column Break",
-   "permlevel": 0,
+   "fieldname": "column_break1", 
+   "fieldtype": "Column Break", 
+   "permlevel": 0, 
    "width": "50%"
-  },
+  }, 
   {
-   "fieldname": "contact_html",
-   "fieldtype": "HTML",
-   "label": "Contact HTML",
-   "oldfieldtype": "HTML",
-   "permlevel": 0,
+   "fieldname": "contact_html", 
+   "fieldtype": "HTML", 
+   "label": "Contact HTML", 
+   "oldfieldtype": "HTML", 
+   "permlevel": 0, 
    "read_only": 1
-  },
+  }, 
   {
-   "depends_on": "eval:!doc.__islocal",
-   "fieldname": "communication_history",
-   "fieldtype": "Section Break",
-   "label": "Communication History",
-   "options": "icon-comments",
-   "permlevel": 0,
+   "depends_on": "eval:!doc.__islocal", 
+   "fieldname": "communication_history", 
+   "fieldtype": "Section Break", 
+   "label": "Communication History", 
+   "options": "icon-comments", 
+   "permlevel": 0, 
    "print_hide": 1
-  },
+  }, 
   {
-   "fieldname": "communication_html",
-   "fieldtype": "HTML",
-   "label": "Communication HTML",
-   "permlevel": 0,
+   "fieldname": "communication_html", 
+   "fieldtype": "HTML", 
+   "label": "Communication HTML", 
+   "permlevel": 0, 
    "print_hide": 1
-  },
+  }, 
   {
-   "fieldname": "more_info",
-   "fieldtype": "Section Break",
-   "label": "More Info",
-   "oldfieldtype": "Section Break",
-   "options": "icon-file-text",
+   "fieldname": "more_info", 
+   "fieldtype": "Section Break", 
+   "label": "More Info", 
+   "oldfieldtype": "Section Break", 
+   "options": "icon-file-text", 
    "permlevel": 0
-  },
+  }, 
   {
-   "fieldname": "column_break2",
-   "fieldtype": "Column Break",
-   "permlevel": 0,
+   "fieldname": "column_break2", 
+   "fieldtype": "Column Break", 
+   "permlevel": 0, 
    "width": "50%"
-  },
+  }, 
   {
-   "description": "To create an Account Head under a different company, select the company and save customer.",
-   "fieldname": "company",
-   "fieldtype": "Link",
-   "in_filter": 1,
-   "label": "Company",
-   "oldfieldname": "company",
-   "oldfieldtype": "Link",
-   "options": "Company",
-   "permlevel": 0,
-   "reqd": 1,
+   "description": "To create an Account Head under a different company, select the company and save customer.", 
+   "fieldname": "company", 
+   "fieldtype": "Link", 
+   "in_filter": 1, 
+   "label": "Company", 
+   "oldfieldname": "company", 
+   "oldfieldtype": "Link", 
+   "options": "Company", 
+   "permlevel": 0, 
+   "reqd": 1, 
    "search_index": 1
-  },
+  }, 
   {
-   "description": "Your Customer's TAX registration numbers (if applicable) or any general information",
-   "fieldname": "customer_details",
-   "fieldtype": "Text",
-   "label": "Customer Details",
-   "oldfieldname": "customer_details",
-   "oldfieldtype": "Code",
+   "description": "Your Customer's TAX registration numbers (if applicable) or any general information", 
+   "fieldname": "customer_details", 
+   "fieldtype": "Text", 
+   "label": "Customer Details", 
+   "oldfieldname": "customer_details", 
+   "oldfieldtype": "Code", 
    "permlevel": 0
-  },
+  }, 
   {
-   "fieldname": "column_break3",
-   "fieldtype": "Column Break",
-   "permlevel": 0,
+   "fieldname": "column_break3", 
+   "fieldtype": "Column Break", 
+   "permlevel": 0, 
    "width": "50%"
-  },
+  }, 
   {
-   "fieldname": "default_currency",
-   "fieldtype": "Link",
-   "ignore_user_permissions": 1,
-   "label": "Currency",
-   "no_copy": 1,
-   "options": "Currency",
+   "fieldname": "default_currency", 
+   "fieldtype": "Link", 
+   "ignore_user_permissions": 1, 
+   "label": "Currency", 
+   "no_copy": 1, 
+   "options": "Currency", 
    "permlevel": 0
-  },
+  }, 
   {
-   "fieldname": "default_price_list",
-   "fieldtype": "Link",
-   "ignore_user_permissions": 1,
-   "label": "Price List",
-   "options": "Price List",
+   "fieldname": "default_price_list", 
+   "fieldtype": "Link", 
+   "ignore_user_permissions": 1, 
+   "label": "Price List", 
+   "options": "Price List", 
    "permlevel": 0
-  },
+  }, 
   {
-   "fieldname": "default_taxes_and_charges",
-   "fieldtype": "Link",
-   "ignore_user_permissions": 1,
-   "label": "Taxes and Charges",
-   "options": "Sales Taxes and Charges Master",
+   "fieldname": "default_taxes_and_charges", 
+   "fieldtype": "Link", 
+   "ignore_user_permissions": 1, 
+   "label": "Taxes and Charges", 
+   "options": "Sales Taxes and Charges Master", 
    "permlevel": 0
-  },
+  }, 
   {
-   "fieldname": "credit_days",
-   "fieldtype": "Int",
-   "label": "Credit Days",
-   "oldfieldname": "credit_days",
-   "oldfieldtype": "Int",
+   "fieldname": "credit_days", 
+   "fieldtype": "Int", 
+   "label": "Credit Days", 
+   "oldfieldname": "credit_days", 
+   "oldfieldtype": "Int", 
    "permlevel": 1
-  },
+  }, 
   {
-   "fieldname": "credit_limit",
-   "fieldtype": "Currency",
-   "label": "Credit Limit",
-   "oldfieldname": "credit_limit",
-   "oldfieldtype": "Currency",
-   "options": "Company:company:default_currency",
+   "fieldname": "credit_limit", 
+   "fieldtype": "Currency", 
+   "label": "Credit Limit", 
+   "oldfieldname": "credit_limit", 
+   "oldfieldtype": "Currency", 
+   "options": "Company:company:default_currency", 
    "permlevel": 1
-  },
+  }, 
   {
-   "fieldname": "website",
-   "fieldtype": "Data",
-   "label": "Website",
+   "fieldname": "website", 
+   "fieldtype": "Data", 
+   "label": "Website", 
    "permlevel": 0
-  },
+  }, 
   {
-   "fieldname": "sales_team_section_break",
-   "fieldtype": "Section Break",
-   "label": "Sales Team",
-   "oldfieldtype": "Section Break",
-   "options": "icon-group",
+   "fieldname": "sales_team_section_break", 
+   "fieldtype": "Section Break", 
+   "label": "Sales Team", 
+   "oldfieldtype": "Section Break", 
+   "options": "icon-group", 
    "permlevel": 0
-  },
+  }, 
   {
-   "fieldname": "default_sales_partner",
-   "fieldtype": "Link",
-   "ignore_user_permissions": 1,
-   "label": "Sales Partner",
-   "oldfieldname": "default_sales_partner",
-   "oldfieldtype": "Link",
-   "options": "Sales Partner",
+   "fieldname": "default_sales_partner", 
+   "fieldtype": "Link", 
+   "ignore_user_permissions": 1, 
+   "label": "Sales Partner", 
+   "oldfieldname": "default_sales_partner", 
+   "oldfieldtype": "Link", 
+   "options": "Sales Partner", 
    "permlevel": 0
-  },
+  }, 
   {
-   "fieldname": "default_commission_rate",
-   "fieldtype": "Float",
-   "label": "Commission Rate",
-   "oldfieldname": "default_commission_rate",
-   "oldfieldtype": "Currency",
+   "fieldname": "default_commission_rate", 
+   "fieldtype": "Float", 
+   "label": "Commission Rate", 
+   "oldfieldname": "default_commission_rate", 
+   "oldfieldtype": "Currency", 
    "permlevel": 0
-  },
+  }, 
   {
-   "fieldname": "sales_team",
-   "fieldtype": "Table",
-   "label": "Sales Team Details",
-   "oldfieldname": "sales_team",
-   "oldfieldtype": "Table",
-   "options": "Sales Team",
+   "fieldname": "sales_team", 
+   "fieldtype": "Table", 
+   "label": "Sales Team Details", 
+   "oldfieldname": "sales_team", 
+   "oldfieldtype": "Table", 
+   "options": "Sales Team", 
    "permlevel": 0
-  },
+  }, 
   {
-   "fieldname": "communications",
-   "fieldtype": "Table",
-   "hidden": 1,
-   "label": "Communications",
-   "options": "Communication",
-   "permlevel": 0,
+   "fieldname": "communications", 
+   "fieldtype": "Table", 
+   "hidden": 1, 
+   "label": "Communications", 
+   "options": "Communication", 
+   "permlevel": 0, 
    "print_hide": 1
   }
- ],
- "icon": "icon-user",
- "idx": 1,
- "modified": "2014-05-26 03:05:47.563605",
- "modified_by": "Administrator",
- "module": "Selling",
- "name": "Customer",
- "owner": "Administrator",
+ ], 
+ "icon": "icon-user", 
+ "idx": 1, 
+ "modified": "2014-05-27 03:49:09.208254", 
+ "modified_by": "Administrator", 
+ "module": "Selling", 
+ "name": "Customer", 
+ "owner": "Administrator", 
  "permissions": [
   {
-   "amend": 0,
-   "cancel": 0,
-   "create": 1,
-   "delete": 0,
-   "email": 1,
-   "permlevel": 0,
-   "print": 1,
-   "read": 1,
-   "report": 1,
-   "role": "Sales User",
-   "submit": 0,
+   "amend": 0, 
+   "apply_user_permissions": 1, 
+   "create": 1, 
+   "delete": 0, 
+   "email": 1, 
+   "permlevel": 0, 
+   "print": 1, 
+   "read": 1, 
+   "report": 1, 
+   "role": "Sales User", 
+   "submit": 0, 
    "write": 1
-  },
+  }, 
   {
-   "cancel": 0,
-   "delete": 0,
-   "permlevel": 1,
-   "read": 1,
+   "cancel": 0, 
+   "delete": 0, 
+   "permlevel": 1, 
+   "read": 1, 
    "role": "Sales User"
-  },
+  }, 
   {
-   "amend": 0,
-   "cancel": 0,
-   "create": 1,
-   "delete": 1,
-   "email": 1,
-   "permlevel": 0,
-   "print": 1,
-   "read": 1,
-   "report": 1,
-   "set_user_permissions": 1,
-   "role": "Sales Master Manager",
-   "submit": 0,
+   "amend": 0, 
+   "create": 1, 
+   "delete": 1, 
+   "email": 1, 
+   "permlevel": 0, 
+   "print": 1, 
+   "read": 1, 
+   "report": 1, 
+   "role": "Sales Master Manager", 
+   "set_user_permissions": 1, 
+   "submit": 0, 
    "write": 1
-  },
+  }, 
   {
-   "cancel": 0,
-   "delete": 0,
-   "permlevel": 1,
-   "read": 1,
-   "role": "Sales Master Manager",
+   "cancel": 0, 
+   "delete": 0, 
+   "permlevel": 1, 
+   "read": 1, 
+   "role": "Sales Master Manager", 
    "write": 1
   }
- ],
+ ], 
  "search_fields": "customer_name,customer_group,territory"
-}
+}
\ No newline at end of file
diff --git a/erpnext/selling/doctype/industry_type/industry_type.json b/erpnext/selling/doctype/industry_type/industry_type.json
index 2beda93..fd2ec3f 100644
--- a/erpnext/selling/doctype/industry_type/industry_type.json
+++ b/erpnext/selling/doctype/industry_type/industry_type.json
@@ -1,7 +1,7 @@
 {
  "allow_import": 1, 
  "autoname": "field:industry", 
- "creation": "2012-03-27 14:36:09.000000", 
+ "creation": "2012-03-27 14:36:09", 
  "docstatus": 0, 
  "doctype": "DocType", 
  "document_type": "Master", 
@@ -9,6 +9,7 @@
   {
    "fieldname": "industry", 
    "fieldtype": "Data", 
+   "in_list_view": 1, 
    "label": "Industry", 
    "oldfieldname": "industry", 
    "oldfieldtype": "Data", 
@@ -18,7 +19,7 @@
  ], 
  "icon": "icon-flag", 
  "idx": 1, 
- "modified": "2013-12-20 19:24:08.000000", 
+ "modified": "2014-05-27 03:49:11.146729", 
  "modified_by": "Administrator", 
  "module": "Selling", 
  "name": "Industry Type", 
@@ -35,6 +36,7 @@
    "write": 1
   }, 
   {
+   "apply_user_permissions": 1, 
    "email": 1, 
    "permlevel": 0, 
    "print": 1, 
diff --git a/erpnext/selling/doctype/installation_note/installation_note.json b/erpnext/selling/doctype/installation_note/installation_note.json
index 5097a38..859ff5f 100644
--- a/erpnext/selling/doctype/installation_note/installation_note.json
+++ b/erpnext/selling/doctype/installation_note/installation_note.json
@@ -235,7 +235,7 @@
  "icon": "icon-wrench", 
  "idx": 1, 
  "is_submittable": 1, 
- "modified": "2014-05-26 03:05:48.899177", 
+ "modified": "2014-05-27 03:49:11.449598", 
  "modified_by": "Administrator", 
  "module": "Selling", 
  "name": "Installation Note", 
@@ -243,6 +243,7 @@
  "permissions": [
   {
    "amend": 1, 
+   "apply_user_permissions": 1, 
    "cancel": 1, 
    "create": 1, 
    "delete": 1, 
diff --git a/erpnext/selling/doctype/lead/lead.json b/erpnext/selling/doctype/lead/lead.json
index 13ec401..08efe5c 100644
--- a/erpnext/selling/doctype/lead/lead.json
+++ b/erpnext/selling/doctype/lead/lead.json
@@ -362,7 +362,7 @@
  ], 
  "icon": "icon-user", 
  "idx": 1, 
- "modified": "2014-05-21 06:25:53.613765", 
+ "modified": "2014-05-27 03:49:12.570184", 
  "modified_by": "Administrator", 
  "module": "Selling", 
  "name": "Lead", 
@@ -370,7 +370,6 @@
  "permissions": [
   {
    "amend": 0, 
-   "cancel": 0, 
    "create": 1, 
    "delete": 1, 
    "email": 1, 
@@ -384,7 +383,7 @@
   }, 
   {
    "amend": 0, 
-   "cancel": 0, 
+   "apply_user_permissions": 1, 
    "create": 1, 
    "delete": 0, 
    "email": 1, 
diff --git a/erpnext/selling/doctype/opportunity/opportunity.json b/erpnext/selling/doctype/opportunity/opportunity.json
index bfb2fe5..249a0ff 100644
--- a/erpnext/selling/doctype/opportunity/opportunity.json
+++ b/erpnext/selling/doctype/opportunity/opportunity.json
@@ -409,7 +409,7 @@
  "icon": "icon-info-sign", 
  "idx": 1, 
  "is_submittable": 1, 
- "modified": "2014-05-26 03:05:50.362530", 
+ "modified": "2014-05-27 03:49:14.057062", 
  "modified_by": "Administrator", 
  "module": "Selling", 
  "name": "Opportunity", 
@@ -417,6 +417,7 @@
  "permissions": [
   {
    "amend": 1, 
+   "apply_user_permissions": 1, 
    "cancel": 1, 
    "create": 1, 
    "delete": 1, 
diff --git a/erpnext/selling/doctype/quotation/quotation.json b/erpnext/selling/doctype/quotation/quotation.json
index 0e76ec4..0221738 100644
--- a/erpnext/selling/doctype/quotation/quotation.json
+++ b/erpnext/selling/doctype/quotation/quotation.json
@@ -818,7 +818,7 @@
  "idx": 1, 
  "is_submittable": 1, 
  "max_attachments": 1, 
- "modified": "2014-05-26 03:05:52.328681", 
+ "modified": "2014-05-27 03:49:16.670976", 
  "modified_by": "Administrator", 
  "module": "Selling", 
  "name": "Quotation", 
@@ -840,6 +840,7 @@
   }, 
   {
    "amend": 1, 
+   "apply_user_permissions": 1, 
    "cancel": 1, 
    "create": 1, 
    "delete": 1, 
@@ -854,6 +855,7 @@
   }, 
   {
    "amend": 0, 
+   "apply_user_permissions": 1, 
    "cancel": 0, 
    "create": 0, 
    "delete": 0, 
@@ -882,6 +884,7 @@
   }, 
   {
    "amend": 1, 
+   "apply_user_permissions": 1, 
    "cancel": 1, 
    "create": 1, 
    "delete": 1, 
diff --git a/erpnext/selling/doctype/sales_bom/sales_bom.json b/erpnext/selling/doctype/sales_bom/sales_bom.json
index 91fac19..337bd12 100644
--- a/erpnext/selling/doctype/sales_bom/sales_bom.json
+++ b/erpnext/selling/doctype/sales_bom/sales_bom.json
@@ -1,6 +1,6 @@
 {
  "allow_import": 1, 
- "creation": "2013-06-20 11:53:21.000000", 
+ "creation": "2013-06-20 11:53:21", 
  "description": "Aggregate group of **Items** into another **Item**. This is useful if you are bundling a certain **Items** into a package and you maintain stock of the packed **Items** and not the aggregate **Item**. \n\nThe package **Item** will have \"Is Stock Item\" as \"No\" and \"Is Sales Item\" as \"Yes\".\n\nFor Example: If you are selling Laptops and Backpacks separately and have a special price if the customer buys both, then the Laptop + Backpack will be a new Sales BOM Item.\n\nNote: BOM = Bill of Materials", 
  "docstatus": 0, 
  "doctype": "DocType", 
@@ -16,6 +16,7 @@
    "description": "The Item that represents the Package. This Item must have \"Is Stock Item\" as \"No\" and \"Is Sales Item\" as \"Yes\"", 
    "fieldname": "new_item_code", 
    "fieldtype": "Link", 
+   "in_list_view": 1, 
    "label": "Parent Item", 
    "no_copy": 1, 
    "oldfieldname": "new_item_code", 
@@ -45,7 +46,7 @@
  "icon": "icon-sitemap", 
  "idx": 1, 
  "is_submittable": 0, 
- "modified": "2014-01-20 17:49:19.000000", 
+ "modified": "2014-05-27 03:49:17.656569", 
  "modified_by": "Administrator", 
  "module": "Selling", 
  "name": "Sales BOM", 
@@ -53,7 +54,6 @@
  "permissions": [
   {
    "amend": 0, 
-   "cancel": 0, 
    "create": 1, 
    "delete": 1, 
    "email": 1, 
@@ -67,7 +67,7 @@
   }, 
   {
    "amend": 0, 
-   "cancel": 0, 
+   "apply_user_permissions": 1, 
    "create": 0, 
    "delete": 0, 
    "email": 1, 
@@ -81,7 +81,7 @@
   }, 
   {
    "amend": 0, 
-   "cancel": 0, 
+   "apply_user_permissions": 1, 
    "create": 1, 
    "delete": 1, 
    "email": 1, 
diff --git a/erpnext/selling/doctype/sales_order/sales_order.json b/erpnext/selling/doctype/sales_order/sales_order.json
index cf7744d..dd0d210 100644
--- a/erpnext/selling/doctype/sales_order/sales_order.json
+++ b/erpnext/selling/doctype/sales_order/sales_order.json
@@ -874,7 +874,7 @@
  "idx": 1, 
  "is_submittable": 1, 
  "issingle": 0, 
- "modified": "2014-05-26 03:05:53.316938", 
+ "modified": "2014-05-27 03:49:18.266089", 
  "modified_by": "Administrator", 
  "module": "Selling", 
  "name": "Sales Order", 
@@ -882,6 +882,7 @@
  "permissions": [
   {
    "amend": 1, 
+   "apply_user_permissions": 1, 
    "cancel": 1, 
    "create": 1, 
    "delete": 1, 
@@ -896,6 +897,7 @@
   }, 
   {
    "amend": 1, 
+   "apply_user_permissions": 1, 
    "cancel": 1, 
    "create": 1, 
    "delete": 1, 
@@ -909,6 +911,7 @@
    "write": 1
   }, 
   {
+   "apply_user_permissions": 1, 
    "cancel": 0, 
    "delete": 0, 
    "email": 1, 
@@ -918,6 +921,7 @@
    "role": "Accounts User"
   }, 
   {
+   "apply_user_permissions": 1, 
    "cancel": 0, 
    "delete": 0, 
    "email": 1, 
@@ -927,6 +931,7 @@
    "role": "Customer"
   }, 
   {
+   "apply_user_permissions": 1, 
    "permlevel": 0, 
    "read": 1, 
    "report": 1, 
diff --git a/erpnext/setup/doctype/brand/brand.json b/erpnext/setup/doctype/brand/brand.json
index 3e69ca5..f78547b 100644
--- a/erpnext/setup/doctype/brand/brand.json
+++ b/erpnext/setup/doctype/brand/brand.json
@@ -33,14 +33,13 @@
  "icon": "icon-certificate", 
  "idx": 1, 
  "in_dialog": 0, 
- "modified": "2014-05-06 12:13:17.646235", 
+ "modified": "2014-05-27 03:49:08.217867", 
  "modified_by": "Administrator", 
  "module": "Setup", 
  "name": "Brand", 
  "owner": "Administrator", 
  "permissions": [
   {
-   "cancel": 0, 
    "create": 1, 
    "delete": 1, 
    "email": 1, 
@@ -53,7 +52,7 @@
   }, 
   {
    "amend": 0, 
-   "cancel": 0, 
+   "apply_user_permissions": 1, 
    "create": 0, 
    "delete": 0, 
    "email": 1, 
@@ -66,6 +65,7 @@
    "write": 0
   }, 
   {
+   "apply_user_permissions": 1, 
    "delete": 0, 
    "email": 1, 
    "permlevel": 0, 
@@ -75,6 +75,7 @@
    "role": "Sales User"
   }, 
   {
+   "apply_user_permissions": 1, 
    "delete": 0, 
    "email": 1, 
    "permlevel": 0, 
@@ -84,6 +85,7 @@
    "role": "Purchase User"
   }, 
   {
+   "apply_user_permissions": 1, 
    "delete": 0, 
    "email": 1, 
    "permlevel": 0, 
diff --git a/erpnext/setup/doctype/company/company.json b/erpnext/setup/doctype/company/company.json
index ea82fac..51a1ac5 100644
--- a/erpnext/setup/doctype/company/company.json
+++ b/erpnext/setup/doctype/company/company.json
@@ -348,7 +348,7 @@
  ], 
  "icon": "icon-building", 
  "idx": 1, 
- "modified": "2014-05-26 03:05:47.284171", 
+ "modified": "2014-05-27 03:49:08.597191", 
  "modified_by": "Administrator", 
  "module": "Setup", 
  "name": "Company", 
@@ -356,7 +356,6 @@
  "permissions": [
   {
    "amend": 0, 
-   "cancel": 0, 
    "create": 1, 
    "delete": 1, 
    "email": 1, 
@@ -369,6 +368,7 @@
    "write": 1
   }, 
   {
+   "apply_user_permissions": 1, 
    "delete": 0, 
    "email": 1, 
    "permlevel": 0, 
diff --git a/erpnext/setup/doctype/country/country.json b/erpnext/setup/doctype/country/country.json
index 487a160..1798ca1 100644
--- a/erpnext/setup/doctype/country/country.json
+++ b/erpnext/setup/doctype/country/country.json
@@ -1,7 +1,7 @@
 {
  "allow_import": 1, 
  "autoname": "field:country_name", 
- "creation": "2013-01-19 10:23:30.000000", 
+ "creation": "2013-01-19 10:23:30", 
  "docstatus": 0, 
  "doctype": "DocType", 
  "document_type": "Master", 
@@ -9,6 +9,7 @@
   {
    "fieldname": "country_name", 
    "fieldtype": "Data", 
+   "in_list_view": 1, 
    "label": "Country Name", 
    "oldfieldname": "country_name", 
    "oldfieldtype": "Data", 
@@ -18,18 +19,21 @@
   {
    "fieldname": "date_format", 
    "fieldtype": "Data", 
+   "in_list_view": 1, 
    "label": "Date Format", 
    "permlevel": 0
   }, 
   {
    "fieldname": "time_zones", 
    "fieldtype": "Text", 
+   "in_list_view": 1, 
    "label": "Time Zones", 
    "permlevel": 0
   }, 
   {
    "fieldname": "code", 
    "fieldtype": "Data", 
+   "in_list_view": 1, 
    "label": "Code", 
    "permlevel": 0
   }
@@ -37,7 +41,7 @@
  "icon": "icon-globe", 
  "idx": 1, 
  "in_create": 0, 
- "modified": "2014-03-05 14:36:16.000000", 
+ "modified": "2014-05-27 03:49:08.984710", 
  "modified_by": "Administrator", 
  "module": "Setup", 
  "name": "Country", 
@@ -45,7 +49,6 @@
  "permissions": [
   {
    "amend": 0, 
-   "cancel": 0, 
    "create": 1, 
    "email": 1, 
    "permlevel": 0, 
@@ -68,6 +71,7 @@
    "write": 1
   }, 
   {
+   "apply_user_permissions": 1, 
    "create": 1, 
    "email": 1, 
    "permlevel": 0, 
@@ -90,6 +94,7 @@
    "write": 1
   }, 
   {
+   "apply_user_permissions": 1, 
    "email": 1, 
    "permlevel": 0, 
    "print": 1, 
diff --git a/erpnext/setup/doctype/currency/currency.json b/erpnext/setup/doctype/currency/currency.json
index 6c66bca..26fd14e 100644
--- a/erpnext/setup/doctype/currency/currency.json
+++ b/erpnext/setup/doctype/currency/currency.json
@@ -1,6 +1,6 @@
 {
  "autoname": "field:currency_name", 
- "creation": "2013-01-28 10:06:02.000000", 
+ "creation": "2013-01-28 10:06:02", 
  "description": "**Currency** Master", 
  "docstatus": 0, 
  "doctype": "DocType", 
@@ -58,14 +58,13 @@
  "icon": "icon-bitcoin", 
  "idx": 1, 
  "in_create": 0, 
- "modified": "2014-01-20 17:48:31.000000", 
+ "modified": "2014-05-27 03:49:09.038451", 
  "modified_by": "Administrator", 
  "module": "Setup", 
  "name": "Currency", 
  "owner": "Administrator", 
  "permissions": [
   {
-   "cancel": 0, 
    "create": 1, 
    "delete": 1, 
    "email": 1, 
@@ -79,7 +78,6 @@
   }, 
   {
    "amend": 0, 
-   "cancel": 0, 
    "create": 1, 
    "delete": 1, 
    "email": 1, 
@@ -93,7 +91,6 @@
   }, 
   {
    "amend": 0, 
-   "cancel": 0, 
    "create": 1, 
    "delete": 0, 
    "email": 1, 
@@ -106,6 +103,7 @@
    "write": 1
   }, 
   {
+   "apply_user_permissions": 1, 
    "delete": 0, 
    "email": 1, 
    "permlevel": 0, 
diff --git a/erpnext/setup/doctype/currency_exchange/currency_exchange.json b/erpnext/setup/doctype/currency_exchange/currency_exchange.json
index 7556968..a51bd45 100644
--- a/erpnext/setup/doctype/currency_exchange/currency_exchange.json
+++ b/erpnext/setup/doctype/currency_exchange/currency_exchange.json
@@ -1,6 +1,6 @@
 {
  "allow_import": 1, 
- "creation": "2013-06-20 15:40:29.000000", 
+ "creation": "2013-06-20 15:40:29", 
  "description": "Specify Exchange Rate to convert one currency into another", 
  "docstatus": 0, 
  "doctype": "DocType", 
@@ -9,6 +9,7 @@
   {
    "fieldname": "from_currency", 
    "fieldtype": "Link", 
+   "in_list_view": 1, 
    "label": "From Currency", 
    "options": "Currency", 
    "permlevel": 0, 
@@ -17,6 +18,7 @@
   {
    "fieldname": "to_currency", 
    "fieldtype": "Link", 
+   "in_list_view": 1, 
    "label": "To Currency", 
    "options": "Currency", 
    "permlevel": 0, 
@@ -25,6 +27,7 @@
   {
    "fieldname": "exchange_rate", 
    "fieldtype": "Float", 
+   "in_list_view": 1, 
    "label": "Exchange Rate", 
    "permlevel": 0, 
    "reqd": 1
@@ -32,14 +35,13 @@
  ], 
  "icon": "icon-exchange", 
  "idx": 1, 
- "modified": "2014-01-20 17:48:31.000000", 
+ "modified": "2014-05-27 03:49:09.092389", 
  "modified_by": "Administrator", 
  "module": "Setup", 
  "name": "Currency Exchange", 
  "owner": "Administrator", 
  "permissions": [
   {
-   "cancel": 1, 
    "create": 1, 
    "delete": 1, 
    "email": 1, 
@@ -51,6 +53,7 @@
    "write": 1
   }, 
   {
+   "apply_user_permissions": 1, 
    "delete": 0, 
    "email": 1, 
    "permlevel": 0, 
@@ -60,6 +63,7 @@
    "role": "Accounts User"
   }, 
   {
+   "apply_user_permissions": 1, 
    "delete": 0, 
    "email": 1, 
    "permlevel": 0, 
@@ -69,6 +73,7 @@
    "role": "Sales User"
   }, 
   {
+   "apply_user_permissions": 1, 
    "delete": 0, 
    "email": 1, 
    "permlevel": 0, 
diff --git a/erpnext/setup/doctype/customer_group/customer_group.json b/erpnext/setup/doctype/customer_group/customer_group.json
index 921803f..47ee903 100644
--- a/erpnext/setup/doctype/customer_group/customer_group.json
+++ b/erpnext/setup/doctype/customer_group/customer_group.json
@@ -101,7 +101,7 @@
  "icon": "icon-sitemap", 
  "idx": 1, 
  "in_create": 1, 
- "modified": "2014-05-26 03:05:47.746202", 
+ "modified": "2014-05-27 03:49:09.397308", 
  "modified_by": "Administrator", 
  "module": "Setup", 
  "name": "Customer Group", 
@@ -109,7 +109,6 @@
  "permissions": [
   {
    "amend": 0, 
-   "cancel": 0, 
    "create": 0, 
    "delete": 0, 
    "email": 1, 
@@ -123,7 +122,7 @@
   }, 
   {
    "amend": 0, 
-   "cancel": 0, 
+   "apply_user_permissions": 1, 
    "create": 0, 
    "delete": 0, 
    "email": 1, 
@@ -137,7 +136,6 @@
   }, 
   {
    "amend": 0, 
-   "cancel": 0, 
    "create": 1, 
    "delete": 1, 
    "email": 1, 
diff --git a/erpnext/setup/doctype/item_group/item_group.json b/erpnext/setup/doctype/item_group/item_group.json
index 7f8c519..82f3c03 100644
--- a/erpnext/setup/doctype/item_group/item_group.json
+++ b/erpnext/setup/doctype/item_group/item_group.json
@@ -162,7 +162,7 @@
  "in_create": 1, 
  "issingle": 0, 
  "max_attachments": 3, 
- "modified": "2014-05-26 03:05:49.376278", 
+ "modified": "2014-05-27 03:49:12.086044", 
  "modified_by": "Administrator", 
  "module": "Setup", 
  "name": "Item Group", 
@@ -170,7 +170,6 @@
  "permissions": [
   {
    "amend": 0, 
-   "cancel": 0, 
    "create": 0, 
    "delete": 0, 
    "email": 1, 
@@ -184,7 +183,7 @@
   }, 
   {
    "amend": 0, 
-   "cancel": 0, 
+   "apply_user_permissions": 1, 
    "create": 0, 
    "delete": 0, 
    "email": 1, 
@@ -197,7 +196,6 @@
    "write": 0
   }, 
   {
-   "cancel": 0, 
    "create": 1, 
    "delete": 1, 
    "email": 1, 
@@ -210,7 +208,7 @@
    "write": 1
   }, 
   {
-   "cancel": 0, 
+   "apply_user_permissions": 1, 
    "delete": 0, 
    "email": 1, 
    "permlevel": 0, 
@@ -220,7 +218,7 @@
    "role": "Sales User"
   }, 
   {
-   "cancel": 0, 
+   "apply_user_permissions": 1, 
    "delete": 0, 
    "email": 1, 
    "permlevel": 0, 
@@ -230,7 +228,7 @@
    "role": "Purchase User"
   }, 
   {
-   "cancel": 0, 
+   "apply_user_permissions": 1, 
    "delete": 0, 
    "email": 1, 
    "permlevel": 0, 
diff --git a/erpnext/setup/doctype/print_heading/print_heading.json b/erpnext/setup/doctype/print_heading/print_heading.json
index a303452..313b30b 100644
--- a/erpnext/setup/doctype/print_heading/print_heading.json
+++ b/erpnext/setup/doctype/print_heading/print_heading.json
@@ -30,14 +30,13 @@
  ], 
  "icon": "icon-font", 
  "idx": 1, 
- "modified": "2014-05-07 06:39:39.352519", 
+ "modified": "2014-05-27 03:49:14.944690", 
  "modified_by": "Administrator", 
  "module": "Setup", 
  "name": "Print Heading", 
  "owner": "Administrator", 
  "permissions": [
   {
-   "cancel": 0, 
    "create": 1, 
    "delete": 1, 
    "email": 1, 
@@ -50,6 +49,7 @@
    "write": 1
   }, 
   {
+   "apply_user_permissions": 1, 
    "permlevel": 0, 
    "read": 1, 
    "role": "All"
diff --git a/erpnext/setup/doctype/sales_partner/sales_partner.json b/erpnext/setup/doctype/sales_partner/sales_partner.json
index 7bc0edd..bd006dc 100644
--- a/erpnext/setup/doctype/sales_partner/sales_partner.json
+++ b/erpnext/setup/doctype/sales_partner/sales_partner.json
@@ -1,7 +1,7 @@
 {
  "allow_import": 1, 
  "autoname": "field:partner_name", 
- "creation": "2013-04-12 15:34:06.000000", 
+ "creation": "2013-04-12 15:34:06", 
  "description": "A third party distributor / dealer / commission agent / affiliate / reseller who sells the companies products for a commission.", 
  "docstatus": 0, 
  "doctype": "DocType", 
@@ -11,6 +11,7 @@
    "fieldname": "partner_name", 
    "fieldtype": "Data", 
    "in_filter": 1, 
+   "in_list_view": 1, 
    "label": "Sales Partner Name", 
    "oldfieldname": "partner_name", 
    "oldfieldtype": "Data", 
@@ -22,6 +23,7 @@
    "fieldname": "partner_type", 
    "fieldtype": "Select", 
    "in_filter": 1, 
+   "in_list_view": 1, 
    "label": "Partner Type", 
    "oldfieldname": "partner_type", 
    "oldfieldtype": "Select", 
@@ -33,6 +35,7 @@
    "description": "<a href=\"#Sales Browser/Territory\">Add / Edit</a>", 
    "fieldname": "territory", 
    "fieldtype": "Link", 
+   "in_list_view": 1, 
    "label": "Territory", 
    "options": "Territory", 
    "permlevel": 0, 
@@ -48,6 +51,7 @@
   {
    "fieldname": "commission_rate", 
    "fieldtype": "Float", 
+   "in_list_view": 1, 
    "label": "Commission Rate", 
    "oldfieldname": "commission_rate", 
    "oldfieldtype": "Currency", 
@@ -194,7 +198,7 @@
  "icon": "icon-user", 
  "idx": 1, 
  "in_create": 0, 
- "modified": "2014-02-20 18:30:32.000000", 
+ "modified": "2014-05-27 03:49:18.661354", 
  "modified_by": "Administrator", 
  "module": "Setup", 
  "name": "Sales Partner", 
@@ -202,7 +206,6 @@
  "permissions": [
   {
    "amend": 0, 
-   "cancel": 0, 
    "create": 0, 
    "delete": 0, 
    "email": 1, 
@@ -216,7 +219,7 @@
   }, 
   {
    "amend": 0, 
-   "cancel": 0, 
+   "apply_user_permissions": 1, 
    "create": 0, 
    "delete": 0, 
    "email": 1, 
@@ -230,7 +233,6 @@
   }, 
   {
    "amend": 0, 
-   "cancel": 0, 
    "create": 1, 
    "delete": 0, 
    "email": 1, 
diff --git a/erpnext/setup/doctype/sales_person/sales_person.json b/erpnext/setup/doctype/sales_person/sales_person.json
index aa567ea..f1db4f4 100644
--- a/erpnext/setup/doctype/sales_person/sales_person.json
+++ b/erpnext/setup/doctype/sales_person/sales_person.json
@@ -143,7 +143,7 @@
  "icon": "icon-user", 
  "idx": 1, 
  "in_create": 1, 
- "modified": "2014-05-26 03:05:53.652608", 
+ "modified": "2014-05-27 03:49:18.900175", 
  "modified_by": "Administrator", 
  "module": "Setup", 
  "name": "Sales Person", 
@@ -151,7 +151,6 @@
  "permissions": [
   {
    "amend": 0, 
-   "cancel": 0, 
    "create": 0, 
    "delete": 0, 
    "email": 1, 
@@ -165,7 +164,7 @@
   }, 
   {
    "amend": 0, 
-   "cancel": 0, 
+   "apply_user_permissions": 1, 
    "create": 0, 
    "delete": 0, 
    "email": 1, 
@@ -179,7 +178,6 @@
   }, 
   {
    "amend": 0, 
-   "cancel": 0, 
    "create": 1, 
    "delete": 1, 
    "email": 1, 
diff --git a/erpnext/setup/doctype/supplier_type/supplier_type.json b/erpnext/setup/doctype/supplier_type/supplier_type.json
index de2f74f..e881e95c 100644
--- a/erpnext/setup/doctype/supplier_type/supplier_type.json
+++ b/erpnext/setup/doctype/supplier_type/supplier_type.json
@@ -20,7 +20,7 @@
  ], 
  "icon": "icon-flag", 
  "idx": 1, 
- "modified": "2014-05-07 06:39:39.516612", 
+ "modified": "2014-05-27 03:49:20.505739", 
  "modified_by": "Administrator", 
  "module": "Setup", 
  "name": "Supplier Type", 
@@ -28,7 +28,6 @@
  "permissions": [
   {
    "amend": 0, 
-   "cancel": 0, 
    "create": 0, 
    "delete": 0, 
    "email": 1, 
@@ -42,7 +41,7 @@
   }, 
   {
    "amend": 0, 
-   "cancel": 0, 
+   "apply_user_permissions": 1, 
    "create": 0, 
    "delete": 0, 
    "email": 1, 
@@ -56,7 +55,6 @@
   }, 
   {
    "amend": 0, 
-   "cancel": 0, 
    "create": 1, 
    "delete": 1, 
    "email": 1, 
diff --git a/erpnext/setup/doctype/terms_and_conditions/terms_and_conditions.json b/erpnext/setup/doctype/terms_and_conditions/terms_and_conditions.json
index ca73a89..2f5a289 100644
--- a/erpnext/setup/doctype/terms_and_conditions/terms_and_conditions.json
+++ b/erpnext/setup/doctype/terms_and_conditions/terms_and_conditions.json
@@ -32,7 +32,7 @@
  ], 
  "icon": "icon-legal", 
  "idx": 1, 
- "modified": "2014-05-07 06:48:23.870645", 
+ "modified": "2014-05-27 03:49:20.923172", 
  "modified_by": "Administrator", 
  "module": "Setup", 
  "name": "Terms and Conditions", 
@@ -40,7 +40,6 @@
  "permissions": [
   {
    "amend": 0, 
-   "cancel": 0, 
    "create": 1, 
    "delete": 1, 
    "email": 1, 
@@ -54,7 +53,7 @@
   }, 
   {
    "amend": 0, 
-   "cancel": 0, 
+   "apply_user_permissions": 1, 
    "create": 0, 
    "delete": 0, 
    "email": 0, 
@@ -67,12 +66,12 @@
    "write": 0
   }, 
   {
+   "apply_user_permissions": 1, 
    "permlevel": 0, 
    "read": 1, 
    "role": "Purchase User"
   }, 
   {
-   "cancel": 0, 
    "create": 1, 
    "delete": 1, 
    "email": 1, 
@@ -85,7 +84,7 @@
    "write": 1
   }, 
   {
-   "cancel": 0, 
+   "apply_user_permissions": 1, 
    "create": 1, 
    "delete": 1, 
    "email": 1, 
@@ -98,6 +97,7 @@
    "write": 1
   }, 
   {
+   "apply_user_permissions": 1, 
    "permlevel": 0, 
    "read": 1, 
    "role": "Material User"
diff --git a/erpnext/setup/doctype/territory/territory.json b/erpnext/setup/doctype/territory/territory.json
index 12559ff..66f1945 100644
--- a/erpnext/setup/doctype/territory/territory.json
+++ b/erpnext/setup/doctype/territory/territory.json
@@ -136,7 +136,7 @@
  "icon": "icon-map-marker", 
  "idx": 1, 
  "in_create": 1, 
- "modified": "2014-05-26 03:05:54.517648", 
+ "modified": "2014-05-27 03:49:20.981624", 
  "modified_by": "Administrator", 
  "module": "Setup", 
  "name": "Territory", 
@@ -145,7 +145,6 @@
  "permissions": [
   {
    "amend": 0, 
-   "cancel": 0, 
    "create": 1, 
    "delete": 1, 
    "email": 1, 
@@ -159,7 +158,6 @@
   }, 
   {
    "amend": 0, 
-   "cancel": 0, 
    "create": 0, 
    "delete": 0, 
    "email": 1, 
@@ -173,7 +171,7 @@
   }, 
   {
    "amend": 0, 
-   "cancel": 0, 
+   "apply_user_permissions": 1, 
    "create": 0, 
    "delete": 0, 
    "email": 1, 
@@ -186,11 +184,13 @@
    "write": 0
   }, 
   {
+   "apply_user_permissions": 1, 
    "permlevel": 0, 
    "read": 1, 
    "role": "Material User"
   }, 
   {
+   "apply_user_permissions": 1, 
    "permlevel": 0, 
    "read": 1, 
    "role": "Maintenance User"
diff --git a/erpnext/setup/doctype/uom/uom.json b/erpnext/setup/doctype/uom/uom.json
index 42e31eb..3f89ee8 100644
--- a/erpnext/setup/doctype/uom/uom.json
+++ b/erpnext/setup/doctype/uom/uom.json
@@ -1,7 +1,7 @@
 {
  "allow_import": 1, 
  "autoname": "field:uom_name", 
- "creation": "2013-01-10 16:34:24.000000", 
+ "creation": "2013-01-10 16:34:24", 
  "docstatus": 0, 
  "doctype": "DocType", 
  "document_type": "Master", 
@@ -9,6 +9,7 @@
   {
    "fieldname": "uom_name", 
    "fieldtype": "Data", 
+   "in_list_view": 1, 
    "label": "UOM Name", 
    "oldfieldname": "uom_name", 
    "oldfieldtype": "Data", 
@@ -19,13 +20,14 @@
    "description": "Check this to disallow fractions. (for Nos)", 
    "fieldname": "must_be_whole_number", 
    "fieldtype": "Check", 
+   "in_list_view": 1, 
    "label": "Must be Whole Number", 
    "permlevel": 0
   }
  ], 
  "icon": "icon-compass", 
  "idx": 1, 
- "modified": "2014-01-20 17:49:34.000000", 
+ "modified": "2014-05-27 03:49:22.050899", 
  "modified_by": "Administrator", 
  "module": "Setup", 
  "name": "UOM", 
@@ -33,7 +35,6 @@
  "permissions": [
   {
    "amend": 0, 
-   "cancel": 0, 
    "create": 1, 
    "delete": 1, 
    "email": 1, 
@@ -47,7 +48,6 @@
   }, 
   {
    "amend": 0, 
-   "cancel": 0, 
    "create": 0, 
    "delete": 0, 
    "email": 1, 
@@ -61,7 +61,7 @@
   }, 
   {
    "amend": 0, 
-   "cancel": 0, 
+   "apply_user_permissions": 1, 
    "create": 0, 
    "delete": 0, 
    "email": 1, 
diff --git a/erpnext/stock/doctype/bin/bin.json b/erpnext/stock/doctype/bin/bin.json
index 03fa4bf..2160ca4 100644
--- a/erpnext/stock/doctype/bin/bin.json
+++ b/erpnext/stock/doctype/bin/bin.json
@@ -1,6 +1,6 @@
 {
  "autoname": "BIN/.#######", 
- "creation": "2013-01-10 16:34:25.000000", 
+ "creation": "2013-01-10 16:34:25", 
  "docstatus": 0, 
  "doctype": "DocType", 
  "fields": [
@@ -162,13 +162,14 @@
  "hide_toolbar": 1, 
  "idx": 1, 
  "in_create": 1, 
- "modified": "2013-12-20 19:23:56.000000", 
+ "modified": "2014-05-27 03:49:07.654364", 
  "modified_by": "Administrator", 
  "module": "Stock", 
  "name": "Bin", 
  "owner": "Administrator", 
  "permissions": [
   {
+   "apply_user_permissions": 1, 
    "email": 1, 
    "permlevel": 0, 
    "print": 1, 
@@ -178,6 +179,7 @@
    "submit": 0
   }, 
   {
+   "apply_user_permissions": 1, 
    "email": 1, 
    "permlevel": 0, 
    "print": 1, 
@@ -188,7 +190,7 @@
   }, 
   {
    "amend": 0, 
-   "cancel": 0, 
+   "apply_user_permissions": 1, 
    "create": 0, 
    "email": 1, 
    "permlevel": 0, 
diff --git a/erpnext/stock/doctype/delivery_note/delivery_note.json b/erpnext/stock/doctype/delivery_note/delivery_note.json
index b6125a6..9b13b10 100644
--- a/erpnext/stock/doctype/delivery_note/delivery_note.json
+++ b/erpnext/stock/doctype/delivery_note/delivery_note.json
@@ -999,7 +999,7 @@
  "idx": 1, 
  "in_create": 0, 
  "is_submittable": 1, 
- "modified": "2014-05-26 03:05:48.020967", 
+ "modified": "2014-05-27 03:49:09.721622", 
  "modified_by": "Administrator", 
  "module": "Stock", 
  "name": "Delivery Note", 
@@ -1007,6 +1007,7 @@
  "permissions": [
   {
    "amend": 1, 
+   "apply_user_permissions": 1, 
    "cancel": 1, 
    "create": 1, 
    "delete": 1, 
@@ -1035,6 +1036,7 @@
   }, 
   {
    "amend": 1, 
+   "apply_user_permissions": 1, 
    "cancel": 1, 
    "create": 1, 
    "delete": 1, 
@@ -1048,6 +1050,7 @@
    "write": 1
   }, 
   {
+   "apply_user_permissions": 1, 
    "cancel": 0, 
    "create": 0, 
    "delete": 0, 
@@ -1061,6 +1064,7 @@
    "write": 0
   }, 
   {
+   "apply_user_permissions": 1, 
    "cancel": 0, 
    "delete": 0, 
    "email": 1, 
diff --git a/erpnext/stock/doctype/item/item.json b/erpnext/stock/doctype/item/item.json
index 03febbc..adcf7dc 100644
--- a/erpnext/stock/doctype/item/item.json
+++ b/erpnext/stock/doctype/item/item.json
@@ -832,7 +832,6 @@
  "owner": "Administrator",
  "permissions": [
   {
-   "cancel": 0,
    "create": 1,
    "delete": 1,
    "email": 1,
@@ -847,7 +846,6 @@
   },
   {
    "amend": 0,
-   "cancel": 0,
    "create": 0,
    "delete": 0,
    "email": 1,
@@ -861,7 +859,7 @@
   },
   {
    "amend": 0,
-   "cancel": 0,
+   "apply_user_permissions": 1,
    "create": 0,
    "delete": 0,
    "email": 1,
@@ -874,26 +872,31 @@
    "write": 0
   },
   {
+   "apply_user_permissions": 1,
    "permlevel": 0,
    "read": 1,
    "role": "Sales User"
   },
   {
+   "apply_user_permissions": 1,
    "permlevel": 0,
    "read": 1,
    "role": "Purchase User"
   },
   {
+   "apply_user_permissions": 1,
    "permlevel": 0,
    "read": 1,
    "role": "Maintenance User"
   },
   {
+   "apply_user_permissions": 1,
    "permlevel": 0,
    "read": 1,
    "role": "Accounts User"
   },
   {
+   "apply_user_permissions": 1,
    "permlevel": 0,
    "read": 1,
    "role": "Manufacturing User"
diff --git a/erpnext/stock/doctype/material_request/material_request.json b/erpnext/stock/doctype/material_request/material_request.json
index 1e5ddcd..8e8f756 100644
--- a/erpnext/stock/doctype/material_request/material_request.json
+++ b/erpnext/stock/doctype/material_request/material_request.json
@@ -229,7 +229,7 @@
  "icon": "icon-ticket", 
  "idx": 1, 
  "is_submittable": 1, 
- "modified": "2014-05-26 03:05:50.138188", 
+ "modified": "2014-05-27 03:49:13.642995", 
  "modified_by": "Administrator", 
  "module": "Stock", 
  "name": "Material Request", 
@@ -265,6 +265,7 @@
   }, 
   {
    "amend": 1, 
+   "apply_user_permissions": 1, 
    "cancel": 1, 
    "create": 1, 
    "delete": 1, 
@@ -279,6 +280,7 @@
   }, 
   {
    "amend": 1, 
+   "apply_user_permissions": 1, 
    "cancel": 1, 
    "create": 1, 
    "delete": 1, 
diff --git a/erpnext/stock/doctype/packing_slip/packing_slip.json b/erpnext/stock/doctype/packing_slip/packing_slip.json
index 47eb75d..3b3d5a0 100644
--- a/erpnext/stock/doctype/packing_slip/packing_slip.json
+++ b/erpnext/stock/doctype/packing_slip/packing_slip.json
@@ -180,7 +180,7 @@
  "icon": "icon-suitcase",
  "idx": 1,
  "is_submittable": 1,
- "modified": "2014-05-26 03:07:50.514014",
+ "modified": "2014-05-27 03:49:14.251039",
  "modified_by": "Administrator",
  "module": "Stock",
  "name": "Packing Slip",
@@ -188,6 +188,7 @@
  "permissions": [
   {
    "amend": 1,
+   "apply_user_permissions": 1,
    "cancel": 1,
    "create": 1,
    "delete": 1,
@@ -202,6 +203,7 @@
   },
   {
    "amend": 1,
+   "apply_user_permissions": 1,
    "cancel": 1,
    "create": 1,
    "delete": 1,
diff --git a/erpnext/stock/doctype/price_list/price_list.json b/erpnext/stock/doctype/price_list/price_list.json
index 22a5da6..56b2f32 100644
--- a/erpnext/stock/doctype/price_list/price_list.json
+++ b/erpnext/stock/doctype/price_list/price_list.json
@@ -75,7 +75,7 @@
  "icon": "icon-tags", 
  "idx": 1, 
  "max_attachments": 1, 
- "modified": "2014-05-07 06:01:57.302928", 
+ "modified": "2014-05-27 03:49:14.866933", 
  "modified_by": "Administrator", 
  "module": "Stock", 
  "name": "Price List", 
@@ -83,7 +83,7 @@
  "permissions": [
   {
    "amend": 0, 
-   "cancel": 0, 
+   "apply_user_permissions": 1, 
    "create": 0, 
    "delete": 0, 
    "permlevel": 0, 
@@ -95,7 +95,6 @@
   }, 
   {
    "amend": 0, 
-   "cancel": 0, 
    "create": 1, 
    "delete": 1, 
    "permlevel": 0, 
@@ -106,6 +105,7 @@
    "write": 1
   }, 
   {
+   "apply_user_permissions": 1, 
    "delete": 0, 
    "permlevel": 0, 
    "read": 1, 
@@ -113,7 +113,6 @@
    "role": "Purchase User"
   }, 
   {
-   "cancel": 0, 
    "create": 1, 
    "delete": 1, 
    "permlevel": 0, 
@@ -123,6 +122,7 @@
    "write": 1
   }, 
   {
+   "apply_user_permissions": 1, 
    "permlevel": 0, 
    "read": 1, 
    "report": 0, 
diff --git a/erpnext/stock/doctype/purchase_receipt/purchase_receipt.json b/erpnext/stock/doctype/purchase_receipt/purchase_receipt.json
index 314886e..e585bef 100755
--- a/erpnext/stock/doctype/purchase_receipt/purchase_receipt.json
+++ b/erpnext/stock/doctype/purchase_receipt/purchase_receipt.json
@@ -754,7 +754,7 @@
  "icon": "icon-truck", 
  "idx": 1, 
  "is_submittable": 1, 
- "modified": "2014-05-26 03:05:51.846204", 
+ "modified": "2014-05-27 03:49:16.302198", 
  "modified_by": "Administrator", 
  "module": "Stock", 
  "name": "Purchase Receipt", 
@@ -776,6 +776,7 @@
   }, 
   {
    "amend": 1, 
+   "apply_user_permissions": 1, 
    "cancel": 1, 
    "create": 1, 
    "delete": 1, 
@@ -790,6 +791,7 @@
   }, 
   {
    "amend": 1, 
+   "apply_user_permissions": 1, 
    "cancel": 1, 
    "create": 1, 
    "delete": 1, 
@@ -803,12 +805,14 @@
    "write": 1
   }, 
   {
+   "apply_user_permissions": 1, 
    "permlevel": 0, 
    "read": 1, 
    "report": 1, 
    "role": "Accounts User"
   }, 
   {
+   "apply_user_permissions": 1, 
    "cancel": 0, 
    "delete": 0, 
    "email": 1, 
diff --git a/erpnext/stock/doctype/serial_no/serial_no.json b/erpnext/stock/doctype/serial_no/serial_no.json
index 88ac921..3316582 100644
--- a/erpnext/stock/doctype/serial_no/serial_no.json
+++ b/erpnext/stock/doctype/serial_no/serial_no.json
@@ -418,14 +418,13 @@
  "icon": "icon-barcode", 
  "idx": 1, 
  "in_create": 0, 
- "modified": "2014-05-09 02:16:41.833590", 
+ "modified": "2014-05-27 03:49:19.131746", 
  "modified_by": "Administrator", 
  "module": "Stock", 
  "name": "Serial No", 
  "owner": "Administrator", 
  "permissions": [
   {
-   "cancel": 0, 
    "create": 1, 
    "delete": 1, 
    "email": 1, 
@@ -439,7 +438,6 @@
   }, 
   {
    "amend": 0, 
-   "cancel": 0, 
    "create": 0, 
    "delete": 0, 
    "email": 1, 
@@ -453,7 +451,7 @@
   }, 
   {
    "amend": 0, 
-   "cancel": 0, 
+   "apply_user_permissions": 1, 
    "create": 0, 
    "delete": 0, 
    "email": 1, 
diff --git a/erpnext/stock/doctype/stock_entry/stock_entry.json b/erpnext/stock/doctype/stock_entry/stock_entry.json
index bea6732..b522282 100644
--- a/erpnext/stock/doctype/stock_entry/stock_entry.json
+++ b/erpnext/stock/doctype/stock_entry/stock_entry.json
@@ -580,7 +580,7 @@
  "is_submittable": 1, 
  "issingle": 0, 
  "max_attachments": 0, 
- "modified": "2014-05-26 03:05:53.832569", 
+ "modified": "2014-05-27 03:49:19.520247", 
  "modified_by": "Administrator", 
  "module": "Stock", 
  "name": "Stock Entry", 
@@ -588,6 +588,7 @@
  "permissions": [
   {
    "amend": 1, 
+   "apply_user_permissions": 1, 
    "cancel": 1, 
    "create": 1, 
    "delete": 1, 
@@ -602,6 +603,7 @@
   }, 
   {
    "amend": 1, 
+   "apply_user_permissions": 1, 
    "cancel": 1, 
    "create": 1, 
    "delete": 1, 
diff --git a/erpnext/stock/doctype/stock_ledger_entry/stock_ledger_entry.json b/erpnext/stock/doctype/stock_ledger_entry/stock_ledger_entry.json
index 1d36a7a..c9e3b77 100644
--- a/erpnext/stock/doctype/stock_ledger_entry/stock_ledger_entry.json
+++ b/erpnext/stock/doctype/stock_ledger_entry/stock_ledger_entry.json
@@ -264,7 +264,7 @@
  "icon": "icon-list", 
  "idx": 1, 
  "in_create": 1, 
- "modified": "2014-05-09 02:16:42.262203", 
+ "modified": "2014-05-27 03:49:19.837686", 
  "modified_by": "Administrator", 
  "module": "Stock", 
  "name": "Stock Ledger Entry", 
@@ -272,7 +272,7 @@
  "permissions": [
   {
    "amend": 0, 
-   "cancel": 0, 
+   "apply_user_permissions": 1, 
    "create": 0, 
    "permlevel": 0, 
    "read": 1, 
diff --git a/erpnext/stock/doctype/warehouse/warehouse.json b/erpnext/stock/doctype/warehouse/warehouse.json
index 504a0ed..4e016e6 100644
--- a/erpnext/stock/doctype/warehouse/warehouse.json
+++ b/erpnext/stock/doctype/warehouse/warehouse.json
@@ -150,7 +150,7 @@
  ], 
  "icon": "icon-building", 
  "idx": 1, 
- "modified": "2014-05-07 06:09:21.102749", 
+ "modified": "2014-05-27 03:49:22.483111", 
  "modified_by": "Administrator", 
  "module": "Stock", 
  "name": "Warehouse", 
@@ -158,7 +158,6 @@
  "permissions": [
   {
    "amend": 0, 
-   "cancel": 0, 
    "create": 1, 
    "delete": 1, 
    "email": 1, 
@@ -172,7 +171,7 @@
   }, 
   {
    "amend": 0, 
-   "cancel": 0, 
+   "apply_user_permissions": 1, 
    "create": 0, 
    "delete": 0, 
    "email": 1, 
@@ -185,6 +184,7 @@
    "write": 0
   }, 
   {
+   "apply_user_permissions": 1, 
    "delete": 0, 
    "email": 1, 
    "permlevel": 0, 
@@ -194,6 +194,7 @@
    "role": "Sales User"
   }, 
   {
+   "apply_user_permissions": 1, 
    "delete": 0, 
    "email": 1, 
    "permlevel": 0, 
@@ -203,6 +204,7 @@
    "role": "Purchase User"
   }, 
   {
+   "apply_user_permissions": 1, 
    "delete": 0, 
    "email": 1, 
    "permlevel": 0, 
@@ -212,6 +214,7 @@
    "role": "Accounts User"
   }, 
   {
+   "apply_user_permissions": 1, 
    "permlevel": 0, 
    "read": 1, 
    "role": "Manufacturing User"
diff --git a/erpnext/support/doctype/customer_issue/customer_issue.json b/erpnext/support/doctype/customer_issue/customer_issue.json
index 0c3515d..8230f9c 100644
--- a/erpnext/support/doctype/customer_issue/customer_issue.json
+++ b/erpnext/support/doctype/customer_issue/customer_issue.json
@@ -394,7 +394,7 @@
  "icon": "icon-bug", 
  "idx": 1, 
  "is_submittable": 0, 
- "modified": "2014-05-26 03:05:47.828178", 
+ "modified": "2014-05-27 03:49:09.483145", 
  "modified_by": "Administrator", 
  "module": "Support", 
  "name": "Customer Issue", 
@@ -402,7 +402,7 @@
  "permissions": [
   {
    "amend": 0, 
-   "cancel": 0, 
+   "apply_user_permissions": 1, 
    "create": 1, 
    "delete": 1, 
    "email": 1, 
diff --git a/erpnext/support/doctype/maintenance_visit/maintenance_visit.json b/erpnext/support/doctype/maintenance_visit/maintenance_visit.json
index f56bd8b..4a13e40 100644
--- a/erpnext/support/doctype/maintenance_visit/maintenance_visit.json
+++ b/erpnext/support/doctype/maintenance_visit/maintenance_visit.json
@@ -278,7 +278,7 @@
  "icon": "icon-file-text", 
  "idx": 1, 
  "is_submittable": 1, 
- "modified": "2014-05-26 03:05:50.014543", 
+ "modified": "2014-05-27 03:49:13.466221", 
  "modified_by": "Administrator", 
  "module": "Support", 
  "name": "Maintenance Visit", 
@@ -286,6 +286,7 @@
  "permissions": [
   {
    "amend": 1, 
+   "apply_user_permissions": 1, 
    "cancel": 1, 
    "create": 1, 
    "delete": 1, 
diff --git a/erpnext/support/doctype/support_ticket/support_ticket.json b/erpnext/support/doctype/support_ticket/support_ticket.json
index fd97884..ff7867e 100644
--- a/erpnext/support/doctype/support_ticket/support_ticket.json
+++ b/erpnext/support/doctype/support_ticket/support_ticket.json
@@ -1,291 +1,290 @@
 {
- "allow_attach": 1, 
- "autoname": "naming_series:", 
- "creation": "2013-02-01 10:36:25", 
- "docstatus": 0, 
- "doctype": "DocType", 
+ "allow_attach": 1,
+ "autoname": "naming_series:",
+ "creation": "2013-02-01 10:36:25",
+ "docstatus": 0,
+ "doctype": "DocType",
  "fields": [
   {
-   "fieldname": "subject_section", 
-   "fieldtype": "Section Break", 
-   "label": "Subject", 
-   "options": "icon-flag", 
+   "fieldname": "subject_section",
+   "fieldtype": "Section Break",
+   "label": "Subject",
+   "options": "icon-flag",
    "permlevel": 0
-  }, 
+  },
   {
-   "fieldname": "naming_series", 
-   "fieldtype": "Select", 
-   "hidden": 0, 
-   "label": "Series", 
-   "no_copy": 1, 
-   "options": "SUP-", 
-   "permlevel": 0, 
-   "print_hide": 1, 
-   "reqd": 0, 
+   "fieldname": "naming_series",
+   "fieldtype": "Select",
+   "hidden": 0,
+   "label": "Series",
+   "no_copy": 1,
+   "options": "SUP-",
+   "permlevel": 0,
+   "print_hide": 1,
+   "reqd": 0,
    "search_index": 0
-  }, 
+  },
   {
-   "fieldname": "subject", 
-   "fieldtype": "Data", 
-   "in_filter": 1, 
-   "in_list_view": 1, 
-   "label": "Subject", 
-   "permlevel": 0, 
-   "report_hide": 0, 
-   "reqd": 1, 
+   "fieldname": "subject",
+   "fieldtype": "Data",
+   "in_filter": 1,
+   "in_list_view": 1,
+   "label": "Subject",
+   "permlevel": 0,
+   "report_hide": 0,
+   "reqd": 1,
    "search_index": 0
-  }, 
+  },
   {
-   "fieldname": "cb00", 
-   "fieldtype": "Column Break", 
+   "fieldname": "cb00",
+   "fieldtype": "Column Break",
    "permlevel": 0
-  }, 
+  },
   {
-   "default": "Open", 
-   "fieldname": "status", 
-   "fieldtype": "Select", 
-   "in_filter": 0, 
-   "in_list_view": 1, 
-   "label": "Status", 
-   "no_copy": 1, 
-   "oldfieldname": "status", 
-   "oldfieldtype": "Select", 
-   "options": "Open\nReplied\nHold\nClosed", 
-   "permlevel": 0, 
-   "read_only": 0, 
-   "reqd": 0, 
+   "default": "Open",
+   "fieldname": "status",
+   "fieldtype": "Select",
+   "in_filter": 0,
+   "in_list_view": 1,
+   "label": "Status",
+   "no_copy": 1,
+   "oldfieldname": "status",
+   "oldfieldtype": "Select",
+   "options": "Open\nReplied\nHold\nClosed",
+   "permlevel": 0,
+   "read_only": 0,
+   "reqd": 0,
    "search_index": 1
-  }, 
+  },
   {
-   "depends_on": "eval:doc.__islocal", 
-   "fieldname": "raised_by", 
-   "fieldtype": "Data", 
-   "in_filter": 1, 
-   "in_list_view": 1, 
-   "label": "Raised By (Email)", 
-   "oldfieldname": "raised_by", 
-   "oldfieldtype": "Data", 
-   "permlevel": 0, 
+   "depends_on": "eval:doc.__islocal",
+   "fieldname": "raised_by",
+   "fieldtype": "Data",
+   "in_filter": 1,
+   "in_list_view": 1,
+   "label": "Raised By (Email)",
+   "oldfieldname": "raised_by",
+   "oldfieldtype": "Data",
+   "permlevel": 0,
    "reqd": 1
-  }, 
+  },
   {
-   "fieldname": "sb00", 
-   "fieldtype": "Section Break", 
-   "label": "Messages", 
-   "options": "icon-comments", 
+   "fieldname": "sb00",
+   "fieldtype": "Section Break",
+   "label": "Messages",
+   "options": "icon-comments",
    "permlevel": 0
-  }, 
+  },
   {
-   "depends_on": "eval:doc.__islocal", 
-   "fieldname": "description", 
-   "fieldtype": "Text", 
-   "label": "Description", 
-   "oldfieldname": "problem_description", 
-   "oldfieldtype": "Text", 
-   "permlevel": 0, 
+   "depends_on": "eval:doc.__islocal",
+   "fieldname": "description",
+   "fieldtype": "Text",
+   "label": "Description",
+   "oldfieldname": "problem_description",
+   "oldfieldtype": "Text",
+   "permlevel": 0,
    "reqd": 0
-  }, 
+  },
   {
-   "depends_on": "eval:!doc.__islocal", 
-   "fieldname": "thread_html", 
-   "fieldtype": "HTML", 
-   "label": "Thread HTML", 
-   "permlevel": 0, 
+   "depends_on": "eval:!doc.__islocal",
+   "fieldname": "thread_html",
+   "fieldtype": "HTML",
+   "label": "Thread HTML",
+   "permlevel": 0,
    "read_only": 1
-  }, 
+  },
   {
-   "fieldname": "additional_info", 
-   "fieldtype": "Section Break", 
-   "label": "Reference", 
-   "options": "icon-pushpin", 
-   "permlevel": 0, 
+   "fieldname": "additional_info",
+   "fieldtype": "Section Break",
+   "label": "Reference",
+   "options": "icon-pushpin",
+   "permlevel": 0,
    "read_only": 1
-  }, 
+  },
   {
-   "depends_on": "eval:!doc.__islocal", 
-   "fieldname": "column_break0", 
-   "fieldtype": "Column Break", 
-   "oldfieldtype": "Column Break", 
-   "permlevel": 0, 
-   "read_only": 1, 
+   "depends_on": "eval:!doc.__islocal",
+   "fieldname": "column_break0",
+   "fieldtype": "Column Break",
+   "oldfieldtype": "Column Break",
+   "permlevel": 0,
+   "read_only": 1,
    "width": "50%"
-  }, 
+  },
   {
-   "fieldname": "lead", 
-   "fieldtype": "Link", 
-   "label": "Lead", 
-   "options": "Lead", 
+   "fieldname": "lead",
+   "fieldtype": "Link",
+   "label": "Lead",
+   "options": "Lead",
    "permlevel": 0
-  }, 
+  },
   {
-   "fieldname": "contact", 
-   "fieldtype": "Link", 
-   "label": "Contact", 
-   "options": "Contact", 
+   "fieldname": "contact",
+   "fieldtype": "Link",
+   "label": "Contact",
+   "options": "Contact",
    "permlevel": 0
-  }, 
+  },
   {
-   "fieldname": "customer", 
-   "fieldtype": "Link", 
-   "in_filter": 1, 
-   "label": "Customer", 
-   "oldfieldname": "customer", 
-   "oldfieldtype": "Link", 
-   "options": "Customer", 
-   "permlevel": 0, 
-   "print_hide": 1, 
-   "read_only": 0, 
-   "reqd": 0, 
+   "fieldname": "customer",
+   "fieldtype": "Link",
+   "in_filter": 1,
+   "label": "Customer",
+   "oldfieldname": "customer",
+   "oldfieldtype": "Link",
+   "options": "Customer",
+   "permlevel": 0,
+   "print_hide": 1,
+   "read_only": 0,
+   "reqd": 0,
    "search_index": 1
-  }, 
+  },
   {
-   "fieldname": "customer_name", 
-   "fieldtype": "Data", 
-   "in_filter": 1, 
-   "label": "Customer Name", 
-   "oldfieldname": "customer_name", 
-   "oldfieldtype": "Data", 
-   "permlevel": 0, 
-   "read_only": 1, 
-   "reqd": 0, 
+   "fieldname": "customer_name",
+   "fieldtype": "Data",
+   "in_filter": 1,
+   "label": "Customer Name",
+   "oldfieldname": "customer_name",
+   "oldfieldtype": "Data",
+   "permlevel": 0,
+   "read_only": 1,
+   "reqd": 0,
    "search_index": 0
-  }, 
+  },
   {
-   "default": "Today", 
-   "fieldname": "opening_date", 
-   "fieldtype": "Date", 
-   "label": "Opening Date", 
-   "no_copy": 1, 
-   "oldfieldname": "opening_date", 
-   "oldfieldtype": "Date", 
-   "permlevel": 0, 
+   "default": "Today",
+   "fieldname": "opening_date",
+   "fieldtype": "Date",
+   "label": "Opening Date",
+   "no_copy": 1,
+   "oldfieldname": "opening_date",
+   "oldfieldtype": "Date",
+   "permlevel": 0,
    "read_only": 1
-  }, 
+  },
   {
-   "fieldname": "opening_time", 
-   "fieldtype": "Time", 
-   "label": "Opening Time", 
-   "no_copy": 1, 
-   "oldfieldname": "opening_time", 
-   "oldfieldtype": "Time", 
-   "permlevel": 0, 
+   "fieldname": "opening_time",
+   "fieldtype": "Time",
+   "label": "Opening Time",
+   "no_copy": 1,
+   "oldfieldname": "opening_time",
+   "oldfieldtype": "Time",
+   "permlevel": 0,
    "read_only": 1
-  }, 
+  },
   {
-   "fieldname": "company", 
-   "fieldtype": "Link", 
-   "label": "Company", 
-   "options": "Company", 
-   "permlevel": 0, 
-   "print_hide": 1, 
+   "fieldname": "company",
+   "fieldtype": "Link",
+   "label": "Company",
+   "options": "Company",
+   "permlevel": 0,
+   "print_hide": 1,
    "reqd": 0
-  }, 
+  },
   {
-   "depends_on": "eval:!doc.__islocal", 
-   "fieldname": "column_break1", 
-   "fieldtype": "Column Break", 
-   "oldfieldtype": "Column Break", 
-   "permlevel": 0, 
+   "depends_on": "eval:!doc.__islocal",
+   "fieldname": "column_break1",
+   "fieldtype": "Column Break",
+   "oldfieldtype": "Column Break",
+   "permlevel": 0,
    "read_only": 1
-  }, 
+  },
   {
-   "fieldname": "first_responded_on", 
-   "fieldtype": "Datetime", 
-   "label": "First Responded On", 
+   "fieldname": "first_responded_on",
+   "fieldtype": "Datetime",
+   "label": "First Responded On",
    "permlevel": 0
-  }, 
+  },
   {
-   "depends_on": "eval:!doc.__islocal", 
-   "fieldname": "resolution_date", 
-   "fieldtype": "Datetime", 
-   "in_filter": 0, 
-   "label": "Resolution Date", 
-   "no_copy": 1, 
-   "oldfieldname": "resolution_date", 
-   "oldfieldtype": "Date", 
-   "permlevel": 0, 
-   "read_only": 1, 
+   "depends_on": "eval:!doc.__islocal",
+   "fieldname": "resolution_date",
+   "fieldtype": "Datetime",
+   "in_filter": 0,
+   "label": "Resolution Date",
+   "no_copy": 1,
+   "oldfieldname": "resolution_date",
+   "oldfieldtype": "Date",
+   "permlevel": 0,
+   "read_only": 1,
    "search_index": 0
-  }, 
+  },
   {
-   "depends_on": "eval:!doc.__islocal", 
-   "fieldname": "resolution_details", 
-   "fieldtype": "Small Text", 
-   "label": "Resolution Details", 
-   "no_copy": 1, 
-   "oldfieldname": "resolution_details", 
-   "oldfieldtype": "Text", 
-   "permlevel": 0, 
+   "depends_on": "eval:!doc.__islocal",
+   "fieldname": "resolution_details",
+   "fieldtype": "Small Text",
+   "label": "Resolution Details",
+   "no_copy": 1,
+   "oldfieldname": "resolution_details",
+   "oldfieldtype": "Text",
+   "permlevel": 0,
    "read_only": 0
-  }, 
+  },
   {
-   "fieldname": "content_type", 
-   "fieldtype": "Data", 
-   "hidden": 1, 
-   "label": "Content Type", 
+   "fieldname": "content_type",
+   "fieldtype": "Data",
+   "hidden": 1,
+   "label": "Content Type",
    "permlevel": 0
-  }, 
+  },
   {
-   "fieldname": "communications", 
-   "fieldtype": "Table", 
-   "hidden": 1, 
-   "label": "Communications", 
-   "options": "Communication", 
-   "permlevel": 0, 
+   "fieldname": "communications",
+   "fieldtype": "Table",
+   "hidden": 1,
+   "label": "Communications",
+   "options": "Communication",
+   "permlevel": 0,
    "print_hide": 1
   }
- ], 
- "icon": "icon-ticket", 
- "idx": 1, 
- "modified": "2014-06-03 10:49:47.781578", 
- "modified_by": "Administrator", 
- "module": "Support", 
- "name": "Support Ticket", 
- "owner": "Administrator", 
+ ],
+ "icon": "icon-ticket",
+ "idx": 1,
+ "modified": "2014-06-03 10:49:47.781578",
+ "modified_by": "Administrator",
+ "module": "Support",
+ "name": "Support Ticket",
+ "owner": "Administrator",
  "permissions": [
   {
-   "amend": 0, 
-   "cancel": 0, 
-   "create": 1, 
-   "delete": 0, 
-   "email": 1, 
-   "permlevel": 0, 
-   "print": 1, 
-   "read": 1, 
-   "report": 1, 
-   "role": "Guest", 
-   "submit": 0, 
+   "amend": 0,
+   "create": 1,
+   "delete": 0,
+   "email": 1,
+   "permlevel": 0,
+   "print": 1,
+   "read": 1,
+   "report": 1,
+   "role": "Guest",
+   "submit": 0,
    "write": 1
-  }, 
+  },
   {
-   "amend": 0, 
-   "cancel": 0, 
-   "create": 1, 
-   "delete": 0, 
-   "email": 1, 
-   "permlevel": 0, 
-   "print": 1, 
-   "read": 1, 
-   "report": 1, 
-   "role": "Customer", 
-   "submit": 0, 
+   "amend": 0,
+   "apply_user_permissions": 1,
+   "create": 1,
+   "delete": 0,
+   "email": 1,
+   "permlevel": 0,
+   "print": 1,
+   "read": 1,
+   "report": 1,
+   "role": "Customer",
+   "submit": 0,
    "write": 1
-  }, 
+  },
   {
-   "amend": 0, 
-   "cancel": 0, 
-   "create": 1, 
-   "delete": 1, 
-   "email": 1, 
-   "permlevel": 0, 
-   "print": 1, 
-   "read": 1, 
-   "report": 1, 
-   "role": "Support Team", 
-   "submit": 0, 
+   "amend": 0,
+   "apply_user_permissions": 1,
+   "create": 1,
+   "delete": 1,
+   "email": 1,
+   "permlevel": 0,
+   "print": 1,
+   "read": 1,
+   "report": 1,
+   "role": "Support Team",
+   "submit": 0,
    "write": 1
   }
- ], 
- "search_fields": "status,customer,subject,raised_by", 
+ ],
+ "search_fields": "status,customer,subject,raised_by",
  "title_field": "subject"
-}
\ No newline at end of file
+}
diff --git a/erpnext/utilities/doctype/address/address.json b/erpnext/utilities/doctype/address/address.json
index d283392..3692b91 100644
--- a/erpnext/utilities/doctype/address/address.json
+++ b/erpnext/utilities/doctype/address/address.json
@@ -199,14 +199,14 @@
  "icon": "icon-map-marker", 
  "idx": 1, 
  "in_dialog": 0, 
- "modified": "2014-05-09 02:16:43.798644", 
+ "modified": "2014-05-27 03:49:07.273657", 
  "modified_by": "Administrator", 
  "module": "Utilities", 
  "name": "Address", 
  "owner": "Administrator", 
  "permissions": [
   {
-   "cancel": 0, 
+   "apply_user_permissions": 1, 
    "create": 1, 
    "delete": 0, 
    "email": 1, 
@@ -219,7 +219,7 @@
    "write": 1
   }, 
   {
-   "cancel": 0, 
+   "apply_user_permissions": 1, 
    "create": 1, 
    "delete": 0, 
    "email": 1, 
@@ -232,7 +232,7 @@
    "write": 1
   }, 
   {
-   "cancel": 0, 
+   "apply_user_permissions": 1, 
    "create": 1, 
    "delete": 0, 
    "email": 1, 
@@ -245,7 +245,7 @@
    "write": 1
   }, 
   {
-   "cancel": 0, 
+   "apply_user_permissions": 1, 
    "create": 1, 
    "delete": 0, 
    "email": 1, 
diff --git a/erpnext/utilities/doctype/contact/contact.json b/erpnext/utilities/doctype/contact/contact.json
index 6433136..fc5a721 100644
--- a/erpnext/utilities/doctype/contact/contact.json
+++ b/erpnext/utilities/doctype/contact/contact.json
@@ -199,14 +199,13 @@
  "idx": 1, 
  "in_create": 0, 
  "in_dialog": 0, 
- "modified": "2014-05-07 06:39:39.702149", 
+ "modified": "2014-05-27 03:49:08.789451", 
  "modified_by": "Administrator", 
  "module": "Utilities", 
  "name": "Contact", 
  "owner": "Administrator", 
  "permissions": [
   {
-   "cancel": 0, 
    "create": 1, 
    "delete": 1, 
    "email": 1, 
@@ -220,7 +219,6 @@
   }, 
   {
    "amend": 0, 
-   "cancel": 0, 
    "create": 1, 
    "delete": 1, 
    "email": 1, 
@@ -233,7 +231,6 @@
    "write": 1
   }, 
   {
-   "cancel": 0, 
    "create": 1, 
    "delete": 1, 
    "email": 1, 
@@ -246,7 +243,6 @@
    "write": 1
   }, 
   {
-   "cancel": 0, 
    "create": 1, 
    "delete": 0, 
    "email": 1, 
@@ -259,7 +255,6 @@
    "write": 1
   }, 
   {
-   "cancel": 0, 
    "create": 1, 
    "delete": 0, 
    "email": 1, 
@@ -272,7 +267,6 @@
    "write": 1
   }, 
   {
-   "cancel": 0, 
    "create": 1, 
    "delete": 0, 
    "email": 1, 
@@ -285,7 +279,6 @@
    "write": 1
   }, 
   {
-   "cancel": 0, 
    "create": 1, 
    "delete": 0, 
    "email": 1, 
@@ -298,7 +291,7 @@
    "write": 1
   }, 
   {
-   "cancel": 0, 
+   "apply_user_permissions": 1, 
    "create": 1, 
    "delete": 0, 
    "email": 1, 
@@ -311,7 +304,7 @@
    "write": 1
   }, 
   {
-   "cancel": 0, 
+   "apply_user_permissions": 1, 
    "create": 1, 
    "delete": 0, 
    "email": 1, 
@@ -324,7 +317,7 @@
    "write": 1
   }, 
   {
-   "cancel": 0, 
+   "apply_user_permissions": 1, 
    "create": 1, 
    "delete": 0, 
    "email": 1, 
@@ -337,7 +330,7 @@
    "write": 1
   }, 
   {
-   "cancel": 0, 
+   "apply_user_permissions": 1, 
    "create": 1, 
    "delete": 0, 
    "email": 1, 
diff --git a/erpnext/utilities/doctype/note/note.json b/erpnext/utilities/doctype/note/note.json
index a1cbd5b..2ee6d9a 100644
--- a/erpnext/utilities/doctype/note/note.json
+++ b/erpnext/utilities/doctype/note/note.json
@@ -1,68 +1,70 @@
 {
- "allow_rename": 1,
- "creation": "2013-05-24 13:41:00.000000",
- "description": "Note is a free page where users can share documents / notes",
- "docstatus": 0,
- "doctype": "DocType",
- "document_type": "Transaction",
+ "allow_rename": 1, 
+ "creation": "2013-05-24 13:41:00", 
+ "description": "Note is a free page where users can share documents / notes", 
+ "docstatus": 0, 
+ "doctype": "DocType", 
+ "document_type": "Transaction", 
  "fields": [
   {
-   "fieldname": "title",
-   "fieldtype": "Data",
-   "label": "Title",
-   "permlevel": 0,
+   "fieldname": "title", 
+   "fieldtype": "Data", 
+   "in_list_view": 1, 
+   "label": "Title", 
+   "permlevel": 0, 
    "print_hide": 1
-  },
+  }, 
   {
-   "description": "Help: To link to another record in the system, use \"#Form/Note/[Note Name]\" as the Link URL. (don't use \"http://\")",
-   "fieldname": "content",
-   "fieldtype": "Text Editor",
-   "in_list_view": 0,
-   "label": "Content",
+   "description": "Help: To link to another record in the system, use \"#Form/Note/[Note Name]\" as the Link URL. (don't use \"http://\")", 
+   "fieldname": "content", 
+   "fieldtype": "Text Editor", 
+   "in_list_view": 1, 
+   "label": "Content", 
    "permlevel": 0
-  },
+  }, 
   {
-   "fieldname": "share",
-   "fieldtype": "Section Break",
-   "label": "Share",
+   "fieldname": "share", 
+   "fieldtype": "Section Break", 
+   "label": "Share", 
    "permlevel": 0
-  },
+  }, 
   {
-   "description": "Everyone can read",
-   "fieldname": "public",
-   "fieldtype": "Check",
-   "label": "Public",
-   "permlevel": 0,
+   "description": "Everyone can read", 
+   "fieldname": "public", 
+   "fieldtype": "Check", 
+   "in_list_view": 1, 
+   "label": "Public", 
+   "permlevel": 0, 
    "print_hide": 1
-  },
+  }, 
   {
-   "fieldname": "share_with",
-   "fieldtype": "Table",
-   "label": "Share With",
-   "options": "Note User",
-   "permlevel": 0,
+   "fieldname": "share_with", 
+   "fieldtype": "Table", 
+   "label": "Share With", 
+   "options": "Note User", 
+   "permlevel": 0, 
    "print_hide": 1
   }
- ],
- "icon": "icon-file-text",
- "idx": 1,
- "modified": "2014-01-22 16:05:35.000000",
- "modified_by": "Administrator",
- "module": "Utilities",
- "name": "Note",
- "owner": "Administrator",
+ ], 
+ "icon": "icon-file-text", 
+ "idx": 1, 
+ "modified": "2014-05-27 03:49:13.934698", 
+ "modified_by": "Administrator", 
+ "module": "Utilities", 
+ "name": "Note", 
+ "owner": "Administrator", 
  "permissions": [
   {
-   "cancel": 0,
-   "create": 1,
-   "delete": 1,
-   "email": 1,
-   "permlevel": 0,
-   "print": 1,
-   "read": 1,
-   "role": "All",
+   "apply_user_permissions": 1, 
+   "create": 1, 
+   "delete": 1, 
+   "email": 1, 
+   "permlevel": 0, 
+   "print": 1, 
+   "read": 1, 
+   "role": "All", 
    "write": 1
   }
- ],
+ ], 
  "read_only_onload": 1
-}
+}
\ No newline at end of file