cleanup and fixes
diff --git a/erpnext/accounts/doctype/sales_invoice/sales_invoice.js b/erpnext/accounts/doctype/sales_invoice/sales_invoice.js
index 47f1a5c..9b4306e 100644
--- a/erpnext/accounts/doctype/sales_invoice/sales_invoice.js
+++ b/erpnext/accounts/doctype/sales_invoice/sales_invoice.js
@@ -483,20 +483,22 @@
 frappe.ui.form.on('Sales Invoice Timesheet', {
 	time_sheet: function(frm, cdt, cdn){
 		var d = locals[cdt][cdn];
-		frappe.call({
-			method: "erpnext.projects.doctype.timesheet.timesheet.get_timesheet_data",
-			args: {
-				'name': d.time_sheet,
-				'project': frm.doc.project || null
-			},
-			callback: function(r, rt) {
-				if(r.message){
-					data = r.message;
-					frappe.model.set_value(cdt, cdn, "billing_hours", data.billing_hours);
-					frappe.model.set_value(cdt, cdn, "billing_amount", data.billing_amount);
-					frappe.model.set_value(cdt, cdn, "timesheet_detail", data.timesheet_detail);
+		if(d.time_sheet) {
+			frappe.call({
+				method: "erpnext.projects.doctype.timesheet.timesheet.get_timesheet_data",
+				args: {
+					'name': d.time_sheet,
+					'project': frm.doc.project || null
+				},
+				callback: function(r, rt) {
+					if(r.message){
+						data = r.message;
+						frappe.model.set_value(cdt, cdn, "billing_hours", data.billing_hours);
+						frappe.model.set_value(cdt, cdn, "billing_amount", data.billing_amount);
+						frappe.model.set_value(cdt, cdn, "timesheet_detail", data.timesheet_detail);
+					}
 				}
-			}
-		})
+			})
+		}
 	}
 })
diff --git a/erpnext/patches.txt b/erpnext/patches.txt
index f3905de..c7b61d4 100644
--- a/erpnext/patches.txt
+++ b/erpnext/patches.txt
@@ -340,6 +340,8 @@
 erpnext.patches.v7_1.add_field_for_task_dependent
 erpnext.patches.v7_0.repost_bin_qty_and_item_projected_qty
 erpnext.patches.v7_1.set_prefered_contact_email
-execute:frappe.db.sql("update `tabSingles` set value = 1 where field = 'unlink_payment_on_cancellation_of_invoice' and doctype = 'Accounts Settings'")
+execute:frappe.reload_doc('accounts', 'doctype', 'accounts_settings')
+execute:frappe.db.set_value("Accounts Settings", "Accounts Settings", "unlink_payment_on_cancellation_of_invoice", 0)
 execute:frappe.db.sql("update `tabStock Entry` set total_amount = null where purpose in('Repack', 'Manufacture')")
-erpnext.patches.v7_0.repost_gle_for_pi_with_update_stock #2016-11-01
\ No newline at end of file
+erpnext.patches.v7_0.repost_gle_for_pi_with_update_stock #2016-11-01
+erpnext.patches.v7_1.add_account_user_role_for_timesheet
\ No newline at end of file
diff --git a/erpnext/patches/v7_1/add_account_user_role_for_timesheet.py b/erpnext/patches/v7_1/add_account_user_role_for_timesheet.py
new file mode 100644
index 0000000..7372b0c
--- /dev/null
+++ b/erpnext/patches/v7_1/add_account_user_role_for_timesheet.py
@@ -0,0 +1,31 @@
+# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors
+# License: GNU General Public License v3. See license.txt
+
+from __future__ import unicode_literals
+import frappe
+
+def execute():
+	if not frappe.db.get_value('DocPerm', {'parent': 'Timesheet', 'role': 'Accounts User', 'permlevel': 1}):
+		doc = frappe.get_doc('DocType', 'Timesheet')
+		doc.append('permissions', {
+			'role': "Accounts User",
+			'permlevel': 0,
+			'read': 1,
+			'write': 1,
+			'create': 1,
+			'delete': 1,
+			'submit': 1,
+			'cancel': 1,
+			'amend': 1,
+			'report': 1,
+			'email': 1
+		})
+
+		doc.append('permissions', {
+			'role': "Accounts User",
+			'permlevel': 1,
+			'read': 1,
+			'write': 1
+		})
+
+		doc.save(ignore_permissions=True)
\ No newline at end of file
diff --git a/erpnext/projects/doctype/timesheet/timesheet.json b/erpnext/projects/doctype/timesheet/timesheet.json
index 18d153d..160e3b7 100644
--- a/erpnext/projects/doctype/timesheet/timesheet.json
+++ b/erpnext/projects/doctype/timesheet/timesheet.json
@@ -847,7 +847,7 @@
  "issingle": 0, 
  "istable": 0, 
  "max_attachments": 0, 
- "modified": "2016-11-03 16:06:32.259060", 
+ "modified": "2016-11-04 18:27:08.484033", 
  "modified_by": "Administrator", 
  "module": "Projects", 
  "name": "Timesheet", 
@@ -917,48 +917,6 @@
    "write": 1
   }, 
   {
-   "amend": 1, 
-   "apply_user_permissions": 0, 
-   "cancel": 1, 
-   "create": 1, 
-   "delete": 1, 
-   "email": 1, 
-   "export": 1, 
-   "if_owner": 0, 
-   "import": 0, 
-   "is_custom": 0, 
-   "permlevel": 0, 
-   "print": 1, 
-   "read": 1, 
-   "report": 1, 
-   "role": "Accounts User", 
-   "set_user_permissions": 0, 
-   "share": 1, 
-   "submit": 1, 
-   "write": 1
-  }, 
-  {
-   "amend": 0, 
-   "apply_user_permissions": 0, 
-   "cancel": 0, 
-   "create": 0, 
-   "delete": 0, 
-   "email": 1, 
-   "export": 1, 
-   "if_owner": 0, 
-   "import": 0, 
-   "is_custom": 0, 
-   "permlevel": 1, 
-   "print": 1, 
-   "read": 1, 
-   "report": 1, 
-   "role": "Accounts User", 
-   "set_user_permissions": 0, 
-   "share": 1, 
-   "submit": 0, 
-   "write": 1
-  }, 
-  {
    "amend": 0, 
    "apply_user_permissions": 0, 
    "cancel": 0, 
@@ -978,6 +936,48 @@
    "share": 0, 
    "submit": 0, 
    "write": 1
+  }, 
+  {
+   "amend": 1, 
+   "apply_user_permissions": 0, 
+   "cancel": 1, 
+   "create": 1, 
+   "delete": 1, 
+   "email": 1, 
+   "export": 0, 
+   "if_owner": 0, 
+   "import": 0, 
+   "is_custom": 0, 
+   "permlevel": 0, 
+   "print": 0, 
+   "read": 1, 
+   "report": 1, 
+   "role": "Accounts User", 
+   "set_user_permissions": 0, 
+   "share": 0, 
+   "submit": 1, 
+   "write": 1
+  }, 
+  {
+   "amend": 0, 
+   "apply_user_permissions": 0, 
+   "cancel": 0, 
+   "create": 0, 
+   "delete": 0, 
+   "email": 0, 
+   "export": 0, 
+   "if_owner": 0, 
+   "import": 0, 
+   "is_custom": 0, 
+   "permlevel": 1, 
+   "print": 0, 
+   "read": 1, 
+   "report": 0, 
+   "role": "Accounts User", 
+   "set_user_permissions": 0, 
+   "share": 0, 
+   "submit": 0, 
+   "write": 1
   }
  ], 
  "quick_entry": 0, 
diff --git a/erpnext/projects/doctype/timesheet/timesheet.py b/erpnext/projects/doctype/timesheet/timesheet.py
index 9e32b52..02e5f18 100644
--- a/erpnext/projects/doctype/timesheet/timesheet.py
+++ b/erpnext/projects/doctype/timesheet/timesheet.py
@@ -322,18 +322,7 @@
 @frappe.whitelist()
 def make_salary_slip(source_name, target_doc=None):
 	target = frappe.new_doc("Salary Slip")
-	set_missing_values(source_name, target)
-	
-	target.append("timesheets", get_mapped_doc("Timesheet", source_name, {
-		"Timesheet": {
-			"doctype": "Salary Slip Timesheet",
-			"field_map": {
-				"total_hours": "working_hours",
-				"name": "time_sheet"
-			},
-		}
-	}))
-	
+	set_missing_values(source_name, target)	
 	target.run_method("get_emp_and_leave_details")
 
 	return target
diff --git a/erpnext/selling/doctype/sales_order/sales_order.json b/erpnext/selling/doctype/sales_order/sales_order.json
index b59c066..888a231 100644
--- a/erpnext/selling/doctype/sales_order/sales_order.json
+++ b/erpnext/selling/doctype/sales_order/sales_order.json
@@ -372,7 +372,7 @@
    "in_list_view": 0, 
    "label": "Customer's Purchase Order", 
    "length": 0, 
-   "no_copy": 0, 
+   "no_copy": 1, 
    "oldfieldname": "po_no", 
    "oldfieldtype": "Data", 
    "permlevel": 0, 
@@ -403,7 +403,7 @@
    "in_list_view": 0, 
    "label": "Customer's Purchase Order Date", 
    "length": 0, 
-   "no_copy": 0, 
+   "no_copy": 1, 
    "oldfieldname": "po_date", 
    "oldfieldtype": "Date", 
    "permlevel": 0, 
@@ -3226,7 +3226,7 @@
  "issingle": 0, 
  "istable": 0, 
  "max_attachments": 0, 
- "modified": "2016-11-03 16:07:46.757630", 
+ "modified": "2016-11-05 08:09:08.921026", 
  "modified_by": "Administrator", 
  "module": "Selling", 
  "name": "Sales Order",