Merge branch 'master' into edge
diff --git a/home/page/latest_updates/latest_updates.js b/home/page/latest_updates/latest_updates.js
index 6bbfca1..f5561ab 100644
--- a/home/page/latest_updates/latest_updates.js
+++ b/home/page/latest_updates/latest_updates.js
@@ -1,6 +1,7 @@
 erpnext.updates = [
 	["10th January 2013", [
-		"New module pages with open item count and multi-lingual."
+		"Modules: New module pages with open item count and multi-lingual.",
+		"Permissions: Added new 'Report' permission. Only users with report permissions will be allowed.",
 	]],
 	["7th January 2013", [
 		"Language (backend): Integrated language libraries."]],
diff --git a/patches/january_2013/report_permission.py b/patches/january_2013/report_permission.py
new file mode 100644
index 0000000..5e69229
--- /dev/null
+++ b/patches/january_2013/report_permission.py
@@ -0,0 +1,10 @@
+import webnotes
+def execute():
+	webnotes.reload_doc("core", "doctype", "docperm")
+	webnotes.conn.sql("""update tabDocPerm set `report`=`write`""")
+	webnotes.conn.sql("""update tabDocPerm, tabDocType set tabDocPerm.`report`=0
+		where tabDocPerm.`parent` = tabDocType.name
+		and ifnull(tabDocType.issingle,0) = 1""")
+	webnotes.conn.sql("""update tabDocPerm, tabDocType set tabDocPerm.`submit`=0
+		where tabDocPerm.`parent` = tabDocType.name
+		and ifnull(tabDocType.is_submittable,0) = 0""")		
\ No newline at end of file
diff --git a/patches/patch_list.py b/patches/patch_list.py
index f9bb97c..52e1b02 100644
--- a/patches/patch_list.py
+++ b/patches/patch_list.py
@@ -582,4 +582,8 @@
 		'patch_module': 'patches.january_2013',
 		'patch_file': 'holiday_list_patch',
 	},
+	{
+		'patch_module': 'patches.january_2013',
+		'patch_file': 'report_permission',
+	},
 ]
\ No newline at end of file