deprecated dashboard
diff --git a/home/doctype/home_control/home_control.py b/home/doctype/home_control/home_control.py
index dd6eeec..02be00d 100644
--- a/home/doctype/home_control/home_control.py
+++ b/home/doctype/home_control/home_control.py
@@ -122,8 +122,6 @@
 	def get_dt_help(self,dt):
 		return sql("select description from tabDocType where name=%s",dt)[0][0] or ''
 
-	# get dashboard counts
-	# --------------------
 	def get_wip_counts(self):
 		#dtl = ['Lead', 'Enquiries', 'Sales Order', 'Invoices', 'Purchase Request', 'Purchase Order', 'Bills', 'Tasks', 'Delivery Note', 'Maintenance']
 		can_read_dt = ['Lead', 'Opportunity', 'Sales Order', 'Sales Invoice', 'Purchase Request', 'Purchase Order', 'Purchase Invoice', 'Delivery Note', 'Task', 'Serial No']
diff --git a/home/page/dashboard/__init__.py b/home/page/dashboard/__init__.py
deleted file mode 100644
index baffc48..0000000
--- a/home/page/dashboard/__init__.py
+++ /dev/null
@@ -1 +0,0 @@
-from __future__ import unicode_literals
diff --git a/home/page/dashboard/dashboard.css b/home/page/dashboard/dashboard.css
deleted file mode 100644
index d8e8b54..0000000
--- a/home/page/dashboard/dashboard.css
+++ /dev/null
@@ -1,12 +0,0 @@
-div.dashboard_table td {
-	width: 50%;
-}
-
-div.dashboard-title {
-	font-weight: bold;
-	padding: '3px 0px';
-}
-
-div.dashboard-graph {
-	height: 180px;
-}
\ No newline at end of file
diff --git a/home/page/dashboard/dashboard.html b/home/page/dashboard/dashboard.html
deleted file mode 100644
index 5ffef2f..0000000
--- a/home/page/dashboard/dashboard.html
+++ /dev/null
@@ -1,8 +0,0 @@
-<div class="layout_wrapper dashboard">
-	<div class="header"></div>
-	<div class="body">
-		<!-- 4x2 table to show the dashboards-->
-		<div class="help_box">Loading...</div>
-		<div class="dashboard_table"></div>
-	</div>
-</div>
\ No newline at end of file
diff --git a/home/page/dashboard/dashboard.js b/home/page/dashboard/dashboard.js
deleted file mode 100644
index 5dae7af..0000000
--- a/home/page/dashboard/dashboard.js
+++ /dev/null
@@ -1,170 +0,0 @@
-// ERPNext - web based ERP (http://erpnext.com)
-// Copyright (C) 2012 Web Notes Technologies Pvt Ltd
-// 
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation, either version 3 of the License, or
-// (at your option) any later version.
-// 
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-// GNU General Public License for more details.
-// 
-// You should have received a copy of the GNU General Public License
-// along with this program.  If not, see <http://www.gnu.org/licenses/>.
-
-pscript.onload_dashboard = function() {
-	// load jqplot
-	wn.require('lib/js/lib/jqplot/css/jqplot.css');
-	wn.require('lib/js/lib/jqplot/jquery.jqplot.min.js');
-	wn.require('lib/js/lib/jqplot/jqplot-plugins/jqplot.barRenderer.js'); 
-	wn.require('lib/js/lib/jqplot/jqplot-plugins/jqplot.canvasAxisTickRenderer.min.js');
-	wn.require('lib/js/lib/jqplot/jqplot-plugins/jqplot.canvasTextRenderer.min.js');
-	wn.require('lib/js/lib/jqplot/jqplot-plugins/jqplot.categoryAxisRenderer.min.js');
-
-
-	pscript.dashboard_settings = {
-		company: sys_defaults.company,
-		start: (function() {
-			var start_date = dateutil.add_days(new Date(), -180);
-			var year_start_date = dateutil.str_to_obj(sys_defaults.year_start_date);
-			if (start_date < year_start_date) { start_date = year_start_date; }
-			console.log(start_date);
-			return dateutil.obj_to_str(start_date);
-		})(),
-		end: (function() {
-			var end_date = new Date();
-			var year_end_date = dateutil.str_to_obj(sys_defaults.year_end_date);
-			if (end_date > year_end_date) { end_date = year_end_date; }
-			console.log(end_date);
-			return dateutil.obj_to_str(end_date);
-		})(),
-		interval: 30
-	}
-	
-	var ph = new PageHeader($('.dashboard .header').get(0), 'Dashboard');
-	var db = new Dashboard();
-
-	ph.add_button('Settings', db.show_settings);
-	
-	db.refresh();
-	
-}
-
-Dashboard = function() {
-	var me = this;
-	$.extend(me, {
-		refresh: function() {
-			$('.dashboard .help_box').css('display', 'block');
-			$c_page('home', 'dashboard', 'load_dashboard', JSON.stringify(pscript.dashboard_settings), function(r,rt) {
-				$('.dashboard .help_box').css('display', 'none');
-				me.render(r.message);
-			})			
-		},
-		
-		render: function(data) {
-			$('.dashboard_table').html('');
-			var t = make_table($('.dashboard_table').get(0), 4, 2, '100%', ['50%', '50%'], {padding: '5px'});
-			var ridx=0; var cidx=0;
-			for(var i=0; i< data.length; i++) {
-				// switch columns and rows
-				if(cidx==2) { cidx=0; ridx++}
-				
-				// give an id!
-				var cell = $td(t,ridx,cidx);
-				var title = $a(cell, 'div', 'dashboard-title', '', data[i][0].title);
-				var parent = $a(cell, 'div', 'dashboard-graph');
-				if(data[i][0].comment);
-					var comment = $a(cell, 'div', 'comment', '', data[i][0].comment)
-				
-				parent.id = '_dashboard' + ridx + '-' + cidx;
-				
-				// render graph
-				me.render_graph(parent.id, data[i][1], data[i][0].fillColor);
-				cidx++;
-			}
-		},
-		
-		render_graph: function(parent, values, fillColor) {
-			var vl = [];
-			$.each(values, function(i,v) { 
-				vl.push([dateutil.str_to_user(v[0]), v[1]]);
-			});
-			$.jqplot(parent, [vl], {
-				seriesDefaults:{
-					renderer:$.jqplot.BarRenderer,
-					rendererOptions: {fillToZero: true},
-				},
-				axes: {
-					// Use a category axis on the x axis and use our custom ticks.
-					xaxis: {
-						min: 0,
-						renderer: $.jqplot.CategoryAxisRenderer,
-						tickRenderer: $.jqplot.CanvasAxisTickRenderer,
-						tickOptions: {
-							angle: -30,
-							fontSize: '8pt'
-						}
-					},
-					// Pad the y axis just a little so bars can get close to, but
-					// not touch, the grid boundaries.  1.2 is the default padding.
-					yaxis: {
-						min: 0,
-						pad: 1.05,
-						tickOptions: {formatString: '%d'}
-					}
-				},
-				seriesColors: [fillColor]
-			});
-		},
-		
-		show_settings: function() {
-			var d = new wn.ui.Dialog({
-				title: 'Set Company Settings',
-				width: 500,
-				fields: [
-					{
-						label:'Company', 
-						reqd: 1,
-						fieldname:'company', 
-						fieldtype:'Link',
-						options: 'Company'
-					},
-					{
-						label:'Start Date', 
-						reqd: 1,
-						fieldname:'start', 
-						fieldtype:'Date',
-					},
-					{
-						label:'End Date', 
-						reqd: 1,
-						fieldname:'end', 
-						fieldtype:'Date',
-					},
-					{
-						label:'Interval', 
-						reqd: 1,
-						fieldname:'interval', 
-						fieldtype:'Int'
-					},
-					{
-						label:'Regenerate', 
-						fieldname:'refresh', 
-						fieldtype:'Button'
-					}
-				]
-			});
-			d.onshow = function() {
-				d.set_values(pscript.dashboard_settings);
-			}
-			d.fields_dict.refresh.input.onclick = function() {
-				pscript.dashboard_settings = d.get_values();
-				me.refresh();
-				d.hide();
-			}
-			d.show();
-		}
-	})
-}
diff --git a/home/page/dashboard/dashboard.py b/home/page/dashboard/dashboard.py
deleted file mode 100644
index 179f717..0000000
--- a/home/page/dashboard/dashboard.py
+++ /dev/null
@@ -1,281 +0,0 @@
-# ERPNext - web based ERP (http://erpnext.com)
-# Copyright (C) 2012 Web Notes Technologies Pvt Ltd
-# 
-# This program is free software: you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation, either version 3 of the License, or
-# (at your option) any later version.
-# 
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU General Public License for more details.
-# 
-# You should have received a copy of the GNU General Public License
-# along with this program.  If not, see <http://www.gnu.org/licenses/>.
-
-from __future__ import unicode_literals
-dashboards = [
-	{
-		'type': 'account',
-		'account': 'Income',
-		'title': 'Income',
-		'fillColor': '#90EE90'
-	},
-	
-	{
-		'type': 'account',
-		'account': 'Expenses',
-		'title': 'Expenses',
-		'fillColor': '#90EE90'
-	},
-
-	{
-		'type': 'receivables',
-		'title': 'Receivables',
-		'fillColor': '#FFE4B5'
-	},
-
-	{
-		'type': 'payables',
-		'title': 'Payables',
-		'fillColor': '#FFE4B5'
-	},
-
-	{
-		'type': 'collection',
-		'title': 'Collection',
-		'comment':'This info comes from the accounts your have marked as "Bank or Cash"',
-		'fillColor': '#DDA0DD'
-	},
-
-	{
-		'type': 'payments',
-		'title': 'Payments',
-		'comment':'This info comes from the accounts your have marked as "Bank or Cash"',
-		'fillColor': '#DDA0DD'
-	},
-
-	{
-		'type': 'creation',
-		'doctype': 'Quotation',
-		'title': 'New Quotations',
-		'fillColor': '#ADD8E6'
-	},
-	
-	{
-		'type': 'creation',
-		'doctype': 'Sales Order',
-		'title': 'New Orders',
-		'fillColor': '#ADD8E6'
-	}
-]
-
-import webnotes
-
-class DashboardWidget:
-	def __init__(self, company, start, end, interval):
-		from webnotes.utils import getdate
-		from webnotes.model.code import get_obj
-		
-		self.company = company
-		self.abbr = webnotes.conn.get_value('Company', company, 'abbr')
-		self.start = getdate(start)
-		self.end = getdate(end)
-		
-		self.interval = interval
-
-		self.glc = get_obj('GL Control')
-		self.cash_accounts = [d[0] for d in webnotes.conn.sql("""
-			select name from tabAccount 
-			where account_type='Bank or Cash'
-			and company = %s and docstatus = 0 
-			""", company)]
-			
-		self.receivables_group = webnotes.conn.get_value('Company', company,'receivables_group')
-		self.payables_group = webnotes.conn.get_value('Company', company,'payables_group')
-		
-		# list of bank and cash accounts
-		self.bc_list = [s[0] for s in webnotes.conn.sql("select name from tabAccount where account_type='Bank or Cash'")]
-
-		
-	def timeline(self):
-		"""
-			get the timeline for the dashboard
-		"""
-		import webnotes
-		from webnotes.utils import add_days
-		tl = []
-	
-		if self.start > self.end:
-			webnotes.msgprint("Start must be before end", raise_exception=1)
-
-		curr = self.start
-		tl.append(curr)
-	
-		while curr < self.end:
-			curr = add_days(curr, self.interval, 'date')
-			tl.append(curr)
-
-		tl.append(self.end)
-
-		return tl
-		
-	def generate(self, opts):
-		"""
-			Generate the dasboard
-		"""
-		from webnotes.utils import flt
-		tl = self.timeline()
-		self.out = []
-		
-		for i in range(len(tl)-1):
-			self.out.append([tl[i+1].strftime('%Y-%m-%d'), flt(self.value(opts, tl[i], tl[i+1])) or 0])
-			
-		return self.out
-
-	def get_account_balance(self, acc, start):
-		"""
-			Get as on account balance
-		"""
-		import webnotes
-		# add abbreviation to company
-		
-		if not acc.endswith(self.abbr):
-			acc += ' - ' + self.abbr
-
-		# get other reqd parameters
-		try:
-			globals().update(webnotes.conn.sql('select debit_or_credit, lft, rgt from tabAccount where name=%s', acc, as_dict=1)[0])
-		except Exception,e:
-			webnotes.msgprint('Wrongly defined account: ' + acc)
-			print acc
-			raise e
-
-		from accounts.utils import get_fiscal_year, get_balance_on
-		fy_end_date = get_fiscal_year(start)[2]
-		return get_balance_on(acc, fy_end_date)
-
-	def get_fiscal_year(self, dt):
-		"""
-			get fiscal year from date
-		"""
-		import webnotes
-		fiscal_year = webnotes.conn.sql("""
-			select name from `tabFiscal Year` 
-			where year_start_date <= %s and
-			DATE_ADD(year_start_date, INTERVAL 1 YEAR) >= %s
-			""", (dt, dt))
-		return fiscal_year and (fiscal_year[0] and fiscal_year[0][0]) or None
-			
-	def get_creation_trend(self, doctype, start, end):
-		"""
-			Get creation # of creations in period
-		"""
-		import webnotes
-		return int(webnotes.conn.sql("""
-			select count(*) from `tab%s` where creation between %s and %s and docstatus=1
-		""" % (doctype, '%s','%s'), (start, end))[0][0])
-
-	def get_account_amt(self, acc, start, end, debit_or_credit):
-		"""
-			Get debit, credit over a period
-		"""
-		import webnotes
-		# add abbreviation to company
-		
-		if not acc.endswith(self.abbr):
-			acc += ' - ' + self.abbr
-			
-		ret = webnotes.conn.sql("""
-			select ifnull(sum(ifnull(t1.debit,0)),0), ifnull(sum(ifnull(t1.credit,0)),0)
-			from `tabGL Entry` t1, tabAccount t2
-			where t1.account = t2.name
-			and t2.is_pl_account = 'Yes'
-			and t2.debit_or_credit=%s
-			and ifnull(t1.is_cancelled, 'No')='No'
-			and t1.posting_date between %s and %s
-		""", (debit_or_credit, start, end))[0]
-		
-		return debit_or_credit=='Credit' and float(ret[1]-ret[0]) or float(ret[0]-ret[1])
-
-	def get_bank_amt(self, debit_or_credit, master_type, start, end):
-		"""
-			Get collection (reduction in receivables over a period)
-		"""
-		import webnotes
-
-		reg = '('+'|'.join(self.bc_list) + ')'
-
-		return webnotes.conn.sql("""
-		select sum(t1.%s)
-		from `tabGL Entry` t1, tabAccount t2
-		where t1.account = t2.name
-		and t2.master_type='%s'
-		and t1.%s > 0
-		and t1.against REGEXP '%s'
-		and ifnull(t1.is_cancelled, 'No')='No'
-		and t1.posting_date between '%s' and '%s'
-		""" % (debit_or_credit, master_type, debit_or_credit, reg, start, end))[0][0]
-
-
-	def value(self, opts, start, end):
-		"""
-			Value of the series on a particular date
-		"""
-		import webnotes
-		if opts['type']=='account':
-			debit_or_credit = 'Debit'
-			if opts['account']=='Income':
-				debit_or_credit = 'Credit'
-
-			return self.get_account_amt(opts['account'], start, end, debit_or_credit)
-		
-		elif opts['type']=='receivables':
-			return self.get_account_balance(self.receivables_group, end)
-			
-		elif opts['type']=='payables':
-			return self.get_account_balance(self.payables_group, end)
-
-		elif opts['type']=='collection':
-			return self.get_bank_amt('credit', 'Customer', start, end)
-
-		elif opts['type']=='payments':
-			return self.get_bank_amt('debit', 'Supplier', start, end)
-			
-		elif opts['type']=='creation':
-			return self.get_creation_trend(opts['doctype'], start, end)
-
-@webnotes.whitelist()
-def load_dashboard(args):
-	"""
-		Get dashboard based on
-		1. Company (default company)
-		2. Start Date (last 3 months)
-		3. End Date (today)
-		4. Interval (7 days)
-	"""
-	dl = []
-	import json
-	args = json.loads(args)
-	dw = DashboardWidget(args['company'], args['start'], args['end'], int(args['interval']))
-
-	# render the dashboards
-	for d in dashboards:
-		dl.append([d, dw.generate(d)])
-
-	return dl
-
-if __name__=='__main__':
-	import sys
-	sys.path.append('/var/www/webnotes/wnframework/cgi-bin')
-	from webnotes.db import Database
-	import webnotes
-	webnotes.conn = Database(use_default=1)
-	webnotes.session = {'user':'Administrator'}
-	print load_dashboard("""{
-		"company": "My Test",
-		"start": "2011-05-01",
-		"end": "2011-08-01",
-		"interval": "7"
-	}""")
diff --git a/home/page/dashboard/dashboard.txt b/home/page/dashboard/dashboard.txt
deleted file mode 100644
index 46bc2bc..0000000
--- a/home/page/dashboard/dashboard.txt
+++ /dev/null
@@ -1,49 +0,0 @@
-# Page, dashboard
-[
-
-	# These values are common in all dictionaries
-	{
-		'creation': '2011-08-25 16:22:44',
-		'docstatus': 0,
-		'modified': '2011-08-25 16:22:54',
-		'modified_by': 'Administrator',
-		'owner': 'Administrator'
-	},
-
-	# These values are common for all Page
-	{
-		'category': 'Standard',
-		'doctype': 'Page',
-		'module': 'Home',
-		'name': '__common__',
-		'page_name': 'Dashboard',
-		'standard': 'Yes'
-	},
-
-	# These values are common for all Page Role
-	{
-		'doctype': 'Page Role',
-		'name': '__common__',
-		'parent': 'dashboard',
-		'parentfield': 'roles',
-		'parenttype': 'Page'
-	},
-
-	# Page, dashboard
-	{
-		'doctype': 'Page',
-		'name': 'dashboard'
-	},
-
-	# Page Role
-	{
-		'doctype': 'Page Role',
-		'role': 'System Manager'
-	},
-
-	# Page Role
-	{
-		'doctype': 'Page Role',
-		'role': 'Accounts Manager'
-	}
-]
\ No newline at end of file
diff --git a/home/page/desktop/desktop.css b/home/page/desktop/desktop.css
index 7b8c21e..f1c4fb0 100644
--- a/home/page/desktop/desktop.css
+++ b/home/page/desktop/desktop.css
@@ -2,7 +2,6 @@
 .sprite-account{ background-position: 0 0; width: 32px; height: 40px; } 
 .sprite-buying{ background-position: 0 -90px; width: 40px; height: 40px; } 
 .sprite-calendar{ background-position: 0 -180px; width: 35px; height: 40px; } 
-.sprite-dashboard{ background-position: 0 -270px; width: 40px; height: 29px; } 
 .sprite-feed{ background-position: 0 -349px; width: 32px; height: 40px; } 
 .sprite-hr{ background-position: 0 -439px; width: 40px; height: 32px; } 
 .sprite-kb{ background-position: 0 -521px; width: 24px; height: 39px; } 
@@ -30,7 +29,6 @@
 .sprite-production{ margin-top: 10px; margin-left: 8px; } 
 .sprite-website{ margin-top: 8px; margin-left: 8px; } 
 .sprite-setting{ margin-top: 8px; margin-left: 8px; } 
-.sprite-dashboard{ margin-top: 14px; margin-left: 8px; } 
 .sprite-report{ margin-top: 8px; margin-left: 14px; } 
 
 .sprite-messages{ margin-top: 14px; margin-left: 8px; } 
diff --git a/home/page/desktop/desktop.js b/home/page/desktop/desktop.js
index b353774..4eef2fd 100644
--- a/home/page/desktop/desktop.js
+++ b/home/page/desktop/desktop.js
@@ -37,7 +37,6 @@
 		'Website': { sprite: 'website', label: 'Website'},
 		'Activity': { sprite: 'feed', label: 'Activity'},
 		'Setup': { sprite: 'setting', label: 'Setup'},
-		'Dashboard': { sprite: 'dashboard', label: 'Dashboard'},
 		'To Do': { sprite: 'todo', label: 'To Do'},
 		'Messages': { sprite: 'messages', label: 'Messages'},
 		'Calendar': { sprite: 'calendar', label: 'Calendar'},
@@ -61,12 +60,10 @@
 	// setup
 	for(var i in wn.boot.modules_list) {
 		var m = wn.boot.modules_list[i];
-		if(!in_list(['Setup', 'Dashboard'], m) && wn.boot.profile.allow_modules.indexOf(m)!=-1)
+		if(!in_list(['Setup'], m) && wn.boot.profile.allow_modules.indexOf(m)!=-1)
 			add_icon(m);
 	}
 
-	if(user_roles.indexOf('Accounts Manager')!=-1)
-		add_icon('Dashboard')
 
 	if(user_roles.indexOf('System Manager')!=-1)
 		add_icon('Setup')