import, export and report permission in account and pricing rule
diff --git a/erpnext/accounts/doctype/account/account.json b/erpnext/accounts/doctype/account/account.json
index 05ac72f..cf9adc5 100644
--- a/erpnext/accounts/doctype/account/account.json
+++ b/erpnext/accounts/doctype/account/account.json
@@ -1,5 +1,6 @@
 {
  "allow_copy": 1, 
+ "allow_import": 1, 
  "allow_rename": 1, 
  "creation": "2013-01-30 12:49:46", 
  "description": "Heads (or groups) against which Accounting Entries are made and balances are maintained.", 
@@ -199,7 +200,7 @@
  "icon": "icon-money", 
  "idx": 1, 
  "in_create": 1, 
- "modified": "2014-05-07 05:33:30.500961", 
+ "modified": "2014-05-12 17:03:19.733139", 
  "modified_by": "Administrator", 
  "module": "Accounts", 
  "name": "Account", 
@@ -211,6 +212,8 @@
    "create": 1, 
    "delete": 1, 
    "email": 1, 
+   "export": 1, 
+   "import": 1, 
    "permlevel": 0, 
    "print": 1, 
    "read": 1, 
@@ -224,9 +227,9 @@
    "cancel": 0, 
    "create": 0, 
    "delete": 0, 
-   "email": 0, 
+   "email": 1, 
    "permlevel": 0, 
-   "print": 0, 
+   "print": 1, 
    "read": 1, 
    "report": 1, 
    "role": "Auditor", 
@@ -238,9 +241,9 @@
    "cancel": 0, 
    "create": 0, 
    "delete": 0, 
-   "email": 0, 
+   "email": 1, 
    "permlevel": 0, 
-   "print": 0, 
+   "print": 1, 
    "read": 1, 
    "report": 1, 
    "role": "Sales User", 
@@ -252,9 +255,9 @@
    "cancel": 0, 
    "create": 0, 
    "delete": 0, 
-   "email": 0, 
+   "email": 1, 
    "permlevel": 0, 
-   "print": 0, 
+   "print": 1, 
    "read": 1, 
    "report": 1, 
    "role": "Purchase User", 
@@ -262,11 +265,6 @@
    "write": 0
   }, 
   {
-   "permlevel": 0, 
-   "read": 1, 
-   "role": "Material User"
-  }, 
-  {
    "amend": 0, 
    "cancel": 0, 
    "create": 0, 
@@ -284,8 +282,8 @@
    "create": 1, 
    "delete": 1, 
    "email": 1, 
-   "export": 0, 
-   "import": 0, 
+   "export": 1, 
+   "import": 1, 
    "permlevel": 0, 
    "print": 1, 
    "read": 1, 
diff --git a/erpnext/accounts/doctype/pricing_rule/pricing_rule.json b/erpnext/accounts/doctype/pricing_rule/pricing_rule.json
index 2933ffa..baefde2 100644
--- a/erpnext/accounts/doctype/pricing_rule/pricing_rule.json
+++ b/erpnext/accounts/doctype/pricing_rule/pricing_rule.json
@@ -1,4 +1,5 @@
 {
+ "allow_import": 1, 
  "autoname": "PRULE.#####", 
  "creation": "2014-02-21 15:02:51", 
  "docstatus": 0, 
@@ -202,7 +203,7 @@
  "icon": "icon-gift", 
  "idx": 1, 
  "istable": 0, 
- "modified": "2014-05-05 11:09:38.244111", 
+ "modified": "2014-05-12 16:24:52.005162", 
  "modified_by": "Administrator", 
  "module": "Accounts", 
  "name": "Pricing Rule", 
@@ -211,16 +212,23 @@
   {
    "create": 1, 
    "delete": 1, 
+   "export": 0, 
+   "import": 0, 
    "permlevel": 0, 
    "read": 1, 
+   "report": 1, 
    "role": "Accounts Manager", 
    "write": 1
   }, 
   {
    "create": 1, 
    "delete": 1, 
+   "export": 0, 
+   "import": 0, 
    "permlevel": 0, 
+   "print": 0, 
    "read": 1, 
+   "report": 1, 
    "role": "Sales Manager", 
    "write": 1
   }, 
@@ -229,6 +237,7 @@
    "delete": 1, 
    "permlevel": 0, 
    "read": 1, 
+   "report": 1, 
    "role": "Purchase Manager", 
    "write": 1
   }, 
@@ -237,16 +246,23 @@
    "delete": 1, 
    "permlevel": 0, 
    "read": 1, 
+   "report": 1, 
    "role": "Website Manager", 
    "write": 1
   }, 
   {
    "create": 1, 
    "delete": 1, 
+   "export": 1, 
+   "import": 1, 
    "permlevel": 0, 
    "read": 1, 
+   "report": 1, 
+   "restrict": 1, 
    "role": "System Manager", 
    "write": 1
   }
- ]
+ ], 
+ "sort_field": "modified", 
+ "sort_order": "DESC"
 }
\ No newline at end of file
diff --git a/erpnext/accounts/report/accounts_payable/accounts_payable.json b/erpnext/accounts/report/accounts_payable/accounts_payable.json
index 82c9337..fb210bd 100644
--- a/erpnext/accounts/report/accounts_payable/accounts_payable.json
+++ b/erpnext/accounts/report/accounts_payable/accounts_payable.json
@@ -1,11 +1,11 @@
 {
  "add_total_row": 1, 
- "creation": "2013-04-22 16:16:03.000000", 
+ "creation": "2013-04-22 16:16:03", 
  "docstatus": 0, 
  "doctype": "Report", 
  "idx": 1, 
  "is_standard": "Yes", 
- "modified": "2014-03-07 15:30:27.000000", 
+ "modified": "2014-05-12 17:18:09.605534", 
  "modified_by": "Administrator", 
  "module": "Accounts", 
  "name": "Accounts Payable", 
diff --git a/erpnext/patches.txt b/erpnext/patches.txt
index 57b7599..f967363 100644
--- a/erpnext/patches.txt
+++ b/erpnext/patches.txt
@@ -1,42 +1,43 @@
 execute:import unidecode # new requirement
 
-erpnext.patches.4_0.validate_v3_patch
-erpnext.patches.4_0.update_user_properties
-erpnext.patches.4_0.move_warehouse_user_to_restrictions
-erpnext.patches.4_0.new_permissions
-erpnext.patches.4_0.update_incharge_name_to_sales_person_in_maintenance_schedule
+erpnext.patches.v4_0.validate_v3_patch
+execute:frappe.db.sql("""update `tabPatch Log` set patch=replace(patch, '4_0', 'v4_0')""")
+erpnext.patches.v4_0.update_user_properties
+erpnext.patches.v4_0.move_warehouse_user_to_restrictions
+erpnext.patches.v4_0.new_permissions
+erpnext.patches.v4_0.update_incharge_name_to_sales_person_in_maintenance_schedule
 execute:frappe.reload_doc('accounts', 'doctype', 'sales_invoice') # 2014-01-29
 execute:frappe.reload_doc('selling', 'doctype', 'sales_order') # 2014-01-29
 execute:frappe.reload_doc('selling', 'doctype', 'quotation') # 2014-01-29
 execute:frappe.reload_doc('stock', 'doctype', 'delivery_note') # 2014-01-29
-erpnext.patches.4_0.reload_sales_print_format
+erpnext.patches.v4_0.reload_sales_print_format
 execute:frappe.reload_doc('accounts', 'doctype', 'purchase_invoice') # 2014-01-29
 execute:frappe.reload_doc('buying', 'doctype', 'purchase_order') # 2014-01-29
 execute:frappe.reload_doc('buying', 'doctype', 'supplier_quotation') # 2014-01-29
 execute:frappe.reload_doc('stock', 'doctype', 'purchase_receipt') # 2014-01-29
-erpnext.patches.4_0.reload_purchase_print_format
+erpnext.patches.v4_0.reload_purchase_print_format
 execute:frappe.reload_doc('accounts', 'doctype', 'pos_setting') # 2014-01-29
 execute:frappe.reload_doc('selling', 'doctype', 'customer') # 2014-01-29
 execute:frappe.reload_doc('buying', 'doctype', 'supplier') # 2014-01-29
-erpnext.patches.4_0.map_charge_to_taxes_and_charges
+erpnext.patches.v4_0.map_charge_to_taxes_and_charges
 execute:frappe.reload_doc('support', 'doctype', 'newsletter') # 2014-01-31
 execute:frappe.reload_doc('hr', 'doctype', 'employee') # 2014-02-03
 execute:frappe.db.sql("update tabPage set module='Core' where name='Setup'")
-erpnext.patches.4_0.fields_to_be_renamed
-erpnext.patches.4_0.rename_sitemap_to_route
-erpnext.patches.4_0.fix_contact_address
-erpnext.patches.4_0.customer_discount_to_pricing_rule
+erpnext.patches.v4_0.fields_to_be_renamed
+erpnext.patches.v4_0.rename_sitemap_to_route
+erpnext.patches.v4_0.fix_contact_address
+erpnext.patches.v4_0.customer_discount_to_pricing_rule
 execute:frappe.db.sql("""delete from `tabWebsite Item Group` where ifnull(item_group, '')=''""")
-erpnext.patches.4_0.remove_module_home_pages
-erpnext.patches.4_0.split_email_settings
-erpnext.patches.4_0.fix_employee_user_id
-erpnext.patches.4_0.import_country_codes
-erpnext.patches.4_0.countrywise_coa
+erpnext.patches.v4_0.remove_module_home_pages
+erpnext.patches.v4_0.split_email_settings
+erpnext.patches.v4_0.fix_employee_user_id
+erpnext.patches.v4_0.import_country_codes
+erpnext.patches.v4_0.countrywise_coa
 execute:frappe.delete_doc("DocType", "MIS Control")
 execute:frappe.delete_doc("Page", "Financial Statements")
 execute:frappe.delete_doc("DocType", "Stock Ledger")
 execute:frappe.db.sql("update `tabJournal Voucher` set voucher_type='Journal Entry' where ifnull(voucher_type, '')=''")
 execute:frappe.delete_doc("DocType", "Grade")
-erpnext.patches.4_0.remove_india_specific_fields
+erpnext.patches.v4_0.remove_india_specific_fields
 execute:frappe.delete_doc_if_exists("DocType", "Warehouse User")
 execute:frappe.db.sql("delete from `tabWebsite Item Group` where ifnull(item_group, '')=''")
diff --git a/erpnext/stock/report/serial_no_status/serial_no_status.json b/erpnext/stock/report/serial_no_status/serial_no_status.json
index 047259c..a123033 100644
--- a/erpnext/stock/report/serial_no_status/serial_no_status.json
+++ b/erpnext/stock/report/serial_no_status/serial_no_status.json
@@ -1,11 +1,11 @@
 {
- "creation": "2013-01-14 10:52:58.000000", 
+ "creation": "2013-01-14 10:52:58", 
  "docstatus": 0, 
  "doctype": "Report", 
  "idx": 1, 
  "is_standard": "Yes", 
- "json": "{\"filters\":[],\"columns\":[[\"name\",\"Serial No\"],[\"item_code\",\"Serial No\"],[\"warehouse\",\"Serial No\"],[\"status\",\"Serial No\"],[\"item_name\",\"Serial No\"],[\"description\",\"Serial No\"],[\"item_group\",\"Serial No\"],[\"brand\",\"Serial No\"],[\"purchase_document_no\",\"Serial No\"],[\"purchase_date\",\"Serial No\"],[\"customer\",\"Serial No\"],[\"customer_name\",\"Serial No\"],[\"purchase_rate\",\"Serial No\"],[\"delivery_document_no\",\"Serial No\"],[\"delivery_date\",\"Serial No\"],[\"supplier\",\"Serial No\"],[\"supplier_name\",\"Serial No\"]],\"sort_by\":\"Serial No.name\",\"sort_order\":\"desc\",\"sort_by_next\":\"\",\"sort_order_next\":\"desc\"}", 
- "modified": "2014-03-07 15:30:27.000000", 
+ "json": "{\"sort_by\": \"Serial No.name\", \"sort_order\": \"desc\", \"sort_by_next\": \"\", \"filters\": [], \"sort_order_next\": \"desc\", \"columns\": [[\"name\", \"Serial No\"], [\"item_code\", \"Serial No\"], [\"warehouse\", \"Serial No\"], [\"status\", \"Serial No\"], [\"item_name\", \"Serial No\"], [\"description\", \"Serial No\"], [\"item_group\", \"Serial No\"], [\"brand\", \"Serial No\"], [\"purchase_document_no\", \"Serial No\"], [\"purchase_date\", \"Serial No\"], [\"customer\", \"Serial No\"], [\"customer_name\", \"Serial No\"], [\"purchase_rate\", \"Serial No\"], [\"delivery_document_no\", \"Serial No\"], [\"delivery_date\", \"Serial No\"], [\"supplier\", \"Serial No\"], [\"supplier_name\", \"Serial No\"]]}", 
+ "modified": "2014-05-12 17:39:07.549646", 
  "modified_by": "Administrator", 
  "module": "Stock", 
  "name": "Serial No Status",