Merge branch 'master' of github.com:webnotes/erpnext into unicode

Conflicts:
	erpnext/accounts/search_criteria/cash_flow_statement/__init__.py
	erpnext/accounts/search_criteria/cash_flow_statement/cash_flow_statement.py
	public/js/all-app.js
diff --git a/erpnext/accounts/search_criteria/cash_flow_statement/cash_flow_statement.js b/erpnext/accounts/search_criteria/cash_flow_statement/cash_flow_statement.js
deleted file mode 100644
index 8bcfa15..0000000
--- a/erpnext/accounts/search_criteria/cash_flow_statement/cash_flow_statement.js
+++ /dev/null
@@ -1,34 +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/>.
-
-report.customize_filters = function() {
-  this.hide_all_filters();
-  this.add_filter({fieldname:'show_group_balance', label:'Show Group Balance', fieldtype:'Select', options:NEWLINE+'Yes'+NEWLINE+'No',ignore : 1, parent:'Account'});
-  this.add_filter({fieldname:'level', label:'Level', fieldtype:'Data', default:3,ignore : 1, parent:'Account'});
-  
-  this.add_filter({fieldname:'from_date', label:'Date', fieldtype:'Date', parent:'Account'});
-
-  
-  this.filter_fields_dict['Account'+FILTER_SEP +'Company'].df.filter_hide = 0;
-  //this.filter_fields_dict['Account'+FILTER_SEP +'From Date'].df.filter_hide = 0;
-  //this.filter_fields_dict['Account'+FILTER_SEP +'To Date'].df.filter_hide = 0;
-
-  //this.large_report = 1;
-}
-
-report.aftertableprint = function(t) {
-   $yt(t,'*',1,{whiteSpace:'pre'});
-}
\ No newline at end of file
diff --git a/erpnext/accounts/search_criteria/cash_flow_statement/cash_flow_statement.sql b/erpnext/accounts/search_criteria/cash_flow_statement/cash_flow_statement.sql
deleted file mode 100644
index 381e8de..0000000
--- a/erpnext/accounts/search_criteria/cash_flow_statement/cash_flow_statement.sql
+++ /dev/null
@@ -1,9 +0,0 @@
-SELECT 
-  DISTINCT node.name AS name 
-  FROM tabAccount AS node, tabAccount AS parent 
-  WHERE node.lft BETWEEN parent.lft AND parent.rgt 
-    AND node.company = '%(company)s' 
-    AND node.is_pl_account = 'No' 
-    AND node.level=%(level)s
-    AND ifnull(node.account_type,'') != 'Bank or Cash'
-  ORDER BY node.lft
diff --git a/erpnext/accounts/search_criteria/cash_flow_statement/cash_flow_statement.txt b/erpnext/accounts/search_criteria/cash_flow_statement/cash_flow_statement.txt
deleted file mode 100644
index a9e748e..0000000
--- a/erpnext/accounts/search_criteria/cash_flow_statement/cash_flow_statement.txt
+++ /dev/null
@@ -1,33 +0,0 @@
-# Search Criteria, cash_flow_statement
-[
-
-	# These values are common in all dictionaries
-	{
-		'creation': '2012-04-11 17:36:48',
-		'docstatus': 0,
-		'modified': '2012-04-18 12:17:52',
-		'modified_by': u'Administrator',
-		'owner': u'Administrator'
-	},
-
-	# These values are common for all Search Criteria
-	{
-		'columns': u'Account\x01ID',
-		'criteria_name': u'Cash Flow Statement',
-		'dis_filters': u'fiscal_year',
-		'doc_type': u'Account',
-		'doctype': 'Search Criteria',
-		'filters': u"{'Account\x01Group or Ledger':'Ledger','Account\x01Is PL Account':'','Account\x01Is Active':'','Account\x01Account Type':'','Account\x01Company':'','Account\x01Fiscal Year':'','Account\x01Show Group Balance':'','Account\x01Level':'2'}",
-		'module': u'Accounts',
-		'name': '__common__',
-		'sort_by': u'`tabAccount`.`name`',
-		'sort_order': u'DESC',
-		'standard': u'Yes'
-	},
-
-	# Search Criteria, cash_flow_statement
-	{
-		'doctype': 'Search Criteria',
-		'name': u'cash_flow_statement'
-	}
-]
\ No newline at end of file
diff --git a/erpnext/patches/august_2012/remove_cash_flow_statement.py b/erpnext/patches/august_2012/remove_cash_flow_statement.py
new file mode 100644
index 0000000..a1243b8
--- /dev/null
+++ b/erpnext/patches/august_2012/remove_cash_flow_statement.py
@@ -0,0 +1,3 @@
+def execute():
+	import webnotes
+	webnotes.conn.sql("delete from `tabSearch Criteria` where name = 'cash_flow_statement'")
\ No newline at end of file
diff --git a/erpnext/patches/patch_list.py b/erpnext/patches/patch_list.py
index c7df34c..64c190f 100644
--- a/erpnext/patches/patch_list.py
+++ b/erpnext/patches/patch_list.py
@@ -561,4 +561,8 @@
 		'patch_module': 'patches.august_2012',
 		'patch_file': 'repost_billed_amt',
 	},
+	{
+		'patch_module': 'patches.august_2012',
+		'patch_file': 'remove_cash_flow_statement',
+	},
 ]
\ No newline at end of file
diff --git a/public/js/all-app.js b/public/js/all-app.js
index 081a800..d026468 100644
--- a/public/js/all-app.js
+++ b/public/js/all-app.js
@@ -1700,7 +1700,7 @@
  */
 _f.FrmHeader=Class.extend({init:function(parent,frm){this.appframe=new wn.ui.AppFrame(parent)
 this.$w=this.appframe.$w;},refresh:function(){if(cur_frm.cscript.set_breadcrumbs){this.appframe.clear_breadcrumbs();cur_frm.cscript.set_breadcrumbs();}else{wn.views.breadcrumbs(this.appframe,cur_frm.meta.module,cur_frm.meta.name,cur_frm.docname);}
-this.refresh_labels();this.refresh_toolbar();},refresh_labels:function(){var labinfo={0:['Saved','label-success'],1:['Submitted','label-info'],2:['Cancelled','label-important']}[cint(cur_frm.doc.docstatus)];if(labinfo[0]=='Saved'&&cur_frm.meta.is_submittable){labinfo[0]='Saved, to Submit';}
+this.refresh_labels();this.refresh_toolbar();},refresh_labels:function(){cur_frm.doc=get_local(cur_frm.doc.doctype,cur_frm.doc.name);var labinfo={0:['Saved','label-success'],1:['Submitted','label-info'],2:['Cancelled','label-important']}[cint(cur_frm.doc.docstatus)];if(labinfo[0]=='Saved'&&cur_frm.meta.is_submittable){labinfo[0]='Saved, to Submit';}
 if(cur_frm.doc.__unsaved||cur_frm.doc.__islocal){labinfo[0]='Not Saved';labinfo[1]='label-warning'}
 this.set_label(labinfo);if(cur_frm.doc.__unsaved&&cint(cur_frm.doc.docstatus)==1&&this.appframe.buttons['Update']){this.appframe.buttons['Update'].toggle(true);}},set_label:function(labinfo){this.$w.find('.label').remove();$(repl('<span class="label %(lab_class)s">\
    %(lab_status)s</span>',{lab_status:labinfo[0],lab_class:labinfo[1]})).insertBefore(this.$w.find('.breadcrumb-area'))},refresh_toolbar:function(){if(cur_frm.meta.hide_toolbar){$('.appframe-toolbar').toggle(false);return;}