added page permissions, modified report listing links
diff --git a/accounts/page/accounts_browser/accounts_browser.txt b/accounts/page/accounts_browser/accounts_browser.txt
index 70652e0..d3e98db 100644
--- a/accounts/page/accounts_browser/accounts_browser.txt
+++ b/accounts/page/accounts_browser/accounts_browser.txt
@@ -3,42 +3,47 @@
 
 	# These values are common in all dictionaries
 	{
-		'creation': '2010-12-14 10:23:28',
-		'docstatus': 0,
-		'modified': '2010-12-29 12:57:23',
-		'modified_by': 'Administrator',
-		'owner': 'Administrator'
+		u'creation': '2012-06-14 15:07:28',
+		u'docstatus': 0,
+		u'modified': '2012-10-04 16:57:27',
+		u'modified_by': u'Administrator',
+		u'owner': u'Administrator'
 	},
 
 	# These values are common for all Page
 	{
-		'doctype': 'Page',
-		'module': 'Accounts',
-		'name': '__common__',
-		'page_name': 'Accounts Browser',
+		u'doctype': u'Page',
+		'module': u'Accounts',
+		u'name': u'__common__',
+		'page_name': u'Accounts Browser',
 		'show_in_menu': 0,
-		'standard': 'Yes'
+		'standard': u'Yes'
 	},
 
 	# These values are common for all Page Role
 	{
-		'doctype': 'Page Role',
-		'idx': 1,
-		'name': '__common__',
-		'parent': 'Accounts Browser',
-		'parentfield': 'roles',
-		'parenttype': 'Page',
-		'role': 'Accounts User'
+		u'doctype': u'Page Role',
+		u'name': u'__common__',
+		'parent': u'Accounts Browser',
+		'parentfield': u'roles',
+		'parenttype': u'Page'
 	},
 
 	# Page, Accounts Browser
 	{
-		'doctype': 'Page',
-		'name': 'Accounts Browser'
+		u'doctype': u'Page',
+		u'name': u'Accounts Browser'
 	},
 
 	# Page Role
 	{
-		'doctype': 'Page Role'
+		u'doctype': u'Page Role',
+		'role': u'Accounts User'
+	},
+
+	# Page Role
+	{
+		u'doctype': u'Page Role',
+		'role': u'Accounts Manager'
 	}
 ]
\ No newline at end of file
diff --git a/accounts/page/accounts_home/accounts_home.html b/accounts/page/accounts_home/accounts_home.html
index db87a49..06c645b 100644
--- a/accounts/page/accounts_home/accounts_home.html
+++ b/accounts/page/accounts_home/accounts_home.html
@@ -12,23 +12,29 @@
 			<p class="help">Bills raised by Suppliers</p>
 		</div>
 		<div style="width: 48%; float: right;">
-			<h4><a href="#!Accounts Browser/Account" data-role="Accounts Manager, Accounts User">Chart of Accounts</a></h4>
+			<h4><a href="#!Accounts Browser/Account" 
+				data-role="Accounts Manager, Accounts User">Chart of Accounts</a></h4>
 			<p class="help">Structure of books of accounts</p>
 			<br>
 			<h4><a href="#!Accounts Browser/Cost Center">Chart of Cost Centers</a></h4>
 			<p class="help">Structure cost centers</p>
 			<br>
-			<h4><a href="#general-ledger" data-role="Analytics">General Ledger</a>
+			<h4><a href="#general-ledger" 
+				data-role="Analytics, Accounts Manager, Accounts User">
+					General Ledger</a>
 				<span style="background-color: #fed; font-weight: normal; font-size: 80%">beta</span>
 			</h4>
 			<p class="help">General Ledger Report</p>
 			<br>
-			<h4><a href="#trial-balance" data-role="Analytics">Trial Balance</a>
+			<h4><a href="#trial-balance"
+				data-role="Analytics, Accounts Manager, Accounts User">Trial Balance</a>
 				<span style="background-color: #fed; font-weight: normal; font-size: 80%">beta</span>
 			</h4>
 			<p class="help">Tree view of all Account balances</p>
 			<br>
-			<h4><a href="#financial-analytics" data-role="Analytics">Financial Analytics</a>
+			<h4><a href="#financial-analytics" 
+				data-role="Analytics, Accounts Manager, Accounts User">
+					Financial Analytics</a>
 				<span style="background-color: #fed; font-weight: normal; font-size: 80%">beta</span>
 			</h4>
 			<p class="help">Visual representation of financial trends</p>
@@ -64,12 +70,13 @@
 							href="#!Form/Sales and Purchase Return Tool/Sales and Purchase Return Tool">Sales or Purchase Returns</a>
 					</div>
 					<div class="section-item">
-						<a class="section-link" data-role="Analytics"
+						<a class="section-link"
 							title = "Analyze Sales and Purchase trends and slice them based on item, customer, groups etc"
 							href="#!Report/Profile/Trend Analyzer">Trend Analyzer</a>
 					</div>
 					<div class="section-item">
-						<a class="section-link" data-role="Accounts Manager"
+						<a class="section-link" 
+							data-role="Accounts Manager, Accounts User"
 							title = "Check your Balance Sheet and Profit & Loss Statement"
 							href="#!Financial Statements">Financial Statements</a>
 					</div>
diff --git a/accounts/page/accounts_home/accounts_home.txt b/accounts/page/accounts_home/accounts_home.txt
index 5cbceff..61730ae 100644
--- a/accounts/page/accounts_home/accounts_home.txt
+++ b/accounts/page/accounts_home/accounts_home.txt
@@ -3,26 +3,47 @@
 
 	# These values are common in all dictionaries
 	{
-		'creation': '2012-02-21 13:23:08',
-		'docstatus': 0,
-		'modified': '2012-02-21 13:23:08',
-		'modified_by': u'Administrator',
-		'owner': u'Administrator'
+		u'creation': '2012-06-14 15:07:28',
+		u'docstatus': 0,
+		u'modified': '2012-10-04 16:58:11',
+		u'modified_by': u'Administrator',
+		u'owner': u'Administrator'
 	},
 
 	# These values are common for all Page
 	{
-		'doctype': 'Page',
+		u'doctype': u'Page',
 		'module': u'Accounts',
-		'name': '__common__',
+		u'name': u'__common__',
 		'page_name': u'accounts-home',
 		'standard': u'Yes',
 		'title': u'Accounts Home'
 	},
 
+	# These values are common for all Page Role
+	{
+		u'doctype': u'Page Role',
+		u'name': u'__common__',
+		'parent': u'accounts-home',
+		'parentfield': u'roles',
+		'parenttype': u'Page'
+	},
+
 	# Page, accounts-home
 	{
-		'doctype': 'Page',
-		'name': u'accounts-home'
+		u'doctype': u'Page',
+		u'name': u'accounts-home'
+	},
+
+	# Page Role
+	{
+		u'doctype': u'Page Role',
+		'role': u'Accounts Manager'
+	},
+
+	# Page Role
+	{
+		u'doctype': u'Page Role',
+		'role': u'Accounts User'
 	}
 ]
\ No newline at end of file
diff --git a/accounts/page/financial_analytics/financial_analytics.txt b/accounts/page/financial_analytics/financial_analytics.txt
index 834503d..b02144f 100644
--- a/accounts/page/financial_analytics/financial_analytics.txt
+++ b/accounts/page/financial_analytics/financial_analytics.txt
@@ -3,9 +3,9 @@
 
 	# These values are common in all dictionaries
 	{
-		u'creation': '2012-09-17 13:46:47',
+		u'creation': '2012-09-18 11:05:48',
 		u'docstatus': 0,
-		u'modified': '2012-09-17 13:46:47',
+		u'modified': '2012-10-04 17:02:43',
 		u'modified_by': u'Administrator',
 		u'owner': u'Administrator'
 	},
@@ -20,9 +20,36 @@
 		'title': u'Financial Analytics'
 	},
 
+	# These values are common for all Page Role
+	{
+		u'doctype': u'Page Role',
+		u'name': u'__common__',
+		'parent': u'financial-analytics',
+		'parentfield': u'roles',
+		'parenttype': u'Page'
+	},
+
 	# Page, financial-analytics
 	{
 		u'doctype': u'Page',
 		u'name': u'financial-analytics'
+	},
+
+	# Page Role
+	{
+		u'doctype': u'Page Role',
+		'role': u'Analytics'
+	},
+
+	# Page Role
+	{
+		u'doctype': u'Page Role',
+		'role': u'Accounts Manager'
+	},
+
+	# Page Role
+	{
+		u'doctype': u'Page Role',
+		'role': u'Accounts User'
 	}
 ]
\ No newline at end of file
diff --git a/accounts/page/financial_statements/financial_statements.txt b/accounts/page/financial_statements/financial_statements.txt
index 6f64c1b..ba212fc 100644
--- a/accounts/page/financial_statements/financial_statements.txt
+++ b/accounts/page/financial_statements/financial_statements.txt
@@ -3,56 +3,47 @@
 
 	# These values are common in all dictionaries
 	{
-		'creation': '2010-10-12 15:19:32',
-		'docstatus': 0,
-		'modified': '2011-01-03 17:32:30',
-		'modified_by': 'Administrator',
-		'owner': 'Administrator'
+		u'creation': '2012-06-14 15:07:28',
+		u'docstatus': 0,
+		u'modified': '2012-10-04 17:04:05',
+		u'modified_by': u'Administrator',
+		u'owner': u'Administrator'
 	},
 
 	# These values are common for all Page
 	{
-		'doctype': 'Page',
-		'module': 'Accounts',
-		'name': '__common__',
-		'page_name': 'Financial Statements',
+		u'doctype': u'Page',
+		'module': u'Accounts',
+		u'name': u'__common__',
+		'page_name': u'Financial Statements',
 		'show_in_menu': 0,
-		'standard': 'Yes'
+		'standard': u'Yes'
 	},
 
 	# These values are common for all Page Role
 	{
-		'doctype': 'Page Role',
-		'name': '__common__',
-		'parent': 'Financial Statements',
-		'parentfield': 'roles',
-		'parenttype': 'Page'
+		u'doctype': u'Page Role',
+		u'name': u'__common__',
+		'parent': u'Financial Statements',
+		'parentfield': u'roles',
+		'parenttype': u'Page'
 	},
 
 	# Page, Financial Statements
 	{
-		'doctype': 'Page',
-		'name': 'Financial Statements'
+		u'doctype': u'Page',
+		u'name': u'Financial Statements'
 	},
 
 	# Page Role
 	{
-		'doctype': 'Page Role',
-		'idx': 1,
-		'role': 'Accounts User'
+		u'doctype': u'Page Role',
+		'role': u'Accounts User'
 	},
 
 	# Page Role
 	{
-		'doctype': 'Page Role',
-		'idx': 2,
-		'role': 'Administrator'
-	},
-
-	# Page Role
-	{
-		'doctype': 'Page Role',
-		'idx': 3,
-		'role': 'Accounts Manager'
+		u'doctype': u'Page Role',
+		'role': u'Accounts Manager'
 	}
 ]
\ No newline at end of file
diff --git a/accounts/page/general_ledger/general_ledger.txt b/accounts/page/general_ledger/general_ledger.txt
index c57ff0f..067f2f0 100644
--- a/accounts/page/general_ledger/general_ledger.txt
+++ b/accounts/page/general_ledger/general_ledger.txt
@@ -3,26 +3,53 @@
 
 	# These values are common in all dictionaries
 	{
-		'creation': '2012-09-13 13:50:13',
-		'docstatus': 0,
-		'modified': '2012-09-13 13:50:13',
-		'modified_by': u'Administrator',
-		'owner': u'Administrator'
+		u'creation': '2012-09-14 11:25:48',
+		u'docstatus': 0,
+		u'modified': '2012-10-04 17:00:09',
+		u'modified_by': u'Administrator',
+		u'owner': u'Administrator'
 	},
 
 	# These values are common for all Page
 	{
-		'doctype': 'Page',
+		u'doctype': u'Page',
 		'module': u'Accounts',
-		'name': '__common__',
+		u'name': u'__common__',
 		'page_name': u'general-ledger',
 		'standard': u'Yes',
 		'title': u'General Ledger'
 	},
 
+	# These values are common for all Page Role
+	{
+		u'doctype': u'Page Role',
+		u'name': u'__common__',
+		'parent': u'general-ledger',
+		'parentfield': u'roles',
+		'parenttype': u'Page'
+	},
+
 	# Page, general-ledger
 	{
-		'doctype': 'Page',
-		'name': u'general-ledger'
+		u'doctype': u'Page',
+		u'name': u'general-ledger'
+	},
+
+	# Page Role
+	{
+		u'doctype': u'Page Role',
+		'role': u'Analytics'
+	},
+
+	# Page Role
+	{
+		u'doctype': u'Page Role',
+		'role': u'Accounts Manager'
+	},
+
+	# Page Role
+	{
+		u'doctype': u'Page Role',
+		'role': u'Accounts User'
 	}
 ]
\ No newline at end of file
diff --git a/accounts/page/trial_balance/trial_balance.txt b/accounts/page/trial_balance/trial_balance.txt
index 88b91d6..9bbd513 100644
--- a/accounts/page/trial_balance/trial_balance.txt
+++ b/accounts/page/trial_balance/trial_balance.txt
@@ -3,9 +3,9 @@
 
 	# These values are common in all dictionaries
 	{
-		u'creation': '2012-09-17 13:47:16',
+		u'creation': '2012-09-18 11:05:48',
 		u'docstatus': 0,
-		u'modified': '2012-09-17 13:47:16',
+		u'modified': '2012-10-04 17:01:47',
 		u'modified_by': u'Administrator',
 		u'owner': u'Administrator'
 	},
@@ -20,9 +20,36 @@
 		'title': u'Trial Balance'
 	},
 
+	# These values are common for all Page Role
+	{
+		u'doctype': u'Page Role',
+		u'name': u'__common__',
+		'parent': u'trial-balance',
+		'parentfield': u'roles',
+		'parenttype': u'Page'
+	},
+
 	# Page, trial-balance
 	{
 		u'doctype': u'Page',
 		u'name': u'trial-balance'
+	},
+
+	# Page Role
+	{
+		u'doctype': u'Page Role',
+		'role': u'Analytics'
+	},
+
+	# Page Role
+	{
+		u'doctype': u'Page Role',
+		'role': u'Accounts Manager'
+	},
+
+	# Page Role
+	{
+		u'doctype': u'Page Role',
+		'role': u'Accounts User'
 	}
 ]
\ No newline at end of file
diff --git a/accounts/page/voucher_import_tool/voucher_import_tool.txt b/accounts/page/voucher_import_tool/voucher_import_tool.txt
index 658ef00..ab4b9bd 100644
--- a/accounts/page/voucher_import_tool/voucher_import_tool.txt
+++ b/accounts/page/voucher_import_tool/voucher_import_tool.txt
@@ -3,9 +3,9 @@
 
 	# These values are common in all dictionaries
 	{
-		u'creation': '2012-09-26 15:21:57',
+		u'creation': '2012-10-02 18:51:49',
 		u'docstatus': 0,
-		u'modified': '2012-09-26 15:21:57',
+		u'modified': '2012-10-04 17:04:18',
 		u'modified_by': u'Administrator',
 		u'owner': u'Administrator'
 	},
@@ -20,9 +20,24 @@
 		'title': u'Voucher Import Tool'
 	},
 
+	# These values are common for all Page Role
+	{
+		u'doctype': u'Page Role',
+		u'name': u'__common__',
+		'parent': u'voucher-import-tool',
+		'parentfield': u'roles',
+		'parenttype': u'Page',
+		'role': u'Accounts Manager'
+	},
+
 	# Page, voucher-import-tool
 	{
 		u'doctype': u'Page',
 		u'name': u'voucher-import-tool'
+	},
+
+	# Page Role
+	{
+		u'doctype': u'Page Role'
 	}
 ]
\ No newline at end of file
diff --git a/buying/page/buying_home/buying_home.html b/buying/page/buying_home/buying_home.html
index 384a77e..9ec7b75 100644
--- a/buying/page/buying_home/buying_home.html
+++ b/buying/page/buying_home/buying_home.html
@@ -24,7 +24,8 @@
 			<h4><a href="#!List/Address">Address</a></h4>
 			<p class="help">Address Master</p>
 			<br>
-			<h4><a href="#purchase-analytics" data-role="Analytics">Purchase Analytics</a>
+			<h4><a href="#purchase-analytics" data-role="Analytics, Purchase Manager">
+					Purchase Analytics</a>
 				<span style="background-color: #fed; font-weight: normal; font-size: 80%">beta</span>
 			</h4>
 			<p class="help">Purchase trends based on Purchase Invoice</p>
@@ -51,6 +52,13 @@
 					</div>
 					<div class="section-item">
 						<a class="section-link" 
+							title = "Tree of item classification"
+							href="#!Sales Browser/Item Group"
+							data-role="Purchase Manager, Purchase Master Manager
+								Accounts Manager">Item Group</a>
+					</div>
+					<div class="section-item">
+						<a class="section-link" 
 							title = "Helper for managing return of goods (sales or purchase)"
 							href="#!Form/Sales and Purchase Return Tool/Sales and Purchase Return Tool">Purchase Returns</a>
 					</div>
diff --git a/buying/page/purchase_analytics/purchase_analytics.txt b/buying/page/purchase_analytics/purchase_analytics.txt
index 71d1c9b..b0232ed 100644
--- a/buying/page/purchase_analytics/purchase_analytics.txt
+++ b/buying/page/purchase_analytics/purchase_analytics.txt
@@ -3,9 +3,9 @@
 
 	# These values are common in all dictionaries
 	{
-		u'creation': '2012-09-21 15:21:10',
+		u'creation': '2012-09-21 20:15:16',
 		u'docstatus': 0,
-		u'modified': '2012-09-21 15:21:10',
+		u'modified': '2012-10-04 17:24:17',
 		u'modified_by': u'Administrator',
 		u'owner': u'Administrator'
 	},
@@ -20,9 +20,30 @@
 		'title': u'Purchase Analytics'
 	},
 
+	# These values are common for all Page Role
+	{
+		u'doctype': u'Page Role',
+		u'name': u'__common__',
+		'parent': u'purchase-analytics',
+		'parentfield': u'roles',
+		'parenttype': u'Page'
+	},
+
 	# Page, purchase-analytics
 	{
 		u'doctype': u'Page',
 		u'name': u'purchase-analytics'
+	},
+
+	# Page Role
+	{
+		u'doctype': u'Page Role',
+		'role': u'Analytics'
+	},
+
+	# Page Role
+	{
+		u'doctype': u'Page Role',
+		'role': u'Purchase Manager'
 	}
 ]
\ No newline at end of file
diff --git a/projects/page/projects_home/projects_home.html b/projects/page/projects_home/projects_home.html
index fed846c..d69f0af 100644
--- a/projects/page/projects_home/projects_home.html
+++ b/projects/page/projects_home/projects_home.html
@@ -12,7 +12,7 @@
 			<p class="help">Timesheet for tasks</p>
 		</div>
 		<div style="width: 48%; float: right;">
-			<h4><a href="#!Projects">Gantt Chart</a></h4>
+			<h4><a href="#!Projects" data-role="Projects User">Gantt Chart</a></h4>
 			<p class="help">Gantt chart of all tasks</p>
 		</div>
 		<div style="clear: both"></div>
diff --git a/public/js/modules.js b/public/js/modules.js
index 9b554e9..772a561 100644
--- a/public/js/modules.js
+++ b/public/js/modules.js
@@ -170,7 +170,8 @@
 		parent: $parent2,
 		method: 'utilities.get_report_list',
 		render_row: function(row, data) {
-			$(row).html(repl('<a href="#!Report2/%(ref_doctype)s/%(name)s" \
+			data.report_type = data.is_query_report ? "query-report" : "Report2"			
+			$(row).html(repl('<a href="#!%(report_type)s/%(ref_doctype)s/%(name)s" \
 				data-doctype="%(ref_doctype)s">\
 				%(name)s</a>', data))
 		},
diff --git a/selling/page/sales_analytics/sales_analytics.txt b/selling/page/sales_analytics/sales_analytics.txt
index 3782df6..412d3e9 100644
--- a/selling/page/sales_analytics/sales_analytics.txt
+++ b/selling/page/sales_analytics/sales_analytics.txt
@@ -3,9 +3,9 @@
 
 	# These values are common in all dictionaries
 	{
-		u'creation': '2012-09-21 12:06:14',
+		u'creation': '2012-09-21 20:15:12',
 		u'docstatus': 0,
-		u'modified': '2012-09-21 12:06:14',
+		u'modified': '2012-10-04 17:17:39',
 		u'modified_by': u'Administrator',
 		u'owner': u'Administrator'
 	},
@@ -20,9 +20,36 @@
 		'title': u'Sales Analytics'
 	},
 
+	# These values are common for all Page Role
+	{
+		u'doctype': u'Page Role',
+		u'name': u'__common__',
+		'parent': u'sales-analytics',
+		'parentfield': u'roles',
+		'parenttype': u'Page'
+	},
+
 	# Page, sales-analytics
 	{
 		u'doctype': u'Page',
 		u'name': u'sales-analytics'
+	},
+
+	# Page Role
+	{
+		u'doctype': u'Page Role',
+		'role': u'Analytics'
+	},
+
+	# Page Role
+	{
+		u'doctype': u'Page Role',
+		'role': u'Sales Manager'
+	},
+
+	# Page Role
+	{
+		u'doctype': u'Page Role',
+		'role': u'Maintenance Manager'
 	}
 ]
\ No newline at end of file
diff --git a/selling/page/sales_browser/sales_browser.txt b/selling/page/sales_browser/sales_browser.txt
index d6dfbf3..a94c7a0 100644
--- a/selling/page/sales_browser/sales_browser.txt
+++ b/selling/page/sales_browser/sales_browser.txt
@@ -3,49 +3,77 @@
 
 	# These values are common in all dictionaries
 	{
-		'creation': '2010-12-14 10:23:21',
-		'docstatus': 0,
-		'modified': '2010-12-24 11:56:34',
-		'modified_by': 'Administrator',
-		'owner': 'Administrator'
+		u'creation': '2012-06-14 15:07:26',
+		u'docstatus': 0,
+		u'modified': '2012-10-04 17:34:55',
+		u'modified_by': u'Administrator',
+		u'owner': u'Administrator'
 	},
 
 	# These values are common for all Page
 	{
-		'doctype': 'Page',
-		'module': 'Selling',
-		'name': '__common__',
-		'page_name': 'Sales Browser',
+		u'doctype': u'Page',
+		'module': u'Selling',
+		u'name': u'__common__',
+		'page_name': u'Sales Browser',
 		'show_in_menu': 0,
-		'standard': 'Yes'
+		'standard': u'Yes'
 	},
 
 	# These values are common for all Page Role
 	{
-		'doctype': 'Page Role',
-		'name': '__common__',
-		'parent': 'Sales Browser',
-		'parentfield': 'roles',
-		'parenttype': 'Page'
+		u'doctype': u'Page Role',
+		u'name': u'__common__',
+		'parent': u'Sales Browser',
+		'parentfield': u'roles',
+		'parenttype': u'Page'
 	},
 
 	# Page, Sales Browser
 	{
-		'doctype': 'Page',
-		'name': 'Sales Browser'
+		u'doctype': u'Page',
+		u'name': u'Sales Browser'
 	},
 
 	# Page Role
 	{
-		'doctype': 'Page Role',
-		'idx': 1,
-		'role': 'Sales Master Manager'
+		u'doctype': u'Page Role',
+		'role': u'Sales Master Manager'
 	},
 
 	# Page Role
 	{
-		'doctype': 'Page Role',
-		'idx': 2,
-		'role': 'Material Master Manager'
+		u'doctype': u'Page Role',
+		'role': u'Material Master Manager'
+	},
+
+	# Page Role
+	{
+		u'doctype': u'Page Role',
+		'role': u'Accounts Manager'
+	},
+
+	# Page Role
+	{
+		u'doctype': u'Page Role',
+		'role': u'Sales Master Manager'
+	},
+
+	# Page Role
+	{
+		u'doctype': u'Page Role',
+		'role': u'Purchase Manager'
+	},
+
+	# Page Role
+	{
+		u'doctype': u'Page Role',
+		'role': u'Purchase Master Manager'
+	},
+
+	# Page Role
+	{
+		u'doctype': u'Page Role',
+		'role': u'Material Manager'
 	}
 ]
\ No newline at end of file
diff --git a/selling/page/selling_home/selling_home.html b/selling/page/selling_home/selling_home.html
index 1917b01..86fe47f 100644
--- a/selling/page/selling_home/selling_home.html
+++ b/selling/page/selling_home/selling_home.html
@@ -27,7 +27,8 @@
 			<h4><a href="#!List/Address">Address</a></h4>
 			<p class="help">Address Master</p>
 			<br>
-			<h4><a href="#sales-analytics" data-role="Analytics">Sales Analytics</a>
+			<h4><a href="#sales-analytics" data-role="Analytics, Sales Manager,
+					Maintenance Manager">Sales Analytics</a>
 				<span style="background-color: #fed; font-weight: normal; font-size: 80%">beta</span>
 			</h4>
 			<p class="help">Sales trends based on Sales Invoice</p>
@@ -65,17 +66,23 @@
 					<div class="section-item">
 						<a class="section-link" 
 							title = "Tree of customer groups"
-							href="#!Sales Browser/Customer Group">Customer Group</a>
+							href="#!Sales Browser/Customer Group"
+							data-role="Sales Manager, Sales Master Manager,
+								Accounts Manager">Customer Group</a>
 					</div>
 					<div class="section-item">
 						<a class="section-link" 
 							title = "Tree of sales territories"
-							href="#!Sales Browser/Territory">Territory</a>
+							href="#!Sales Browser/Territory"
+							data-role="Sales Manager, Sales Master Manager
+								Accounts Manager">Territory</a>
 					</div>
 					<div class="section-item">
 						<a class="section-link" 
 							title = "Sales persons and targets"
-							href="#!Sales Browser/Sales Person">Sales Person</a>
+							href="#!Sales Browser/Sales Person"
+							data-role="Sales Manager, Sales Master Manager
+								Accounts Manager">Sales Person</a>
 					</div>
 					<div class="section-item">
 						<a class="section-link" 
@@ -85,7 +92,9 @@
 					<div class="section-item">
 						<a class="section-link" 
 							title = "Tree of item classification"
-							href="#!Sales Browser/Item Group">Item Group</a>
+							href="#!Sales Browser/Item Group"
+							data-role="Sales Manager, Sales Master Manager
+								Accounts Manager">Item Group</a>
 					</div>
 					<div class="section-item">
 						<a class="section-link" 
@@ -108,15 +117,10 @@
 							href="#!Form/Sales and Purchase Return Tool/Sales and Purchase Return Tool">Sales Returns</a>
 					</div>
 					<div class="section-item">
-						<a class="section-link" 
+						<a class="section-link"
 							title = "Analyze Sales and Purchase trends and slice them based on item, customer, groups etc"
 							href="#!Report/Profile/Trend Analyzer">Trend Analyzer</a>
 					</div>
-					<!--<div class="section-item">
-						<a class="section-link" 
-							title = "sales trends"
-							href="#!Sales Dashboard">Sales Dashboard</a>
-					</div>-->
 				</div>
 			</div>
 		</div>
diff --git a/setup/page/modules_setup/modules_setup.txt b/setup/page/modules_setup/modules_setup.txt
index 70c6a90..494a96b 100644
--- a/setup/page/modules_setup/modules_setup.txt
+++ b/setup/page/modules_setup/modules_setup.txt
@@ -3,26 +3,41 @@
 
 	# These values are common in all dictionaries
 	{
-		'creation': '2012-02-28 17:48:39',
-		'docstatus': 0,
-		'modified': '2012-02-28 17:48:39',
-		'modified_by': u'Administrator',
-		'owner': u'Administrator'
+		u'creation': '2012-06-14 15:07:28',
+		u'docstatus': 0,
+		u'modified': '2012-10-04 16:55:31',
+		u'modified_by': u'Administrator',
+		u'owner': u'Administrator'
 	},
 
 	# These values are common for all Page
 	{
-		'doctype': 'Page',
+		u'doctype': u'Page',
 		'module': u'Setup',
-		'name': '__common__',
+		u'name': u'__common__',
 		'page_name': u'modules_setup',
 		'standard': u'Yes',
 		'title': u'Modules Setup'
 	},
 
+	# These values are common for all Page Role
+	{
+		u'doctype': u'Page Role',
+		u'name': u'__common__',
+		'parent': u'modules_setup',
+		'parentfield': u'roles',
+		'parenttype': u'Page',
+		'role': u'System Manager'
+	},
+
 	# Page, modules_setup
 	{
-		'doctype': 'Page',
-		'name': u'modules_setup'
+		u'doctype': u'Page',
+		u'name': u'modules_setup'
+	},
+
+	# Page Role
+	{
+		u'doctype': u'Page Role'
 	}
 ]
\ No newline at end of file
diff --git a/setup/page/setup/setup.txt b/setup/page/setup/setup.txt
index 2ecc40b..dfc85e3 100644
--- a/setup/page/setup/setup.txt
+++ b/setup/page/setup/setup.txt
@@ -3,25 +3,40 @@
 
 	# These values are common in all dictionaries
 	{
-		'creation': '2010-12-16 23:46:03',
-		'docstatus': 0,
-		'modified': '2011-07-04 16:58:27',
-		'modified_by': 'Administrator',
-		'owner': 'Administrator'
+		u'creation': '2012-06-14 15:07:28',
+		u'docstatus': 0,
+		u'modified': '2012-10-04 16:52:41',
+		u'modified_by': u'Administrator',
+		u'owner': u'Administrator'
 	},
 
 	# These values are common for all Page
 	{
-		'doctype': 'Page',
-		'module': 'Setup',
-		'name': '__common__',
-		'page_name': 'Setup',
-		'standard': 'Yes'
+		u'doctype': u'Page',
+		'module': u'Setup',
+		u'name': u'__common__',
+		'page_name': u'Setup',
+		'standard': u'Yes'
+	},
+
+	# These values are common for all Page Role
+	{
+		u'doctype': u'Page Role',
+		u'name': u'__common__',
+		'parent': u'Setup',
+		'parentfield': u'roles',
+		'parenttype': u'Page',
+		'role': u'System Manager'
 	},
 
 	# Page, Setup
 	{
-		'doctype': 'Page',
-		'name': 'Setup'
+		u'doctype': u'Page',
+		u'name': u'Setup'
+	},
+
+	# Page Role
+	{
+		u'doctype': u'Page Role'
 	}
 ]
\ No newline at end of file
diff --git a/stock/page/stock_ageing/stock_ageing.txt b/stock/page/stock_ageing/stock_ageing.txt
index bda41e5..bb4aabb 100644
--- a/stock/page/stock_ageing/stock_ageing.txt
+++ b/stock/page/stock_ageing/stock_ageing.txt
@@ -3,9 +3,9 @@
 
 	# These values are common in all dictionaries
 	{
-		u'creation': '2012-09-21 18:21:31',
+		u'creation': '2012-09-21 20:15:14',
 		u'docstatus': 0,
-		u'modified': '2012-09-21 18:21:31',
+		u'modified': '2012-10-04 17:34:24',
 		u'modified_by': u'Administrator',
 		u'owner': u'Administrator'
 	},
@@ -20,9 +20,30 @@
 		'title': u'Stock Ageing'
 	},
 
+	# These values are common for all Page Role
+	{
+		u'doctype': u'Page Role',
+		u'name': u'__common__',
+		'parent': u'stock-ageing',
+		'parentfield': u'roles',
+		'parenttype': u'Page'
+	},
+
 	# Page, stock-ageing
 	{
 		u'doctype': u'Page',
 		u'name': u'stock-ageing'
+	},
+
+	# Page Role
+	{
+		u'doctype': u'Page Role',
+		'role': u'Analytics'
+	},
+
+	# Page Role
+	{
+		u'doctype': u'Page Role',
+		'role': u'Material Manager'
 	}
 ]
\ No newline at end of file
diff --git a/stock/page/stock_analytics/stock_analytics.txt b/stock/page/stock_analytics/stock_analytics.txt
index 3d9510d..1405e6c 100644
--- a/stock/page/stock_analytics/stock_analytics.txt
+++ b/stock/page/stock_analytics/stock_analytics.txt
@@ -3,9 +3,9 @@
 
 	# These values are common in all dictionaries
 	{
-		u'creation': '2012-09-20 12:13:45',
+		u'creation': '2012-09-21 20:15:14',
 		u'docstatus': 0,
-		u'modified': '2012-09-20 12:13:45',
+		u'modified': '2012-10-04 17:32:20',
 		u'modified_by': u'Administrator',
 		u'owner': u'Administrator'
 	},
@@ -20,9 +20,30 @@
 		'title': u'Stock Analytics'
 	},
 
+	# These values are common for all Page Role
+	{
+		u'doctype': u'Page Role',
+		u'name': u'__common__',
+		'parent': u'stock-analytics',
+		'parentfield': u'roles',
+		'parenttype': u'Page'
+	},
+
 	# Page, stock-analytics
 	{
 		u'doctype': u'Page',
 		u'name': u'stock-analytics'
+	},
+
+	# Page Role
+	{
+		u'doctype': u'Page Role',
+		'role': u'Analytics'
+	},
+
+	# Page Role
+	{
+		u'doctype': u'Page Role',
+		'role': u'Material Manager'
 	}
 ]
\ No newline at end of file
diff --git a/stock/page/stock_home/stock_home.html b/stock/page/stock_home/stock_home.html
index b3a2848..fd33814 100644
--- a/stock/page/stock_home/stock_home.html
+++ b/stock/page/stock_home/stock_home.html
@@ -24,17 +24,20 @@
 			<h4><a href="#!List/Warehouse">Warehouse</a></h4>
 			<p class="help">Warehouse is where items are stored</p>
 			<br>
-			<h4><a href="#stock-ledger" data-role="Analytics">Stock Ledger</a>
+			<h4><a href="#stock-ledger" data-role="Analytics, Material Manager,
+					Material User">Stock Ledger</a>
 				<span style="background-color: #fed; font-weight: normal; font-size: 80%">beta</span>
 			</h4>
 			<p class="help">Log of stock movements</p>
 			<br>
-			<h4><a href="#stock-analytics" data-role="Analytics">Stock Analytics</a>
+			<h4><a href="#stock-analytics" data-role="Analytics, Material Manager">
+					Stock Analytics</a>
 				<span style="background-color: #fed; font-weight: normal; font-size: 80%">beta</span>
 			</h4>
 			<p class="help">Visual representation of stock trends</p>
 			<br>
-			<h4><a href="#stock-ageing" data-role="Analytics">Stock Ageing</a>
+			<h4><a href="#stock-ageing" data-role="Analytics, Material Manager">
+					Stock Ageing</a>
 				<span style="background-color: #fed; font-weight: normal; font-size: 80%">beta</span>
 			</h4>
 			<p class="help">Analysis of slow moving stock</p>
@@ -102,7 +105,9 @@
 					<div class="section-item">
 						<a class="section-link" 
 							title = "Tree of item classification"
-							href="#!Sales Browser/Item Group">Item Group</a>
+							href="#!Sales Browser/Item Group"
+							data-role="Material Master Master, Material Manager,
+								Accounts Manager">Item Group</a>
 					</div>
 					<div class="section-item">
 						<a class="section-link" 
diff --git a/stock/page/stock_ledger/stock_ledger.txt b/stock/page/stock_ledger/stock_ledger.txt
index a9460aa..eb95eb6 100644
--- a/stock/page/stock_ledger/stock_ledger.txt
+++ b/stock/page/stock_ledger/stock_ledger.txt
@@ -3,9 +3,9 @@
 
 	# These values are common in all dictionaries
 	{
-		u'creation': '2012-09-18 14:55:15',
+		u'creation': '2012-09-21 20:15:14',
 		u'docstatus': 0,
-		u'modified': '2012-09-18 14:55:15',
+		u'modified': '2012-10-04 17:25:35',
 		u'modified_by': u'Administrator',
 		u'owner': u'Administrator'
 	},
@@ -20,9 +20,36 @@
 		'title': u'Stock Ledger'
 	},
 
+	# These values are common for all Page Role
+	{
+		u'doctype': u'Page Role',
+		u'name': u'__common__',
+		'parent': u'stock-ledger',
+		'parentfield': u'roles',
+		'parenttype': u'Page'
+	},
+
 	# Page, stock-ledger
 	{
 		u'doctype': u'Page',
 		u'name': u'stock-ledger'
+	},
+
+	# Page Role
+	{
+		u'doctype': u'Page Role',
+		'role': u'Analytics'
+	},
+
+	# Page Role
+	{
+		u'doctype': u'Page Role',
+		'role': u'Material Manager'
+	},
+
+	# Page Role
+	{
+		u'doctype': u'Page Role',
+		'role': u'Material User'
 	}
 ]
\ No newline at end of file
diff --git a/utilities/__init__.py b/utilities/__init__.py
index a6e4625..b4ce38a 100644
--- a/utilities/__init__.py
+++ b/utilities/__init__.py
@@ -16,27 +16,39 @@
 
 from __future__ import unicode_literals
 import webnotes
+from webnotes.utils import cint
 
 @webnotes.whitelist()
 def get_sc_list(arg=None):
-	"""return list of reports for the given module module"""	
-	webnotes.response['values'] = webnotes.conn.sql("""select 
-		distinct criteria_name, doc_type, parent_doc_type
+	"""return list of reports for the given module module"""
+	limit_start = webnotes.form_dict.get("limit_start")
+	limit_page_length = webnotes.form_dict.get("limit_page_length")
+	module = webnotes.form_dict.get("module")
+	
+	webnotes.response['values'] = webnotes.conn.sql("""
+		select distinct criteria_name, doc_type, parent_doc_type
 		from `tabSearch Criteria` 
-		where module='%(module)s' 
-		and docstatus in (0, NULL)
-		and ifnull(disabled, 0) = 0 
-		order by criteria_name 
-		limit %(limit_start)s, %(limit_page_length)s""" % webnotes.form_dict, as_dict=True)
+		where module=%s 
+			and docstatus in (0, NULL)
+			and ifnull(disabled, 0) = 0 
+			order by criteria_name 
+			limit %s, %s""" % \
+		("%s", cint(limit_start), cint(limit_page_length)), (module,), as_dict=True)
 
 @webnotes.whitelist()
 def get_report_list():
 	"""return list on new style reports for modules"""
-	webnotes.response['values'] = webnotes.conn.sql("""select 
-		distinct tabReport.name, tabReport.ref_doctype
+	limit_start = webnotes.form_dict.get("limit_start")
+	limit_page_length = webnotes.form_dict.get("limit_page_length")
+	module = webnotes.form_dict.get("module")
+	
+	webnotes.response['values'] = webnotes.conn.sql("""
+		select distinct tabReport.name, tabReport.ref_doctype, 
+			if(ifnull(tabReport.query, '')!='', 1, 0) as is_query_report
 		from `tabReport`, `tabDocType`
-		where tabDocType.module='%(module)s' 
-		and tabDocType.name = tabReport.ref_doctype
-		and tabReport.docstatus in (0, NULL)
-		order by tabReport.name 
-		limit %(limit_start)s, %(limit_page_length)s""" % webnotes.form_dict, as_dict=True)
\ No newline at end of file
+		where tabDocType.module=%s
+			and tabDocType.name = tabReport.ref_doctype
+			and tabReport.docstatus in (0, NULL)
+			order by tabReport.name 
+			limit %s, %s""" % \
+		("%s", cint(limit_start), cint(limit_page_length)), (module,), as_dict=True)
\ No newline at end of file