[minor] merge conflict fixed
diff --git a/README.md b/README.md
index c95c801..7572337 100644
--- a/README.md
+++ b/README.md
@@ -42,15 +42,7 @@
 
 GNU/General Public License (see LICENSE.txt)
 
-The ERPNext code is licensed as GNU General Public License (v3) and the Documentation is licensed as Creative Commons (CC-BY-SA-3.0) and the copyright is owned by Web Notes Technologies Pvt Ltd (Web Notes). 
-
-### Copyright for Contributors
-
-Unless otherwise asserted in the code files, Web Notes will own the copyright of all contributions too. That means Web Notes holds the rights to change the license in the future or offer Commercial Licenses.
-
-Web Notes will only accept copyright assertions in case of a significant contribution like a whole new functionality or a major rewrite. We believe if your contribution is significant then you should have a say in what license Web Notes selects in the future and/or have a right to any revenue Web Notes gets from a Commercial License. Either ways Web Notes will have the right to decide what is a "significant" contribution.
-
-Note: At the moment, Web Notes does not give Commercial License for ERPNext nor has specific plans do so in the future.
+The ERPNext code is licensed as GNU General Public License (v3) and the Documentation is licensed as Creative Commons (CC-BY-SA-3.0) and the copyright is owned by Web Notes Technologies Pvt Ltd (Web Notes) and Contributors. 
 
 ---
 
diff --git a/accounts/doctype/account/account.js b/accounts/doctype/account/account.js
index 9ccb16b..b6986cf 100644
--- a/accounts/doctype/account/account.js
+++ b/accounts/doctype/account/account.js
@@ -1,4 +1,4 @@
-// Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+// Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 // License: GNU General Public License v3. See license.txt
 
 
@@ -11,7 +11,7 @@
 // -----------------------------------------
 cur_frm.cscript.refresh = function(doc, cdt, cdn) {
 	if(doc.__islocal) {
-		msgprint("Please create new account from Chart of Accounts.");
+		msgprint(wn._("Please create new account from Chart of Accounts."));
 		throw "cannot create";
 	}
 
@@ -38,7 +38,7 @@
 	// read-only for root accounts
 	if(!doc.parent_account) {
 		cur_frm.perm = [[1,0,0], [1,0,0]];
-		cur_frm.set_intro("This is a root account and cannot be edited.");
+		cur_frm.set_intro(wn._("This is a root account and cannot be edited."));
 	} else {
 		// credit days and type if customer or supplier
 		cur_frm.set_intro(null);
@@ -81,24 +81,24 @@
 // Hide/unhide group or ledger
 // -----------------------------------------
 cur_frm.cscript.add_toolbar_buttons = function(doc) {
-	cur_frm.add_custom_button('Chart of Accounts', 
+	cur_frm.appframe.add_button(wn._('Chart of Accounts'), 
 		function() { wn.set_route("Accounts Browser", "Account"); }, 'icon-sitemap')
 
 	if (cstr(doc.group_or_ledger) == 'Group') {
-		cur_frm.add_custom_button('Convert to Ledger', 
+		cur_frm.add_custom_button(wn._('Convert to Ledger'), 
 			function() { cur_frm.cscript.convert_to_ledger(); }, 'icon-retweet')
 	} else if (cstr(doc.group_or_ledger) == 'Ledger') {
-		cur_frm.add_custom_button('Convert to Group', 
+		cur_frm.add_custom_button(wn._('Convert to Group'), 
 			function() { cur_frm.cscript.convert_to_group(); }, 'icon-retweet')
 			
-		cur_frm.add_custom_button('View Ledger', function() {
+		cur_frm.appframe.add_button(wn._('View Ledger'), function() {
 			wn.route_options = {
 				"account": doc.name,
 				"from_date": sys_defaults.year_start_date,
 				"to_date": sys_defaults.year_end_date
 			};
 			wn.set_route("general-ledger");
-		});
+		}, "icon-table");
 	}
 }
 // Convert group to ledger
diff --git a/accounts/doctype/account/account.py b/accounts/doctype/account/account.py
index f525b32..992c4dc 100644
--- a/accounts/doctype/account/account.py
+++ b/accounts/doctype/account/account.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 # License: GNU General Public License v3. See license.txt
 
 from __future__ import unicode_literals
@@ -7,7 +7,6 @@
 from webnotes.utils import flt, fmt_money, cstr, cint
 from webnotes import msgprint, _
 
-sql = webnotes.conn.sql
 get_value = webnotes.conn.get_value
 
 class DocType:
@@ -46,7 +45,7 @@
 	def validate_parent(self):
 		"""Fetch Parent Details and validation for account not to be created under ledger"""
 		if self.doc.parent_account:
-			par = sql("""select name, group_or_ledger, is_pl_account, debit_or_credit 
+			par = webnotes.conn.sql("""select name, group_or_ledger, is_pl_account, debit_or_credit 
 				from tabAccount where name =%s""", self.doc.parent_account)
 			if not par:
 				msgprint("Parent account does not exists", raise_exception=1)
@@ -74,7 +73,7 @@
 	def validate_duplicate_account(self):
 		if self.doc.fields.get('__islocal') or not self.doc.name:
 			company_abbr = webnotes.conn.get_value("Company", self.doc.company, "abbr")
-			if sql("""select name from tabAccount where name=%s""", 
+			if webnotes.conn.sql("""select name from tabAccount where name=%s""", 
 				(self.doc.account_name + " - " + company_abbr)):
 					msgprint("Account Name: %s already exists, please rename" 
 						% self.doc.account_name, raise_exception=1)
@@ -123,7 +122,7 @@
 		return webnotes.conn.get_value("GL Entry", {"account": self.doc.name})
 
 	def check_if_child_exists(self):
-		return sql("""select name from `tabAccount` where parent_account = %s 
+		return webnotes.conn.sql("""select name from `tabAccount` where parent_account = %s 
 			and docstatus != 2""", self.doc.name)
 	
 	def validate_mandatory(self):
@@ -171,7 +170,7 @@
 		# Get credit limit
 		credit_limit_from = 'Customer'
 
-		cr_limit = sql("""select t1.credit_limit from tabCustomer t1, `tabAccount` t2 
+		cr_limit = webnotes.conn.sql("""select t1.credit_limit from tabCustomer t1, `tabAccount` t2 
 			where t2.name=%s and t1.name = t2.master_name""", self.doc.name)
 		credit_limit = cr_limit and flt(cr_limit[0][0]) or 0
 		if not credit_limit:
diff --git a/accounts/doctype/account/test_account.py b/accounts/doctype/account/test_account.py
index fadb73b..2d15b62 100644
--- a/accounts/doctype/account/test_account.py
+++ b/accounts/doctype/account/test_account.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 # License: GNU General Public License v3. See license.txt
 
 from __future__ import unicode_literals
diff --git a/accounts/doctype/accounts_settings/accounts_settings.py b/accounts/doctype/accounts_settings/accounts_settings.py
index 0d106e8..d55b022 100644
--- a/accounts/doctype/accounts_settings/accounts_settings.py
+++ b/accounts/doctype/accounts_settings/accounts_settings.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 # License: GNU General Public License v3. See license.txt
 
 # For license information, please see license.txt
diff --git a/accounts/doctype/bank_reconciliation/bank_reconciliation.js b/accounts/doctype/bank_reconciliation/bank_reconciliation.js
index 43dba63..3e50ad7 100644
--- a/accounts/doctype/bank_reconciliation/bank_reconciliation.js
+++ b/accounts/doctype/bank_reconciliation/bank_reconciliation.js
@@ -1,4 +1,4 @@
-// Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+// Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 // License: GNU General Public License v3. See license.txt
 
 
diff --git a/accounts/doctype/bank_reconciliation/bank_reconciliation.py b/accounts/doctype/bank_reconciliation/bank_reconciliation.py
index 479b579..6814333 100644
--- a/accounts/doctype/bank_reconciliation/bank_reconciliation.py
+++ b/accounts/doctype/bank_reconciliation/bank_reconciliation.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 # License: GNU General Public License v3. See license.txt
 
 from __future__ import unicode_literals
@@ -10,7 +10,6 @@
 from webnotes.model.bean import getlist, copy_doclist
 from webnotes import msgprint
 
-sql = webnotes.conn.sql
 	
 
 
@@ -23,7 +22,7 @@
 			msgprint("Bank Account, From Date and To Date are Mandatory")
 			return
 	
-		dl = sql("select t1.name, t1.cheque_no, t1.cheque_date, t2.debit, t2.credit, t1.posting_date, t2.against_account from `tabJournal Voucher` t1, `tabJournal Voucher Detail` t2 where t2.parent = t1.name and t2.account = %s and (clearance_date is null or clearance_date = '0000-00-00' or clearance_date = '') and t1.posting_date >= %s and t1.posting_date <= %s and t1.docstatus=1", (self.doc.bank_account, self.doc.from_date, self.doc.to_date))
+		dl = webnotes.conn.sql("select t1.name, t1.cheque_no, t1.cheque_date, t2.debit, t2.credit, t1.posting_date, t2.against_account from `tabJournal Voucher` t1, `tabJournal Voucher Detail` t2 where t2.parent = t1.name and t2.account = %s and (clearance_date is null or clearance_date = '0000-00-00' or clearance_date = '') and t1.posting_date >= %s and t1.posting_date <= %s and t1.docstatus=1", (self.doc.bank_account, self.doc.from_date, self.doc.to_date))
 		
 		self.doclist = self.doc.clear_table(self.doclist, 'entries')
 		self.doc.total_amount = 0.0
@@ -47,7 +46,7 @@
 					msgprint("Clearance Date can not be before Cheque Date (Row #%s)" % 
 						d.idx, raise_exception=1)
 					
-				sql("""update `tabJournal Voucher` 
+				webnotes.conn.sql("""update `tabJournal Voucher` 
 					set clearance_date = %s, modified = %s where name=%s""",
 					(d.clearance_date, nowdate(), d.voucher_id))
 				vouchers.append(d.voucher_id)
diff --git a/accounts/doctype/bank_reconciliation_detail/bank_reconciliation_detail.py b/accounts/doctype/bank_reconciliation_detail/bank_reconciliation_detail.py
index 26d0f76..cb6190f 100644
--- a/accounts/doctype/bank_reconciliation_detail/bank_reconciliation_detail.py
+++ b/accounts/doctype/bank_reconciliation_detail/bank_reconciliation_detail.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 # License: GNU General Public License v3. See license.txt
 
 from __future__ import unicode_literals
diff --git a/accounts/doctype/bank_reconciliation_detail/bank_reconciliation_detail.txt b/accounts/doctype/bank_reconciliation_detail/bank_reconciliation_detail.txt
index 5e98cb0..9905398 100644
--- a/accounts/doctype/bank_reconciliation_detail/bank_reconciliation_detail.txt
+++ b/accounts/doctype/bank_reconciliation_detail/bank_reconciliation_detail.txt
@@ -2,7 +2,7 @@
  {
   "creation": "2013-02-22 01:27:37", 
   "docstatus": 0, 
-  "modified": "2013-07-10 14:54:03", 
+  "modified": "2013-11-03 14:11:31", 
   "modified_by": "Administrator", 
   "owner": "Administrator"
  }, 
@@ -47,7 +47,6 @@
   "read_only": 1
  }, 
  {
-  "description": "The date at which current entry will get or has actually executed.", 
   "doctype": "DocField", 
   "fieldname": "posting_date", 
   "fieldtype": "Date", 
diff --git a/accounts/doctype/budget_detail/budget_detail.py b/accounts/doctype/budget_detail/budget_detail.py
index 26d0f76..cb6190f 100644
--- a/accounts/doctype/budget_detail/budget_detail.py
+++ b/accounts/doctype/budget_detail/budget_detail.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 # License: GNU General Public License v3. See license.txt
 
 from __future__ import unicode_literals
diff --git a/accounts/doctype/budget_distribution/budget_distribution.js b/accounts/doctype/budget_distribution/budget_distribution.js
index deed0cb..ddaecdd 100644
--- a/accounts/doctype/budget_distribution/budget_distribution.js
+++ b/accounts/doctype/budget_distribution/budget_distribution.js
@@ -1,4 +1,4 @@
-// Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+// Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 // License: GNU General Public License v3. See license.txt
 
 cur_frm.cscript.onload = function(doc,cdt,cdn){
diff --git a/accounts/doctype/budget_distribution/budget_distribution.py b/accounts/doctype/budget_distribution/budget_distribution.py
index 2b3ce69..c1ac2f9 100644
--- a/accounts/doctype/budget_distribution/budget_distribution.py
+++ b/accounts/doctype/budget_distribution/budget_distribution.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 # License: GNU General Public License v3. See license.txt
 
 from __future__ import unicode_literals
diff --git a/accounts/doctype/budget_distribution/test_budget_distribution.py b/accounts/doctype/budget_distribution/test_budget_distribution.py
index bf18cde..15b60db 100644
--- a/accounts/doctype/budget_distribution/test_budget_distribution.py
+++ b/accounts/doctype/budget_distribution/test_budget_distribution.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 # License: GNU General Public License v3. See license.txt
 
 test_records = [
diff --git a/accounts/doctype/budget_distribution_detail/budget_distribution_detail.py b/accounts/doctype/budget_distribution_detail/budget_distribution_detail.py
index 26d0f76..cb6190f 100644
--- a/accounts/doctype/budget_distribution_detail/budget_distribution_detail.py
+++ b/accounts/doctype/budget_distribution_detail/budget_distribution_detail.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 # License: GNU General Public License v3. See license.txt
 
 from __future__ import unicode_literals
diff --git a/accounts/doctype/c_form/c_form.js b/accounts/doctype/c_form/c_form.js
index 81fa136..3bcfa5e 100644
--- a/accounts/doctype/c_form/c_form.js
+++ b/accounts/doctype/c_form/c_form.js
@@ -1,4 +1,4 @@
-// Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+// Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 // License: GNU General Public License v3. See license.txt
 
 //c-form js file
diff --git a/accounts/doctype/c_form/c_form.py b/accounts/doctype/c_form/c_form.py
index 0178a19..81d5a15 100644
--- a/accounts/doctype/c_form/c_form.py
+++ b/accounts/doctype/c_form/c_form.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 # License: GNU General Public License v3. See license.txt
 
 from __future__ import unicode_literals
diff --git a/accounts/doctype/c_form/c_form.txt b/accounts/doctype/c_form/c_form.txt
index c69a658..21d6550 100644
--- a/accounts/doctype/c_form/c_form.txt
+++ b/accounts/doctype/c_form/c_form.txt
@@ -2,7 +2,7 @@
  {
   "creation": "2013-03-07 11:55:06", 
   "docstatus": 0, 
-  "modified": "2013-08-08 14:21:55", 
+  "modified": "2013-11-02 14:05:25", 
   "modified_by": "Administrator", 
   "owner": "Administrator"
  }, 
@@ -50,7 +50,7 @@
   "doctype": "DocField", 
   "fieldname": "naming_series", 
   "fieldtype": "Select", 
-  "label": "Document Numbering Series", 
+  "label": "Series", 
   "options": "\nC-FORM/", 
   "read_only": 0, 
   "reqd": 1
diff --git a/accounts/doctype/c_form_invoice_detail/c_form_invoice_detail.py b/accounts/doctype/c_form_invoice_detail/c_form_invoice_detail.py
index 26d0f76..cb6190f 100644
--- a/accounts/doctype/c_form_invoice_detail/c_form_invoice_detail.py
+++ b/accounts/doctype/c_form_invoice_detail/c_form_invoice_detail.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 # License: GNU General Public License v3. See license.txt
 
 from __future__ import unicode_literals
diff --git a/accounts/doctype/c_form_invoice_detail/c_form_invoice_detail.txt b/accounts/doctype/c_form_invoice_detail/c_form_invoice_detail.txt
index 487c982..99335b7 100644
--- a/accounts/doctype/c_form_invoice_detail/c_form_invoice_detail.txt
+++ b/accounts/doctype/c_form_invoice_detail/c_form_invoice_detail.txt
@@ -2,7 +2,7 @@
  {
   "creation": "2013-02-22 01:27:38", 
   "docstatus": 0, 
-  "modified": "2013-07-10 14:54:06", 
+  "modified": "2013-11-02 16:58:31", 
   "modified_by": "Administrator", 
   "owner": "Administrator"
  }, 
@@ -44,6 +44,7 @@
   "width": "120px"
  }, 
  {
+  "description": "<a href=\"#Sales Browser/Territory\">Add / Edit</a>", 
   "doctype": "DocField", 
   "fieldname": "territory", 
   "fieldtype": "Link", 
diff --git a/accounts/doctype/cost_center/cost_center.js b/accounts/doctype/cost_center/cost_center.js
index c3519bf..fbab418 100644
--- a/accounts/doctype/cost_center/cost_center.js
+++ b/accounts/doctype/cost_center/cost_center.js
@@ -1,4 +1,4 @@
-// Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+// Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 // License: GNU General Public License v3. See license.txt
 
 wn.provide("erpnext.accounts");
@@ -41,8 +41,8 @@
 	cur_frm.toggle_enable(['group_or_ledger', 'company'], doc.__islocal);
 
 	if(!doc.__islocal && doc.group_or_ledger=='Group') {
-		intro_txt += '<p><b>Note:</b> This Cost Center is a <i>Group</i>, \
-			Accounting Entries are not allowed against groups.</p>';
+		intro_txt += '<p><b>'+wn._('Note:')+'</b>'+ wn._('This Cost Center is a')+ '<i>'+wn._('Group')+'</i>, '+ 
+		wn._('Accounting Entries are not allowed against groups.')+'</p>';
 	}
 
 	cur_frm.cscript.hide_unhide_group_ledger(doc);
@@ -50,22 +50,22 @@
 	cur_frm.toggle_display('sb1', doc.group_or_ledger=='Ledger')
 	cur_frm.set_intro(intro_txt);
 	
-	cur_frm.add_custom_button('Chart of Cost Centers', 
+	cur_frm.appframe.add_button(wn._('Chart of Cost Centers'), 
 		function() { wn.set_route("Accounts Browser", "Cost Center"); }, 'icon-sitemap')
 }
 
 cur_frm.cscript.parent_cost_center = function(doc,cdt,cdn){
 	if(!doc.company){
-		alert('Please enter company name first');
+		alert(wn._('Please enter company name first'));
 	}
 }
 
 cur_frm.cscript.hide_unhide_group_ledger = function(doc) {
 	if (cstr(doc.group_or_ledger) == 'Group') {
-		cur_frm.add_custom_button('Convert to Ledger', 
+		cur_frm.add_custom_button(wn._('Convert to Ledger'), 
 			function() { cur_frm.cscript.convert_to_ledger(); }, 'icon-retweet')
 	} else if (cstr(doc.group_or_ledger) == 'Ledger') {
-		cur_frm.add_custom_button('Convert to Group', 
+		cur_frm.add_custom_button(wn._('Convert to Group'), 
 			function() { cur_frm.cscript.convert_to_group(); }, 'icon-retweet')
 	}
 }
diff --git a/accounts/doctype/cost_center/cost_center.py b/accounts/doctype/cost_center/cost_center.py
index d89cef0..692d47e 100644
--- a/accounts/doctype/cost_center/cost_center.py
+++ b/accounts/doctype/cost_center/cost_center.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 # License: GNU General Public License v3. See license.txt
 
 from __future__ import unicode_literals
diff --git a/accounts/doctype/cost_center/test_cost_center.py b/accounts/doctype/cost_center/test_cost_center.py
index 056755e..2fd7ecf 100644
--- a/accounts/doctype/cost_center/test_cost_center.py
+++ b/accounts/doctype/cost_center/test_cost_center.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 # License: GNU General Public License v3. See license.txt
 
 test_records = [
diff --git a/accounts/doctype/fiscal_year/fiscal_year.js b/accounts/doctype/fiscal_year/fiscal_year.js
index c5500aa..7923a02 100644
--- a/accounts/doctype/fiscal_year/fiscal_year.js
+++ b/accounts/doctype/fiscal_year/fiscal_year.js
@@ -1,12 +1,12 @@
-// Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+// Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 // License: GNU General Public License v3. See license.txt
 
 cur_frm.cscript.refresh = function(doc, dt, dn) {
 	cur_frm.toggle_enable('year_start_date', doc.__islocal)
 	
 	if (!doc.__islocal && (doc.name != sys_defaults.fiscal_year)) {
-		cur_frm.add_custom_button("Set as Default", cur_frm.cscript.set_as_default);
-		cur_frm.set_intro("To set this Fiscal Year as Deafult, click on 'Set as Default'");
+		cur_frm.add_custom_button(wn._("Set as Default"), cur_frm.cscript.set_as_default);
+		cur_frm.set_intro(wn._("To set this Fiscal Year as Deafult, click on 'Set as Default'"));
 	} else cur_frm.set_intro("");
 }
 
diff --git a/accounts/doctype/fiscal_year/fiscal_year.py b/accounts/doctype/fiscal_year/fiscal_year.py
index 2544c96..0e5ebe5 100644
--- a/accounts/doctype/fiscal_year/fiscal_year.py
+++ b/accounts/doctype/fiscal_year/fiscal_year.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 # License: GNU General Public License v3. See license.txt
 
 from __future__ import unicode_literals
diff --git a/accounts/doctype/fiscal_year/test_fiscal_year.py b/accounts/doctype/fiscal_year/test_fiscal_year.py
index 594375d..4ea8253 100644
--- a/accounts/doctype/fiscal_year/test_fiscal_year.py
+++ b/accounts/doctype/fiscal_year/test_fiscal_year.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 # License: GNU General Public License v3. See license.txt
 
 from __future__ import unicode_literals
diff --git a/accounts/doctype/gl_entry/gl_entry.py b/accounts/doctype/gl_entry/gl_entry.py
index e0babdf..3a0b28c 100644
--- a/accounts/doctype/gl_entry/gl_entry.py
+++ b/accounts/doctype/gl_entry/gl_entry.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 # License: GNU General Public License v3. See license.txt
 
 from __future__ import unicode_literals
@@ -146,16 +146,6 @@
 		webnotes.conn.sql("update `tab%s` set outstanding_amount=%s where name='%s'" %
 		 	(against_voucher_type, bal, against_voucher))
 			
-def validate_freezed_account(account, adv_adj=False):
-	"""Account has been freezed for other users except account manager"""
-	
-	freezed_account = webnotes.conn.get_value("Account", account, "freeze_account")
-	
-	if freezed_account == 'Yes' and not adv_adj \
-		and 'Accounts Manager' not in webnotes.user.get_roles():
-			webnotes.throw(_("Account") + ": " + account + _(" has been freezed. \
-			Only Accounts Manager can do transaction against this account"))
-
 def validate_frozen_account(account, adv_adj):
 	frozen_account = webnotes.conn.get_value("Account", account, "freeze_account")
 	if frozen_account == 'Yes' and not adv_adj:
@@ -168,4 +158,4 @@
 		elif frozen_accounts_modifier not in webnotes.user.get_roles():
 			webnotes.throw(account + _(" is a frozen account. ") + 
 				_("To create / edit transactions against this account, you need role") + ": " +  
-				frozen_accounts_modifier)
\ No newline at end of file
+				frozen_accounts_modifier)
diff --git a/accounts/doctype/gl_entry/gl_entry.txt b/accounts/doctype/gl_entry/gl_entry.txt
index 90b2ed4..5740579 100644
--- a/accounts/doctype/gl_entry/gl_entry.txt
+++ b/accounts/doctype/gl_entry/gl_entry.txt
@@ -2,7 +2,7 @@
  {
   "creation": "2013-01-10 16:34:06", 
   "docstatus": 0, 
-  "modified": "2013-08-22 17:12:13", 
+  "modified": "2013-11-03 14:14:09", 
   "modified_by": "Administrator", 
   "owner": "Administrator"
  }, 
@@ -41,7 +41,6 @@
   "name": "GL Entry"
  }, 
  {
-  "description": "The date at which current entry will get or has actually executed.", 
   "doctype": "DocField", 
   "fieldname": "posting_date", 
   "fieldtype": "Date", 
@@ -52,7 +51,6 @@
   "search_index": 1
  }, 
  {
-  "description": "The date at which current entry is made in system.", 
   "doctype": "DocField", 
   "fieldname": "transaction_date", 
   "fieldtype": "Date", 
diff --git a/accounts/doctype/journal_voucher/journal_voucher.js b/accounts/doctype/journal_voucher/journal_voucher.js
index a3aa6f1..a5cd06d 100644
--- a/accounts/doctype/journal_voucher/journal_voucher.js
+++ b/accounts/doctype/journal_voucher/journal_voucher.js
@@ -1,4 +1,4 @@
-// Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+// Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 // License: GNU General Public License v3. See license.txt
 
 wn.provide("erpnext.accounts");
@@ -12,10 +12,13 @@
 	load_defaults: function() {
 		if(this.frm.doc.__islocal && this.frm.doc.company) {
 			wn.model.set_default_values(this.frm.doc);
-			$.each(wn.model.get_doclist(this.frm.doc.doctype, this.frm.doc.name, {parentfield: "entries"}),
-				function(i, jvd) { wn.model.set_default_values(jvd); });
+			$.each(wn.model.get_doclist(this.frm.doc.doctype, 
+				this.frm.doc.name, {parentfield: "entries"}), function(i, jvd) {
+					wn.model.set_default_values(jvd);
+				}
+			);
 			
-			this.frm.doc.posting_date = get_today();
+			if(!this.frm.doc.amended_from) this.frm.doc.posting_date = get_today();
 		}
 	},
 	
@@ -59,6 +62,50 @@
 			};
 		});
 	},
+	
+	against_voucher: function(doc, cdt, cdn) {
+		var d = wn.model.get_doc(cdt, cdn);
+		if (d.against_voucher && !flt(d.debit)) {
+			this.get_outstanding({
+				'doctype': 'Purchase Invoice', 
+				'docname': d.against_voucher
+			}, d)
+		}
+	},
+	
+	against_invoice: function(doc, cdt, cdn) {
+		var d = wn.model.get_doc(cdt, cdn);
+		if (d.against_invoice && !flt(d.credit)) {
+			this.get_outstanding({
+				'doctype': 'Sales Invoice', 
+				'docname': d.against_invoice
+			}, d)
+		}
+	},
+	
+	against_jv: function(doc, cdt, cdn) {
+		var d = wn.model.get_doc(cdt, cdn);
+		if (d.against_jv && !flt(d.credit) && !flt(d.debit)) {
+			this.get_outstanding({
+				'doctype': 'Journal Voucher', 
+				'docname': d.against_jv,
+				'account': d.account
+			}, d)
+		}
+	},
+	
+	get_outstanding: function(args, child) {
+		var me = this;
+		return this.frm.call({
+			child: child,
+			method: "get_outstanding",
+			args: { args: args},
+			callback: function(r) {
+				cur_frm.cscript.update_totals(me.frm.doc);
+			}
+		});
+	}
+	
 });
 
 cur_frm.script_manager.make(erpnext.accounts.JournalVoucher);
@@ -68,14 +115,14 @@
 	erpnext.hide_naming_series();
 	cur_frm.cscript.voucher_type(doc);
 	if(doc.docstatus==1) { 
-		cur_frm.add_custom_button('View Ledger', function() {
+		cur_frm.appframe.add_button(wn._('View Ledger'), function() {
 			wn.route_options = {
 				"voucher_no": doc.name,
 				"from_date": doc.posting_date,
 				"to_date": doc.posting_date,
 			};
 			wn.set_route("general-ledger");
-		});
+		}, "icon-table");
 	}
 }
 
@@ -88,24 +135,6 @@
 	if (doc.is_opening == 'Yes') unhide_field('aging_date');
 }
 
-cur_frm.cscript.against_voucher = function(doc,cdt,cdn) {
-	var d = locals[cdt][cdn];
-	if (d.against_voucher && !flt(d.debit)) {
-		args = {'doctype': 'Purchase Invoice', 'docname': d.against_voucher }
-		return get_server_fields('get_outstanding',docstring(args),'entries',doc,cdt,cdn,1,function(r,rt) { cur_frm.cscript.update_totals(doc); });
-	}
-}
-
-cur_frm.cscript.against_invoice = function(doc,cdt,cdn) {
-	var d = locals[cdt][cdn];
-	if (d.against_invoice && !flt(d.credit)) {
-		args = {'doctype': 'Sales Invoice', 'docname': d.against_invoice }
-		return get_server_fields('get_outstanding',docstring(args),'entries',doc,cdt,cdn,1,function(r,rt) { cur_frm.cscript.update_totals(doc); });
-	}
-}
-
-// Update Totals
-
 cur_frm.cscript.update_totals = function(doc) {
 	var td=0.0; var tc =0.0;
 	var el = getchildren('Journal Voucher Detail', doc.name, 'entries');
@@ -156,7 +185,7 @@
 		cur_frm.pformat.print_heading = doc.select_print_heading;
 	}
 	else
-		cur_frm.pformat.print_heading = "Journal Voucher";
+		cur_frm.pformat.print_heading = wn._("Journal Voucher");
 }
 
 cur_frm.cscript.voucher_type = function(doc, cdt, cdn) {
diff --git a/accounts/doctype/journal_voucher/journal_voucher.py b/accounts/doctype/journal_voucher/journal_voucher.py
index 8fb47f7..00cbc03 100644
--- a/accounts/doctype/journal_voucher/journal_voucher.py
+++ b/accounts/doctype/journal_voucher/journal_voucher.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 # License: GNU General Public License v3. See license.txt
 
 from __future__ import unicode_literals
@@ -268,15 +268,6 @@
 			if master_type == "Customer" and master_name:
 				super(DocType, self).check_credit_limit(d.account)
 
-	def get_outstanding(self, args):
-		args = eval(args)
-		o_s = webnotes.conn.sql("""select outstanding_amount from `tab%s` where name = %s""" % 
-			(args['doctype'], '%s'), args['docname'])
-		if args['doctype'] == 'Purchase Invoice':
-			return {'debit': o_s and flt(o_s[0][0]) or 0}
-		if args['doctype'] == 'Sales Invoice':
-			return {'credit': o_s and flt(o_s[0][0]) or 0}
-	
 	def get_balance(self):
 		if not getlist(self.doclist,'entries'):
 			msgprint("Please enter atleast 1 entry in 'GL Entries' table")
@@ -442,4 +433,31 @@
 		where jv_detail.parent = jv.name and jv_detail.account = %s and jv.docstatus = 1 
 		and jv.%s like %s order by jv.name desc limit %s, %s""" % 
 		("%s", searchfield, "%s", "%s", "%s"), 
-		(filters["account"], "%%%s%%" % txt, start, page_len))
\ No newline at end of file
+		(filters["account"], "%%%s%%" % txt, start, page_len))
+
+@webnotes.whitelist()		
+def get_outstanding(args):
+	args = eval(args)
+	if args.get("doctype") == "Journal Voucher" and args.get("account"):
+		against_jv_amount = webnotes.conn.sql("""
+			select sum(ifnull(debit, 0)) - sum(ifnull(credit, 0)) 
+			from `tabJournal Voucher Detail` where parent=%s and account=%s 
+			and ifnull(against_invoice, '')='' and ifnull(against_voucher, '')=''
+			and ifnull(against_jv, '')=''""", (args['docname'], args['account']))
+			
+		against_jv_amount = flt(against_jv_amount[0][0]) if against_jv_amount else 0
+		if against_jv_amount > 0:
+			return {"credit": against_jv_amount}
+		else:
+			return {"debit": -1* against_jv_amount}
+		
+	elif args.get("doctype") == "Sales Invoice":
+		return {
+			"credit": flt(webnotes.conn.get_value("Sales Invoice", args["docname"], 
+				"outstanding_amount"))
+		}
+	elif args.get("doctype") == "Purchase Invoice":
+		return {
+			"debit": flt(webnotes.conn.get_value("Purchase Invoice", args["docname"], 
+				"outstanding_amount"))
+		}
diff --git a/accounts/doctype/journal_voucher/journal_voucher.txt b/accounts/doctype/journal_voucher/journal_voucher.txt
index fdc27ea..b47d7ed 100644
--- a/accounts/doctype/journal_voucher/journal_voucher.txt
+++ b/accounts/doctype/journal_voucher/journal_voucher.txt
@@ -2,7 +2,7 @@
  {
   "creation": "2013-03-25 10:53:52", 
   "docstatus": 0, 
-  "modified": "2013-09-10 14:59:41", 
+  "modified": "2013-11-03 14:11:33", 
   "modified_by": "Administrator", 
   "owner": "Administrator"
  }, 
@@ -55,11 +55,10 @@
   "width": "50%"
  }, 
  {
-  "description": "To manage multiple series please go to Setup > Manage Series", 
   "doctype": "DocField", 
   "fieldname": "naming_series", 
   "fieldtype": "Select", 
-  "label": "Document Numbering Series", 
+  "label": "Series", 
   "no_copy": 1, 
   "oldfieldname": "naming_series", 
   "oldfieldtype": "Select", 
@@ -91,7 +90,6 @@
   "width": "50%"
  }, 
  {
-  "description": "The date at which current entry will get or has actually executed.", 
   "doctype": "DocField", 
   "fieldname": "posting_date", 
   "fieldtype": "Date", 
@@ -448,7 +446,7 @@
   "doctype": "DocField", 
   "fieldname": "select_print_heading", 
   "fieldtype": "Link", 
-  "label": "Select Print Heading", 
+  "label": "Print Heading", 
   "no_copy": 1, 
   "oldfieldname": "select_print_heading", 
   "oldfieldtype": "Link", 
diff --git a/accounts/doctype/journal_voucher/test_journal_voucher.py b/accounts/doctype/journal_voucher/test_journal_voucher.py
index f80b945..70fb4e2 100644
--- a/accounts/doctype/journal_voucher/test_journal_voucher.py
+++ b/accounts/doctype/journal_voucher/test_journal_voucher.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 # License: GNU General Public License v3. See license.txt
 
 
diff --git a/accounts/doctype/journal_voucher_detail/journal_voucher_detail.py b/accounts/doctype/journal_voucher_detail/journal_voucher_detail.py
index 26d0f76..cb6190f 100644
--- a/accounts/doctype/journal_voucher_detail/journal_voucher_detail.py
+++ b/accounts/doctype/journal_voucher_detail/journal_voucher_detail.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 # License: GNU General Public License v3. See license.txt
 
 from __future__ import unicode_literals
diff --git a/accounts/doctype/mis_control/mis_control.py b/accounts/doctype/mis_control/mis_control.py
index 84350dc..1068cf3 100644
--- a/accounts/doctype/mis_control/mis_control.py
+++ b/accounts/doctype/mis_control/mis_control.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 # License: GNU General Public License v3. See license.txt
 
 from __future__ import unicode_literals
@@ -11,7 +11,6 @@
 
 import webnotes.defaults
 
-sql = webnotes.conn.sql
 
 from accounts.utils import get_balance_on, get_fiscal_year
 
@@ -44,7 +43,7 @@
 		ret['company'] = get_companies()
 
 		#--- to get fiscal year and start_date of that fiscal year -----
-		res = sql("select name, year_start_date from `tabFiscal Year`")
+		res = webnotes.conn.sql("select name, year_start_date from `tabFiscal Year`")
 		ret['fiscal_year'] = [r[0] for r in res]
 		ret['start_dates'] = {}
 		for r in res:
@@ -52,7 +51,7 @@
 			
 		#--- from month and to month (for MIS - Comparison Report) -------
 		month_list = ['Jan','Feb','Mar','Apr','May','Jun','Jul','Aug','Sep','Oct','Nov','Dec']
-		fiscal_start_month = sql("select MONTH(year_start_date) from `tabFiscal Year` where name = %s",(webnotes.defaults.get_global_default("fiscal_year")))
+		fiscal_start_month = webnotes.conn.sql("select MONTH(year_start_date) from `tabFiscal Year` where name = %s",(webnotes.defaults.get_global_default("fiscal_year")))
 		fiscal_start_month = fiscal_start_month and fiscal_start_month[0][0] or 1
 		mon = ['']
 		for i in range(fiscal_start_month,13): mon.append(month_list[i-1])
@@ -107,7 +106,7 @@
 	def dates(self,fiscal_year,from_date,to_date):
 		import datetime
 		ret = ''
-		start_date = cstr(sql("select year_start_date from `tabFiscal Year` where name = %s",fiscal_year)[0][0])
+		start_date = cstr(webnotes.conn.sql("select year_start_date from `tabFiscal Year` where name = %s",fiscal_year)[0][0])
 		st_mon = cint(from_date.split('-')[1])
 		ed_mon = cint(to_date.split('-')[1])
 		st_day = cint(from_date.split('-')[2])
@@ -152,7 +151,7 @@
 	def get_totals(self, args):
 		args = eval(args)
 		#msgprint(args)
-		totals = sql("SELECT %s FROM %s WHERE %s %s %s %s" %(cstr(args['query_val']), cstr(args['tables']), cstr(args['company']), cstr(args['cond']), cstr(args['add_cond']), cstr(args['fil_cond'])), as_dict = 1)[0]
+		totals = webnotes.conn.sql("SELECT %s FROM %s WHERE %s %s %s %s" %(cstr(args['query_val']), cstr(args['tables']), cstr(args['company']), cstr(args['cond']), cstr(args['add_cond']), cstr(args['fil_cond'])), as_dict = 1)[0]
 		#msgprint(totals)
 		tot_keys = totals.keys()
 		# return in flt because JSON doesn't accept Decimal
@@ -185,7 +184,7 @@
 	# Get Children
 	# ------------
 	def get_children(self, parent_account, level, pl, company, fy):
-		cl = sql("select distinct account_name, name, debit_or_credit, lft, rgt from `tabAccount` where ifnull(parent_account, '') = %s and ifnull(is_pl_account, 'No')=%s and company=%s and docstatus != 2 order by name asc", (parent_account, pl, company))
+		cl = webnotes.conn.sql("select distinct account_name, name, debit_or_credit, lft, rgt from `tabAccount` where ifnull(parent_account, '') = %s and ifnull(is_pl_account, 'No')=%s and company=%s and docstatus != 2 order by name asc", (parent_account, pl, company))
 		level0_diff = [0 for p in self.period_list]
 		if pl=='Yes' and level==0: # switch for income & expenses
 			cl = [c for c in cl]
@@ -238,7 +237,7 @@
 	def define_periods(self, year, period):
 		
 		# get year start date		
-		ysd = sql("select year_start_date from `tabFiscal Year` where name=%s", year)
+		ysd = webnotes.conn.sql("select year_start_date from `tabFiscal Year` where name=%s", year)
 		ysd = ysd and ysd[0][0] or ''
 
 		self.ysd = ysd
diff --git a/accounts/doctype/mode_of_payment/mode_of_payment.js b/accounts/doctype/mode_of_payment/mode_of_payment.js
index 956c7b2..f2b2ead 100644
--- a/accounts/doctype/mode_of_payment/mode_of_payment.js
+++ b/accounts/doctype/mode_of_payment/mode_of_payment.js
@@ -1,4 +1,4 @@
-// Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+// Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 // License: GNU General Public License v3. See license.txt
 
 cur_frm.set_query("default_account", function(doc) {
diff --git a/accounts/doctype/mode_of_payment/mode_of_payment.py b/accounts/doctype/mode_of_payment/mode_of_payment.py
index 26d0f76..cb6190f 100644
--- a/accounts/doctype/mode_of_payment/mode_of_payment.py
+++ b/accounts/doctype/mode_of_payment/mode_of_payment.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 # License: GNU General Public License v3. See license.txt
 
 from __future__ import unicode_literals
diff --git a/accounts/doctype/payment_to_invoice_matching_tool/payment_to_invoice_matching_tool.js b/accounts/doctype/payment_to_invoice_matching_tool/payment_to_invoice_matching_tool.js
index a48520c..6f7d515 100644
--- a/accounts/doctype/payment_to_invoice_matching_tool/payment_to_invoice_matching_tool.js
+++ b/accounts/doctype/payment_to_invoice_matching_tool/payment_to_invoice_matching_tool.js
@@ -1,4 +1,4 @@
-// Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+// Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 // License: GNU General Public License v3. See license.txt
 
 // Booking Entry Id
@@ -13,15 +13,15 @@
 cur_frm.cscript.refresh = function(doc) {
 	cur_frm.set_intro("");
 	if(!doc.voucher_no) {
-		cur_frm.set_intro("Select the Invoice against which you want to allocate payments.");
+		cur_frm.set_intro(wn._("Select the Invoice against which you want to allocate payments."));
 	} else {
-		cur_frm.set_intro("Set allocated amount against each Payment Entry and click 'Allocate'.");
+		cur_frm.set_intro(wn._("Set allocated amount against each Payment Entry and click 'Allocate'."));
 	}
 }
 
 cur_frm.fields_dict.voucher_no.get_query = function(doc) {
 	// TO-do: check for pos, it should not come
-	if (!doc.account) msgprint("Please select Account first");
+	if (!doc.account) msgprint(wn._("Please select Account first"));
 	else {
 		return {
 			doctype: doc.voucher_type,
diff --git a/accounts/doctype/payment_to_invoice_matching_tool/payment_to_invoice_matching_tool.py b/accounts/doctype/payment_to_invoice_matching_tool/payment_to_invoice_matching_tool.py
index 1dda6c7..6a31191 100644
--- a/accounts/doctype/payment_to_invoice_matching_tool/payment_to_invoice_matching_tool.py
+++ b/accounts/doctype/payment_to_invoice_matching_tool/payment_to_invoice_matching_tool.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 # License: GNU General Public License v3. See license.txt
 
 from __future__ import unicode_literals
diff --git a/accounts/doctype/payment_to_invoice_matching_tool/test_payment_to_invoice_matching_tool.py b/accounts/doctype/payment_to_invoice_matching_tool/test_payment_to_invoice_matching_tool.py
index 9edfbc3..7cf8c06 100644
--- a/accounts/doctype/payment_to_invoice_matching_tool/test_payment_to_invoice_matching_tool.py
+++ b/accounts/doctype/payment_to_invoice_matching_tool/test_payment_to_invoice_matching_tool.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 # License: GNU General Public License v3. See license.txt
 
 from __future__ import unicode_literals
diff --git a/accounts/doctype/payment_to_invoice_matching_tool_detail/payment_to_invoice_matching_tool_detail.py b/accounts/doctype/payment_to_invoice_matching_tool_detail/payment_to_invoice_matching_tool_detail.py
index 26d0f76..cb6190f 100644
--- a/accounts/doctype/payment_to_invoice_matching_tool_detail/payment_to_invoice_matching_tool_detail.py
+++ b/accounts/doctype/payment_to_invoice_matching_tool_detail/payment_to_invoice_matching_tool_detail.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 # License: GNU General Public License v3. See license.txt
 
 from __future__ import unicode_literals
diff --git a/accounts/doctype/period_closing_voucher/period_closing_voucher.js b/accounts/doctype/period_closing_voucher/period_closing_voucher.js
index e2aca23..56eb330 100644
--- a/accounts/doctype/period_closing_voucher/period_closing_voucher.js
+++ b/accounts/doctype/period_closing_voucher/period_closing_voucher.js
@@ -1,4 +1,4 @@
-// Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+// Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 // License: GNU General Public License v3. See license.txt
 
 
diff --git a/accounts/doctype/period_closing_voucher/period_closing_voucher.py b/accounts/doctype/period_closing_voucher/period_closing_voucher.py
index 99282f5..69061bf 100644
--- a/accounts/doctype/period_closing_voucher/period_closing_voucher.py
+++ b/accounts/doctype/period_closing_voucher/period_closing_voucher.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 # License: GNU General Public License v3. See license.txt
 
 from __future__ import unicode_literals
@@ -69,7 +69,6 @@
 		
 	def get_pl_balances(self):
 		"""Get balance for pl accounts"""
-		
 		return webnotes.conn.sql("""
 			select t1.account, sum(ifnull(t1.debit,0))-sum(ifnull(t1.credit,0)) as balance
 			from `tabGL Entry` t1, `tabAccount` t2 
@@ -101,4 +100,4 @@
 			}))
 			
 		from accounts.general_ledger import make_gl_entries
-		make_gl_entries(gl_entries)
\ No newline at end of file
+		make_gl_entries(gl_entries)
diff --git a/accounts/doctype/period_closing_voucher/test_period_closing_voucher.py b/accounts/doctype/period_closing_voucher/test_period_closing_voucher.py
index c21d63f..97e49ae 100644
--- a/accounts/doctype/period_closing_voucher/test_period_closing_voucher.py
+++ b/accounts/doctype/period_closing_voucher/test_period_closing_voucher.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 # License: GNU General Public License v3. See license.txt
 
 
@@ -8,6 +8,9 @@
 
 class TestPeriodClosingVoucher(unittest.TestCase):
 	def test_closing_entry(self):
+		# clear GL Entries
+		webnotes.conn.sql("""delete from `tabGL Entry`""")
+		
 		from accounts.doctype.journal_voucher.test_journal_voucher import test_records as jv_records
 		jv = webnotes.bean(copy=jv_records[2])
 		jv.insert()
diff --git a/accounts/doctype/pos_setting/pos_setting.js b/accounts/doctype/pos_setting/pos_setting.js
index af4f993..8c5f254 100755
--- a/accounts/doctype/pos_setting/pos_setting.js
+++ b/accounts/doctype/pos_setting/pos_setting.js
@@ -1,4 +1,4 @@
-// Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+// Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 // License: GNU General Public License v3. See license.txt
 
 cur_frm.cscript.onload = function(doc,cdt,cdn){
diff --git a/accounts/doctype/pos_setting/pos_setting.py b/accounts/doctype/pos_setting/pos_setting.py
index 6bb85cb..a5a11e9 100755
--- a/accounts/doctype/pos_setting/pos_setting.py
+++ b/accounts/doctype/pos_setting/pos_setting.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 # License: GNU General Public License v3. See license.txt
 
 from __future__ import unicode_literals
diff --git a/accounts/doctype/pos_setting/pos_setting.txt b/accounts/doctype/pos_setting/pos_setting.txt
index 7eda7fd..09a3757 100755
--- a/accounts/doctype/pos_setting/pos_setting.txt
+++ b/accounts/doctype/pos_setting/pos_setting.txt
@@ -2,7 +2,7 @@
  {
   "creation": "2013-05-24 12:15:51", 
   "docstatus": 0, 
-  "modified": "2013-10-15 11:12:02", 
+  "modified": "2013-11-02 16:58:38", 
   "modified_by": "Administrator", 
   "owner": "Administrator"
  }, 
@@ -48,6 +48,7 @@
   "read_only": 0
  }, 
  {
+  "description": "<a href=\"#Sales Browser/Territory\">Add / Edit</a>", 
   "doctype": "DocField", 
   "fieldname": "territory", 
   "fieldtype": "Link", 
@@ -62,7 +63,7 @@
   "doctype": "DocField", 
   "fieldname": "naming_series", 
   "fieldtype": "Select", 
-  "label": "Document Numbering Series", 
+  "label": "Series", 
   "no_copy": 1, 
   "oldfieldname": "naming_series", 
   "oldfieldtype": "Select", 
@@ -222,7 +223,7 @@
   "fieldname": "select_print_heading", 
   "fieldtype": "Select", 
   "in_filter": 0, 
-  "label": "Select Print Heading", 
+  "label": "Print Heading", 
   "oldfieldname": "select_print_heading", 
   "oldfieldtype": "Select", 
   "options": "link:Print Heading", 
diff --git a/accounts/doctype/pos_setting/test_pos_setting.py b/accounts/doctype/pos_setting/test_pos_setting.py
index 8d02c57..42125cd 100644
--- a/accounts/doctype/pos_setting/test_pos_setting.py
+++ b/accounts/doctype/pos_setting/test_pos_setting.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 # License: GNU General Public License v3. See license.txt
 
 test_records = [
diff --git a/accounts/doctype/purchase_invoice/purchase_invoice.js b/accounts/doctype/purchase_invoice/purchase_invoice.js
index fb5569a..9d75264 100644
--- a/accounts/doctype/purchase_invoice/purchase_invoice.js
+++ b/accounts/doctype/purchase_invoice/purchase_invoice.js
@@ -1,4 +1,4 @@
-// Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+// Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 // License: GNU General Public License v3. See license.txt
 
 cur_frm.cscript.tname = "Purchase Invoice Item";
@@ -27,17 +27,17 @@
 		
 		// Show / Hide button
 		if(doc.docstatus==1 && doc.outstanding_amount > 0)
-			this.frm.add_custom_button('Make Payment Entry', this.make_bank_voucher);
+			this.frm.add_custom_button(wn._('Make Payment Entry'), this.make_bank_voucher);
 
 		if(doc.docstatus==1) { 
-			cur_frm.add_custom_button('View Ledger', function() {
+			cur_frm.appframe.add_button(wn._('View Ledger'), function() {
 				wn.route_options = {
 					"voucher_no": doc.name,
 					"from_date": doc.posting_date,
 					"to_date": doc.posting_date,
 				};
 				wn.set_route("general-ledger");
-			});
+			}, "icon-table");
 		}
 
 		if(doc.docstatus===0) {
@@ -214,5 +214,5 @@
 		cur_frm.pformat.print_heading = doc.select_print_heading;
 	}
 	else
-		cur_frm.pformat.print_heading = "Purchase Invoice";
+		cur_frm.pformat.print_heading = wn._("Purchase Invoice");
 }
\ No newline at end of file
diff --git a/accounts/doctype/purchase_invoice/purchase_invoice.py b/accounts/doctype/purchase_invoice/purchase_invoice.py
index 55776d9..6c71fff 100644
--- a/accounts/doctype/purchase_invoice/purchase_invoice.py
+++ b/accounts/doctype/purchase_invoice/purchase_invoice.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 # License: GNU General Public License v3. See license.txt
 
 from __future__ import unicode_literals
@@ -12,7 +12,6 @@
 
 import webnotes.defaults
 
-sql = webnotes.conn.sql
 	
 from controllers.buying_controller import BuyingController
 class DocType(BuyingController):
@@ -64,18 +63,21 @@
 	def get_credit_to(self):
 		ret = {}
 		if self.doc.supplier:
-			acc_head = sql("""select name, credit_days from `tabAccount` 
+			acc_head = webnotes.conn.sql("""select name, credit_days from `tabAccount` 
 				where (name = %s or (master_name = %s and master_type = 'supplier')) 
 				and docstatus != 2 and company = %s""", 
 				(cstr(self.doc.supplier) + " - " + self.company_abbr, 
 				self.doc.supplier, self.doc.company))
-
+		
 			if acc_head and acc_head[0][0]:
 				ret['credit_to'] = acc_head[0][0]
 				if not self.doc.due_date:
-					ret['due_date'] = add_days(cstr(self.doc.posting_date), acc_head and cint(acc_head[0][1]) or 0)
+					ret['due_date'] = add_days(cstr(self.doc.posting_date), 
+						acc_head and cint(acc_head[0][1]) or 0)
 			elif not acc_head:
-				msgprint("%s does not have an Account Head in %s. You must first create it from the Supplier Master" % (self.doc.supplier, self.doc.company))
+				msgprint("%s does not have an Account Head in %s. \
+					You must first create it from the Supplier Master" % \
+					(self.doc.supplier, self.doc.company))
 		return ret
 		
 	def set_supplier_defaults(self):
@@ -86,18 +88,10 @@
 		super(DocType, self).get_advances(self.doc.credit_to, 
 			"Purchase Invoice Advance", "advance_allocation_details", "debit")
 		
-	def get_rate(self,arg):
-		return get_obj('Purchase Common').get_rate(arg,self)
-
-	def get_rate1(self,acc):
-		rate = sql("select tax_rate from `tabAccount` where name='%s'"%(acc))
-		ret={'add_tax_rate' :rate and flt(rate[0][0]) or 0 }
-		return ret
-
 	def check_active_purchase_items(self):
 		for d in getlist(self.doclist, 'entries'):
 			if d.item_code:		# extra condn coz item_code is not mandatory in PV
-				valid_item = sql("select docstatus,is_purchase_item from tabItem where name = %s",d.item_code)
+				valid_item = webnotes.conn.sql("select docstatus,is_purchase_item from tabItem where name = %s",d.item_code)
 				if valid_item[0][0] == 2:
 					msgprint("Item : '%s' is Inactive, you can restore it from Trash" %(d.item_code))
 					raise Exception
@@ -117,7 +111,7 @@
 	def validate_bill_no(self):
 		if self.doc.bill_no and self.doc.bill_no.lower().strip() \
 				not in ['na', 'not applicable', 'none']:
-			b_no = sql("""select bill_no, name, ifnull(is_opening,'') from `tabPurchase Invoice` 
+			b_no = webnotes.conn.sql("""select bill_no, name, ifnull(is_opening,'') from `tabPurchase Invoice` 
 				where bill_no = %s and credit_to = %s and docstatus = 1 and name != %s""", 
 				(self.doc.bill_no, self.doc.credit_to, self.doc.name))
 			if b_no and cstr(b_no[0][2]) == cstr(self.doc.is_opening):
@@ -133,7 +127,7 @@
 			self.doc.remarks = "No Remarks"
 
 	def validate_credit_acc(self):
-		acc = sql("select debit_or_credit, is_pl_account from tabAccount where name = %s", 
+		acc = webnotes.conn.sql("select debit_or_credit, is_pl_account from tabAccount where name = %s", 
 			self.doc.credit_to)
 		if not acc:
 			msgprint("Account: "+ self.doc.credit_to + "does not exist")
@@ -149,7 +143,7 @@
 	# ------------------------------------------------------------
 	def check_for_acc_head_of_supplier(self): 
 		if self.doc.supplier and self.doc.credit_to:
-			acc_head = sql("select master_name from `tabAccount` where name = %s", self.doc.credit_to)
+			acc_head = webnotes.conn.sql("select master_name from `tabAccount` where name = %s", self.doc.credit_to)
 			
 			if (acc_head and cstr(acc_head[0][0]) != cstr(self.doc.supplier)) or (not acc_head and (self.doc.credit_to != cstr(self.doc.supplier) + " - " + self.company_abbr)):
 				msgprint("Credit To: %s do not match with Supplier: %s for Company: %s.\n If both correctly entered, please select Master Type and Master Name in account master." %(self.doc.credit_to,self.doc.supplier,self.doc.company), raise_exception=1)
@@ -161,7 +155,7 @@
 		for d in getlist(self.doclist,'entries'):
 			if d.purchase_order and not d.purchase_order in check_list and not d.purchase_receipt:
 				check_list.append(d.purhcase_order)
-				stopped = sql("select name from `tabPurchase Order` where status = 'Stopped' and name = '%s'" % d.purchase_order)
+				stopped = webnotes.conn.sql("select name from `tabPurchase Order` where status = 'Stopped' and name = '%s'" % d.purchase_order)
 				if stopped:
 					msgprint("One cannot do any transaction against 'Purchase Order' : %s, it's status is 'Stopped'" % (d.purhcase_order))
 					raise Exception
@@ -261,11 +255,11 @@
 	def check_prev_docstatus(self):
 		for d in getlist(self.doclist,'entries'):
 			if d.purchase_order:
-				submitted = sql("select name from `tabPurchase Order` where docstatus = 1 and name = '%s'" % d.purchase_order)
+				submitted = webnotes.conn.sql("select name from `tabPurchase Order` where docstatus = 1 and name = '%s'" % d.purchase_order)
 				if not submitted:
 					webnotes.throw("Purchase Order : "+ cstr(d.purchase_order) +" is not submitted")
 			if d.purchase_receipt:
-				submitted = sql("select name from `tabPurchase Receipt` where docstatus = 1 and name = '%s'" % d.purchase_receipt)
+				submitted = webnotes.conn.sql("select name from `tabPurchase Receipt` where docstatus = 1 and name = '%s'" % d.purchase_receipt)
 				if not submitted:
 					webnotes.throw("Purchase Receipt : "+ cstr(d.purchase_receipt) +" is not submitted")
 					
@@ -299,20 +293,14 @@
 			reconcile_against_document(lst)
 
 	def on_submit(self):
-		purchase_controller = webnotes.get_obj("Purchase Common")
-		purchase_controller.is_item_table_empty(self)
-
 		self.check_prev_docstatus()
 		
-		# Check for Approving Authority
-		get_obj('Authorization Control').validate_approving_authority(self.doc.doctype,self.doc.company, self.doc.grand_total)
-		
+		get_obj('Authorization Control').validate_approving_authority(self.doc.doctype, 
+			self.doc.company, self.doc.grand_total)
 		
 		# this sequence because outstanding may get -negative
 		self.make_gl_entries()
-				
 		self.update_against_document_in_jv()
-		
 		self.update_prevdoc_status()
 
 	def make_gl_entries(self):
@@ -454,7 +442,7 @@
 	def update_raw_material_cost(self):
 		if self.sub_contracted_items:
 			for d in self.doclist.get({"parentfield": "entries"}):
-				rm_cost = webnotes.conn.sql(""" select raw_material_cost / quantity 
+				rm_cost = webnotes.conn.sql("""select raw_material_cost / quantity 
 					from `tabBOM` where item = %s and is_default = 1 and docstatus = 1 
 					and is_active = 1 """, (d.item_code,))
 				rm_cost = rm_cost and flt(rm_cost[0][0]) or 0
diff --git a/accounts/doctype/purchase_invoice/purchase_invoice.txt b/accounts/doctype/purchase_invoice/purchase_invoice.txt
index f5bdd93..f98c14a 100755
--- a/accounts/doctype/purchase_invoice/purchase_invoice.txt
+++ b/accounts/doctype/purchase_invoice/purchase_invoice.txt
@@ -2,12 +2,13 @@
  {
   "creation": "2013-05-21 16:16:39", 
   "docstatus": 0, 
-  "modified": "2013-08-09 14:45:35", 
+  "modified": "2013-11-05 23:09:38", 
   "modified_by": "Administrator", 
   "owner": "Administrator"
  }, 
  {
   "allow_attach": 1, 
+  "allow_import": 1, 
   "autoname": "naming_series:", 
   "doctype": "DocType", 
   "icon": "icon-file-text", 
@@ -55,11 +56,10 @@
   "width": "50%"
  }, 
  {
-  "description": "To manage multiple series please go to Setup > Manage Series", 
   "doctype": "DocField", 
   "fieldname": "naming_series", 
   "fieldtype": "Select", 
-  "label": "Document Numbering Series", 
+  "label": "Series", 
   "no_copy": 1, 
   "oldfieldname": "naming_series", 
   "oldfieldtype": "Select", 
@@ -85,7 +85,7 @@
   "depends_on": "supplier", 
   "doctype": "DocField", 
   "fieldname": "supplier_name", 
-  "fieldtype": "Text", 
+  "fieldtype": "Data", 
   "hidden": 0, 
   "in_list_view": 1, 
   "label": "Name", 
@@ -137,7 +137,6 @@
  }, 
  {
   "default": "Today", 
-  "description": "The date at which current entry will get or has actually executed.", 
   "doctype": "DocField", 
   "fieldname": "posting_date", 
   "fieldtype": "Date", 
@@ -240,7 +239,6 @@
   "read_only": 0
  }, 
  {
-  "description": "Consider this Price List for fetching rate. (only which have \"For Buying\" as checked)", 
   "doctype": "DocField", 
   "fieldname": "buying_price_list", 
   "fieldtype": "Link", 
@@ -250,7 +248,6 @@
   "read_only": 0
  }, 
  {
-  "depends_on": "buying_price_list", 
   "doctype": "DocField", 
   "fieldname": "price_list_currency", 
   "fieldtype": "Link", 
@@ -260,7 +257,6 @@
   "read_only": 1
  }, 
  {
-  "depends_on": "buying_price_list", 
   "doctype": "DocField", 
   "fieldname": "plc_conversion_rate", 
   "fieldtype": "Float", 
@@ -322,7 +318,6 @@
   "read_only": 1
  }, 
  {
-  "description": "Add / Edit Taxes and Charges", 
   "doctype": "DocField", 
   "fieldname": "taxes", 
   "fieldtype": "Section Break", 
@@ -335,7 +330,7 @@
   "doctype": "DocField", 
   "fieldname": "purchase_other_charges", 
   "fieldtype": "Link", 
-  "label": "Purchase Taxes and Charges", 
+  "label": "Tax Master", 
   "oldfieldname": "purchase_other_charges", 
   "oldfieldtype": "Link", 
   "options": "Purchase Taxes and Charges Master", 
@@ -606,7 +601,7 @@
   "doctype": "DocField", 
   "fieldname": "tc_name", 
   "fieldtype": "Link", 
-  "label": "Select Terms and Conditions", 
+  "label": "Terms", 
   "options": "Terms and Conditions", 
   "print_hide": 1
  }, 
@@ -706,7 +701,7 @@
   "doctype": "DocField", 
   "fieldname": "select_print_heading", 
   "fieldtype": "Link", 
-  "label": "Select Print Heading", 
+  "label": "Print Heading", 
   "no_copy": 1, 
   "oldfieldname": "select_print_heading", 
   "oldfieldtype": "Link", 
diff --git a/accounts/doctype/purchase_invoice/purchase_invoice_list.js b/accounts/doctype/purchase_invoice/purchase_invoice_list.js
index 96c0664..96bcbb4 100644
--- a/accounts/doctype/purchase_invoice/purchase_invoice_list.js
+++ b/accounts/doctype/purchase_invoice/purchase_invoice_list.js
@@ -1,4 +1,4 @@
-// Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+// Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 // License: GNU General Public License v3. See license.txt
 
 // render
diff --git a/accounts/doctype/purchase_invoice/test_purchase_invoice.py b/accounts/doctype/purchase_invoice/test_purchase_invoice.py
index 9e9e2f6..9d82ca7 100644
--- a/accounts/doctype/purchase_invoice/test_purchase_invoice.py
+++ b/accounts/doctype/purchase_invoice/test_purchase_invoice.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 # License: GNU General Public License v3. See license.txt
 
 
diff --git a/accounts/doctype/purchase_invoice_advance/purchase_invoice_advance.py b/accounts/doctype/purchase_invoice_advance/purchase_invoice_advance.py
index 26d0f76..cb6190f 100644
--- a/accounts/doctype/purchase_invoice_advance/purchase_invoice_advance.py
+++ b/accounts/doctype/purchase_invoice_advance/purchase_invoice_advance.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 # License: GNU General Public License v3. See license.txt
 
 from __future__ import unicode_literals
diff --git a/accounts/doctype/purchase_invoice_item/purchase_invoice_item.py b/accounts/doctype/purchase_invoice_item/purchase_invoice_item.py
index 26d0f76..cb6190f 100644
--- a/accounts/doctype/purchase_invoice_item/purchase_invoice_item.py
+++ b/accounts/doctype/purchase_invoice_item/purchase_invoice_item.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 # License: GNU General Public License v3. See license.txt
 
 from __future__ import unicode_literals
diff --git a/accounts/doctype/purchase_invoice_item/purchase_invoice_item.txt b/accounts/doctype/purchase_invoice_item/purchase_invoice_item.txt
index d7fb8e5..1a79636 100755
--- a/accounts/doctype/purchase_invoice_item/purchase_invoice_item.txt
+++ b/accounts/doctype/purchase_invoice_item/purchase_invoice_item.txt
@@ -2,7 +2,7 @@
  {
   "creation": "2013-05-22 12:43:10", 
   "docstatus": 0, 
-  "modified": "2013-07-10 14:54:12", 
+  "modified": "2013-11-02 19:41:17", 
   "modified_by": "Administrator", 
   "owner": "Administrator"
  }, 
@@ -242,6 +242,7 @@
   "read_only": 0
  }, 
  {
+  "description": "<a href=\"#Sales Browser/Item Group\">Add / Edit</a>", 
   "doctype": "DocField", 
   "fieldname": "item_group", 
   "fieldtype": "Link", 
diff --git a/accounts/doctype/purchase_taxes_and_charges/purchase_taxes_and_charges.py b/accounts/doctype/purchase_taxes_and_charges/purchase_taxes_and_charges.py
index 26d0f76..cb6190f 100644
--- a/accounts/doctype/purchase_taxes_and_charges/purchase_taxes_and_charges.py
+++ b/accounts/doctype/purchase_taxes_and_charges/purchase_taxes_and_charges.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 # License: GNU General Public License v3. See license.txt
 
 from __future__ import unicode_literals
diff --git a/accounts/doctype/purchase_taxes_and_charges_master/purchase_taxes_and_charges_master.js b/accounts/doctype/purchase_taxes_and_charges_master/purchase_taxes_and_charges_master.js
index b70e669..e1a0d14 100644
--- a/accounts/doctype/purchase_taxes_and_charges_master/purchase_taxes_and_charges_master.js
+++ b/accounts/doctype/purchase_taxes_and_charges_master/purchase_taxes_and_charges_master.js
@@ -1,9 +1,11 @@
-// Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+// Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 // License: GNU General Public License v3. See license.txt
 
 // 
 
 //--------- ONLOAD -------------
+wn.require("app/js/controllers/accounts.js");
+
 cur_frm.cscript.onload = function(doc, cdt, cdn) {
    
 }
@@ -68,12 +70,12 @@
 cur_frm.cscript.add_deduct_tax = function(doc, cdt, cdn) {
   var d = locals[cdt][cdn];
   if(!d.category && d.add_deduct_tax){
-    alert("Please select Category first");
+    alert(wn._("Please select Category first"));
     d.add_deduct_tax = '';
   }
   else if(d.category != 'Total' && d.add_deduct_tax == 'Deduct') {
 	console.log([d.category, d.add_deduct_tax]);
-    msgprint("You cannot deduct when category is for 'Valuation' or 'Valuation and Total'");
+    msgprint(wn._("You cannot deduct when category is for 'Valuation' or 'Valuation and Total'"));
     d.add_deduct_tax = '';
   }
 
@@ -82,15 +84,15 @@
 cur_frm.cscript.charge_type = function(doc, cdt, cdn) {
   var d = locals[cdt][cdn];
   if(!d.category && d.charge_type){
-    alert("Please select Category first");
+    alert(wn._("Please select Category first"));
     d.charge_type = '';
   }  
   else if(d.idx == 1 && (d.charge_type == 'On Previous Row Amount' || d.charge_type == 'On Previous Row Total')){
-    alert("You cannot select Charge Type as 'On Previous Row Amount' or 'On Previous Row Total' for first row");
+    alert(wn._("You cannot select Charge Type as 'On Previous Row Amount' or 'On Previous Row Total' for first row"));
     d.charge_type = '';
   }
   else if((d.category == 'Valuation' || d.category == 'Valuation and Total') && (d.charge_type == 'On Previous Row Amount' || d.charge_type == 'On Previous Row Total')){
-    alert("You cannot select charge type as 'On Previous Row Amount' or 'On Previous Row Total' for valuation. You can select only 'Total' option for previous row amount or previous row total")
+    alert(wn._("You cannot select charge type as 'On Previous Row Amount' or 'On Previous Row Total' for valuation. You can select only 'Total' option for previous row amount or previous row total"))
     d.charge_type = '';
   }
   validated = false;
@@ -105,16 +107,16 @@
 cur_frm.cscript.row_id = function(doc, cdt, cdn) {
   var d = locals[cdt][cdn];
   if(!d.charge_type && d.row_id){
-    alert("Please select Charge Type first");
+    alert(wn._("Please select Charge Type first"));
     d.row_id = '';
   }
   else if((d.charge_type == 'Actual' || d.charge_type == 'On Net Total') && d.row_id) {
-    alert("You can Enter Row only if your Charge Type is 'On Previous Row Amount' or ' Previous Row Total'");
+    alert(wn._("You can Enter Row only if your Charge Type is 'On Previous Row Amount' or ' Previous Row Total'"));
     d.row_id = '';
   }
   else if((d.charge_type == 'On Previous Row Amount' || d.charge_type == 'On Previous Row Total') && d.row_id){
     if(d.row_id >= d.idx){
-      alert("You cannot Enter Row no. greater than or equal to current row no. for this Charge type");
+      alert(wn._("You cannot Enter Row no. greater than or equal to current row no. for this Charge type"));
       d.row_id = '';
     }
   }
@@ -142,24 +144,10 @@
   }
 }
 
-cur_frm.cscript.account_head = function(doc, cdt, cdn) {
-  var d = locals[cdt][cdn];
-  if(!d.charge_type && d.account_head){
-    alert("Please select Charge Type first");
-    validated = false;
-    d.account_head = '';
-  }
-  else if(d.account_head && d.charge_type) {
-    arg = "{'charge_type' : '" + d.charge_type + "', 'account_head' : '" + d.account_head + "'}";
-    return get_server_fields('get_rate', arg, 'purchase_tax_details', doc, cdt, cdn, 1);
-  }
-  refresh_field('account_head',d.name,'purchase_tax_details');
-}
-
 cur_frm.cscript.rate = function(doc, cdt, cdn) {
   var d = locals[cdt][cdn];
   if(!d.charge_type && d.rate) {
-    alert("Please select Charge Type first");
+    alert(wn._("Please select Charge Type first"));
     d.rate = '';
   }
   validated = false;
@@ -169,11 +157,11 @@
 cur_frm.cscript.tax_amount = function(doc, cdt, cdn) {
   var d = locals[cdt][cdn];
   if(!d.charge_type && d.tax_amount){
-    alert("Please select Charge Type first");
+    alert(wn._("Please select Charge Type first"));
     d.tax_amount = '';
   }
   else if(d.charge_type && d.tax_amount) {
-    alert("You cannot directly enter Amount and if your Charge Type is Actual enter your amount in Rate");
+    alert(wn._("You cannot directly enter Amount and if your Charge Type is Actual enter your amount in Rate"));
     d.tax_amount = '';
   }
   validated = false;
diff --git a/accounts/doctype/purchase_taxes_and_charges_master/purchase_taxes_and_charges_master.py b/accounts/doctype/purchase_taxes_and_charges_master/purchase_taxes_and_charges_master.py
index a4534ae..09eb4d8 100644
--- a/accounts/doctype/purchase_taxes_and_charges_master/purchase_taxes_and_charges_master.py
+++ b/accounts/doctype/purchase_taxes_and_charges_master/purchase_taxes_and_charges_master.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 # License: GNU General Public License v3. See license.txt
 
 from __future__ import unicode_literals
@@ -8,16 +8,10 @@
 from webnotes.model.bean import copy_doclist
 from webnotes.model.code import get_obj
 
-sql = webnotes.conn.sql
 	
 
 
 class DocType:
 	def __init__(self, doc, doclist=[]):
 		self.doc = doc
-		self.doclist = doclist
-
-	# Get Tax Rate if account type is Tax
-	# ===================================================================
-	def get_rate(self, arg):
-		return get_obj('Purchase Common').get_rate(arg, self)
\ No newline at end of file
+		self.doclist = doclist
\ No newline at end of file
diff --git a/accounts/doctype/sales_invoice/pos.js b/accounts/doctype/sales_invoice/pos.js
index 043fe90..492eb5e 100644
--- a/accounts/doctype/sales_invoice/pos.js
+++ b/accounts/doctype/sales_invoice/pos.js
@@ -1,4 +1,4 @@
-// Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+// Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 // License: GNU General Public License v3. See license.txt
 
 erpnext.POS = Class.extend({
@@ -6,7 +6,7 @@
 		this.wrapper = wrapper;
 		this.frm = frm;
 		this.wrapper.html('<div class="container">\
-			<div class="row">\
+			<div class="row" style="margin: -9px 0px 10px -30px; border-bottom: 1px solid #c7c7c7;">\
 				<div class="party-area col-sm-3 col-xs-6"></div>\
 				<div class="barcode-area col-sm-3 col-xs-6"></div>\
 				<div class="search-area col-sm-3 col-xs-6"></div>\
@@ -115,7 +115,8 @@
 				"fieldname": "pos_party",
 				"placeholder": this.party
 			},
-			parent: this.wrapper.find(".party-area")
+			parent: this.wrapper.find(".party-area"),
+			only_input: true,
 		});
 		this.party_field.make_input();
 		this.party_field.$input.on("change", function() {
@@ -134,7 +135,8 @@
 				"fieldname": "pos_item_group",
 				"placeholder": "Item Group"
 			},
-			parent: this.wrapper.find(".item-group-area")
+			parent: this.wrapper.find(".item-group-area"),
+			only_input: true,
 		});
 		this.item_group.make_input();
 		this.item_group.$input.on("change", function() {
@@ -152,7 +154,8 @@
 				"fieldname": "pos_item",
 				"placeholder": "Item"
 			},
-			parent: this.wrapper.find(".search-area")
+			parent: this.wrapper.find(".search-area"),
+			only_input: true,
 		});
 		this.search.make_input();
 		this.search.$input.on("change", function() {
@@ -169,7 +172,8 @@
 				"fieldname": "pos_barcode",
 				"placeholder": "Barcode / Serial No"
 			},
-			parent: this.wrapper.find(".barcode-area")
+			parent: this.wrapper.find(".barcode-area"),
+			only_input: true,
 		});
 		this.barcode.make_input();
 		this.barcode.$input.on("keypress", function() {
@@ -194,12 +198,12 @@
 				$.each(r.message, function(index, obj) {
 					if (obj.image)
 						image = '<img src="' + obj.image + '" class="img-responsive" \
-								style="border:1px solid #eee;height:140px;width:100%;">';
+								style="border:1px solid #eee; max-height: 140px;">';
 					else
 						image = '<div class="missing-image"><i class="icon-camera"></i></div>';
 
 					$(repl('<div class="col-xs-3 pos-item" data-item_code="%(item_code)s">\
-								<div>%(item_image)s</div>\
+								<div style="height: 140px; overflow: hidden;">%(item_image)s</div>\
 								<div class="small">%(item_code)s</div>\
 								<div class="small">%(item_name)s</div>\
 								<div class="small">%(item_price)s</div>\
diff --git a/accounts/doctype/sales_invoice/pos.py b/accounts/doctype/sales_invoice/pos.py
index 7bebbd2..3b47c05 100644
--- a/accounts/doctype/sales_invoice/pos.py
+++ b/accounts/doctype/sales_invoice/pos.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 # License: GNU General Public License v3. See license.txt
 
 from __future__ import unicode_literals
diff --git a/accounts/doctype/sales_invoice/sales_invoice.js b/accounts/doctype/sales_invoice/sales_invoice.js
index b5c1646..1cdc7a7 100644
--- a/accounts/doctype/sales_invoice/sales_invoice.js
+++ b/accounts/doctype/sales_invoice/sales_invoice.js
@@ -1,4 +1,4 @@
-// Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+// Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 // License: GNU General Public License v3. See license.txt
 
 cur_frm.cscript.tname = "Sales Invoice Item";
@@ -11,7 +11,7 @@
 
 wn.require('app/accounts/doctype/sales_taxes_and_charges_master/sales_taxes_and_charges_master.js');
 wn.require('app/utilities/doctype/sms_control/sms_control.js');
-wn.require('app/selling/doctype/sales_common/sales_common.js');
+wn.require('app/selling/sales_common.js');
 wn.require('app/accounts/doctype/sales_invoice/pos.js');
 
 wn.provide("erpnext.accounts");
@@ -49,19 +49,19 @@
 		cur_frm.dashboard.reset();
 
 		if(doc.docstatus==1) {
-			cur_frm.add_custom_button('View Ledger', function() {
+			cur_frm.appframe.add_button('View Ledger', function() {
 				wn.route_options = {
 					"voucher_no": doc.name,
 					"from_date": doc.posting_date,
 					"to_date": doc.posting_date,
 				};
 				wn.set_route("general-ledger");
-			});
+			}, "icon-table");
 			
 			var percent_paid = cint(flt(doc.grand_total - doc.outstanding_amount) / flt(doc.grand_total) * 100);
 			cur_frm.dashboard.add_progress(percent_paid + "% Paid", percent_paid);
 
-			cur_frm.add_custom_button('Send SMS', cur_frm.cscript.send_sms);
+			cur_frm.appframe.add_button(wn._('Send SMS'), cur_frm.cscript.send_sms, 'icon-mobile-phone');
 
 			if(cint(doc.update_stock)!=1) {
 				// show Make Delivery Note button only if Sales Invoice is not created from Delivery Note
@@ -72,11 +72,11 @@
 					});
 				
 				if(!from_delivery_note)
-					cur_frm.add_custom_button('Make Delivery', cur_frm.cscript['Make Delivery Note']);
+					cur_frm.appframe.add_primary_action(wn._('Make Delivery'), cur_frm.cscript['Make Delivery Note'])
 			}
 
 			if(doc.outstanding_amount!=0)
-				cur_frm.add_custom_button('Make Payment Entry', cur_frm.cscript.make_bank_voucher);
+				cur_frm.appframe.add_primary_action(wn._('Make Payment Entry'), cur_frm.cscript.make_bank_voucher);
 		}
 
 		// Show buttons only when pos view is active
@@ -87,7 +87,7 @@
 	},
 
 	sales_order_btn: function() {
-		this.$sales_order_btn = cur_frm.add_custom_button(wn._('From Sales Order'), 
+		this.$sales_order_btn = cur_frm.appframe.add_primary_action(wn._('From Sales Order'), 
 			function() {
 				wn.model.map_current_doc({
 					method: "selling.doctype.sales_order.sales_order.make_sales_invoice",
@@ -104,7 +104,7 @@
 	},
 
 	delivery_note_btn: function() {
-		this.$delivery_note_btn = cur_frm.add_custom_button(wn._('From Delivery Note'), 
+		this.$delivery_note_btn = cur_frm.appframe.add_primary_action(wn._('From Delivery Note'), 
 			function() {
 				wn.model.map_current_doc({
 					method: "stock.doctype.delivery_note.delivery_note.make_sales_invoice",
@@ -210,7 +210,6 @@
 	'total_commission', 'advances'];
 	
 	item_flds_normal = ['sales_order', 'delivery_note']
-	item_flds_pos = ['serial_no', 'batch_no', 'actual_qty', 'expense_account']
 	
 	if(cint(doc.is_pos) == 1) {
 		hide_field(par_flds);
@@ -225,7 +224,9 @@
 		cur_frm.fields_dict['entries'].grid.set_column_disp(item_flds_normal, true);
 	}
 	
-	cur_frm.fields_dict['entries'].grid.set_column_disp(item_flds_pos, (cint(doc.update_stock)==1?true:false));
+	item_flds_stock = ['serial_no', 'batch_no', 'actual_qty', 'expense_account', 'warehouse']
+	cur_frm.fields_dict['entries'].grid.set_column_disp(item_flds_stock,
+		(cint(doc.update_stock)==1 ? true : false));
 	
 	// India related fields
 	var cp = wn.control_panel;
diff --git a/accounts/doctype/sales_invoice/sales_invoice.py b/accounts/doctype/sales_invoice/sales_invoice.py
index eb46d1a..b1834d5 100644
--- a/accounts/doctype/sales_invoice/sales_invoice.py
+++ b/accounts/doctype/sales_invoice/sales_invoice.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 # License: GNU General Public License v3. See license.txt
 
 from __future__ import unicode_literals
@@ -48,11 +48,7 @@
 		self.validate_proj_cust()
 		self.validate_with_previous_doc()
 		self.validate_uom_is_integer("stock_uom", "qty")
-
-		sales_com_obj = get_obj('Sales Common')
-		sales_com_obj.check_stop_sales_order(self)
-		sales_com_obj.check_active_sales_items(self)
-		sales_com_obj.validate_max_discount(self, 'entries')
+		self.check_stop_sales_order("sales_order")
 		self.validate_customer_account()
 		self.validate_debit_acc()
 		self.validate_fixed_asset_account()
@@ -111,8 +107,7 @@
 		if cint(self.doc.update_stock) == 1:
 			self.update_stock_ledger()
 		
-		sales_com_obj = get_obj(dt = 'Sales Common')
-		sales_com_obj.check_stop_sales_order(self)
+		self.check_stop_sales_order("sales_order")
 		
 		from accounts.utils import remove_against_link_from_jv
 		remove_against_link_from_jv(self.doc.doctype, self.doc.name, "against_invoice")
@@ -256,25 +251,7 @@
 			else:
 				due_date = self.doc.posting_date
 
-		return due_date
-
-	def get_barcode_details(self, barcode):
-		return get_obj('Sales Common').get_barcode_details(barcode)
-
-
-	def get_adj_percent(self, arg=''):
-		"""Fetch ref rate from item master as per selected price list"""
-		get_obj('Sales Common').get_adj_percent(self)
-
-
-	def get_rate(self,arg):
-		"""Get tax rate if account type is tax"""
-		get_obj('Sales Common').get_rate(arg)
-		
-		
-	def get_comm_rate(self, sales_partner):
-		"""Get Commission rate of Sales Partner"""
-		return get_obj('Sales Common').get_comm_rate(sales_partner, self)	
+		return due_date	
 	
 	def get_advances(self):
 		super(DocType, self).get_advances(self.doc.debit_to, 
@@ -477,10 +454,6 @@
 				w = ps[0][1]
 		return w
 
-	
-	def make_packing_list(self):
-		get_obj('Sales Common').make_packing_list(self,'entries')
-
 	def on_update(self):
 		if cint(self.doc.update_stock) == 1:
 			# Set default warehouse from pos setting
@@ -491,7 +464,8 @@
 						if not d.warehouse:
 							d.warehouse = cstr(w)
 
-			self.make_packing_list()
+			from stock.doctype.packed_item.packed_item import make_packing_list
+			make_packing_list(self, 'entries')
 		else:
 			self.doclist = self.doc.clear_table(self.doclist, 'packing_details')
 			
@@ -523,8 +497,7 @@
 
 	def update_stock_ledger(self):
 		sl_entries = []
-		items = get_obj('Sales Common').get_item_list(self)
-		for d in items:
+		for d in self.get_item_list():
 			if webnotes.conn.get_value("Item", d.item_code, "is_stock_item") == "Yes" \
 					and d.warehouse:
 				sl_entries.append(self.get_sl_entries(d, {
@@ -974,8 +947,7 @@
 			"doctype": "Delivery Note Item", 
 			"field_map": {
 				"name": "prevdoc_detail_docname", 
-				"parent": "prevdoc_docname", 
-				"parenttype": "prevdoc_doctype",
+				"parent": "against_sales_invoice", 
 				"serial_no": "serial_no"
 			},
 			"postprocess": update_item
diff --git a/accounts/doctype/sales_invoice/sales_invoice.txt b/accounts/doctype/sales_invoice/sales_invoice.txt
index b168ba6..99bfe5c 100644
--- a/accounts/doctype/sales_invoice/sales_invoice.txt
+++ b/accounts/doctype/sales_invoice/sales_invoice.txt
@@ -2,12 +2,13 @@
  {
   "creation": "2013-05-24 19:29:05", 
   "docstatus": 0, 
-  "modified": "2013-10-11 13:12:38", 
+  "modified": "2013-11-18 15:16:50", 
   "modified_by": "Administrator", 
   "owner": "Administrator"
  }, 
  {
   "allow_attach": 1, 
+  "allow_import": 1, 
   "autoname": "naming_series:", 
   "default_print_format": "Standard", 
   "doctype": "DocType", 
@@ -49,11 +50,10 @@
   "options": "icon-user"
  }, 
  {
-  "description": "To manage multiple series please go to Setup > Manage Series", 
   "doctype": "DocField", 
   "fieldname": "naming_series", 
   "fieldtype": "Select", 
-  "label": "Document Numbering Series", 
+  "label": "Series", 
   "no_copy": 1, 
   "oldfieldname": "naming_series", 
   "oldfieldtype": "Select", 
@@ -165,7 +165,6 @@
  }, 
  {
   "default": "Today", 
-  "description": "The date at which current entry will get or has actually executed.", 
   "doctype": "DocField", 
   "fieldname": "posting_date", 
   "fieldtype": "Date", 
@@ -180,12 +179,11 @@
   "search_index": 1
  }, 
  {
-  "description": "Enter the date by which payments from customer is expected against this invoice.", 
   "doctype": "DocField", 
   "fieldname": "due_date", 
   "fieldtype": "Date", 
   "in_filter": 1, 
-  "label": "Due Date", 
+  "label": "Payment Due Date", 
   "no_copy": 1, 
   "oldfieldname": "due_date", 
   "oldfieldtype": "Date", 
@@ -229,7 +227,7 @@
   "doctype": "DocField", 
   "fieldname": "conversion_rate", 
   "fieldtype": "Float", 
-  "label": "Conversion Rate", 
+  "label": "Exchange Rate", 
   "oldfieldname": "conversion_rate", 
   "oldfieldtype": "Currency", 
   "print_hide": 1, 
@@ -256,7 +254,6 @@
   "reqd": 1
  }, 
  {
-  "description": "Select the currency in which price list is maintained", 
   "doctype": "DocField", 
   "fieldname": "price_list_currency", 
   "fieldtype": "Link", 
@@ -271,7 +268,7 @@
   "doctype": "DocField", 
   "fieldname": "plc_conversion_rate", 
   "fieldtype": "Float", 
-  "label": "Price List Currency Conversion Rate", 
+  "label": "Price List Exchange Rate", 
   "no_copy": 0, 
   "print_hide": 1, 
   "read_only": 0, 
@@ -322,7 +319,7 @@
   "fieldname": "packing_details", 
   "fieldtype": "Table", 
   "label": "Packing Details", 
-  "options": "Delivery Note Packing Item", 
+  "options": "Packed Item", 
   "print_hide": 1, 
   "read_only": 0
  }, 
@@ -378,7 +375,7 @@
   "doctype": "DocField", 
   "fieldname": "charge", 
   "fieldtype": "Link", 
-  "label": "Apply Taxes and Charges Master", 
+  "label": "Tax Master", 
   "oldfieldname": "charge", 
   "oldfieldtype": "Link", 
   "options": "Sales Taxes and Charges Master", 
@@ -394,7 +391,7 @@
   "doctype": "DocField", 
   "fieldname": "shipping_rule", 
   "fieldtype": "Link", 
-  "label": "Apply Shipping Rule", 
+  "label": "Shipping Rule", 
   "oldfieldtype": "Button", 
   "options": "Shipping Rule", 
   "print_hide": 1, 
@@ -721,7 +718,7 @@
   "doctype": "DocField", 
   "fieldname": "tc_name", 
   "fieldtype": "Link", 
-  "label": "Select Terms and Conditions", 
+  "label": "Terms", 
   "oldfieldname": "tc_name", 
   "oldfieldtype": "Link", 
   "options": "Terms and Conditions", 
@@ -748,6 +745,7 @@
   "read_only": 0
  }, 
  {
+  "description": "<a href=\"#Sales Browser/Territory\">Add / Edit</a>", 
   "doctype": "DocField", 
   "fieldname": "territory", 
   "fieldtype": "Link", 
@@ -760,6 +758,7 @@
   "search_index": 0
  }, 
  {
+  "description": "<a href=\"#Sales Browser/Customer Group\">Add / Edit</a>", 
   "doctype": "DocField", 
   "fieldname": "customer_group", 
   "fieldtype": "Link", 
@@ -821,7 +820,6 @@
   "search_index": 1
  }, 
  {
-  "description": "Track this Sales Invoice against any Project", 
   "doctype": "DocField", 
   "fieldname": "project_name", 
   "fieldtype": "Link", 
@@ -917,7 +915,7 @@
   "doctype": "DocField", 
   "fieldname": "select_print_heading", 
   "fieldtype": "Link", 
-  "label": "Select Print Heading", 
+  "label": "Print Heading", 
   "no_copy": 1, 
   "oldfieldname": "select_print_heading", 
   "oldfieldtype": "Link", 
diff --git a/accounts/doctype/sales_invoice/sales_invoice_list.js b/accounts/doctype/sales_invoice/sales_invoice_list.js
index 3ebcac9..4f32619 100644
--- a/accounts/doctype/sales_invoice/sales_invoice_list.js
+++ b/accounts/doctype/sales_invoice/sales_invoice_list.js
@@ -1,4 +1,4 @@
-// Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+// Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 // License: GNU General Public License v3. See license.txt
 
 // render
diff --git a/accounts/doctype/sales_invoice/sales_invoice_map.js b/accounts/doctype/sales_invoice/sales_invoice_map.js
index 81506ea..179cba3 100644
--- a/accounts/doctype/sales_invoice/sales_invoice_map.js
+++ b/accounts/doctype/sales_invoice/sales_invoice_map.js
@@ -1,4 +1,4 @@
-// Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+// Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 // License: GNU General Public License v3. See license.txt
 
 wn.model.map_info["Sales Invoice"] = {
diff --git a/accounts/doctype/sales_invoice/templates/pages/invoice.py b/accounts/doctype/sales_invoice/templates/pages/invoice.py
index 8fc8913..89789d3 100644
--- a/accounts/doctype/sales_invoice/templates/pages/invoice.py
+++ b/accounts/doctype/sales_invoice/templates/pages/invoice.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 # License: GNU General Public License v3. See license.txt
 
 from __future__ import unicode_literals
diff --git a/accounts/doctype/sales_invoice/templates/pages/invoices.py b/accounts/doctype/sales_invoice/templates/pages/invoices.py
index 59e53a0..871e37d 100644
--- a/accounts/doctype/sales_invoice/templates/pages/invoices.py
+++ b/accounts/doctype/sales_invoice/templates/pages/invoices.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 # License: GNU General Public License v3. See license.txt
 
 from __future__ import unicode_literals
diff --git a/accounts/doctype/sales_invoice/test_sales_invoice.py b/accounts/doctype/sales_invoice/test_sales_invoice.py
index 435ba12..9b740d1 100644
--- a/accounts/doctype/sales_invoice/test_sales_invoice.py
+++ b/accounts/doctype/sales_invoice/test_sales_invoice.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 # License: GNU General Public License v3. See license.txt
 
 import webnotes
@@ -695,7 +695,7 @@
 			
 			return new_si
 		
-		# if yearly, test 3 repetitions, else test 5 repetitions
+		# if yearly, test 1 repetition, else test 5 repetitions
 		count = 1 if (no_of_months == 12) else 5
 		for i in xrange(count):
 			base_si = _test(i)
diff --git a/accounts/doctype/sales_invoice_advance/sales_invoice_advance.py b/accounts/doctype/sales_invoice_advance/sales_invoice_advance.py
index 26d0f76..cb6190f 100644
--- a/accounts/doctype/sales_invoice_advance/sales_invoice_advance.py
+++ b/accounts/doctype/sales_invoice_advance/sales_invoice_advance.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 # License: GNU General Public License v3. See license.txt
 
 from __future__ import unicode_literals
diff --git a/accounts/doctype/sales_invoice_item/sales_invoice_item.py b/accounts/doctype/sales_invoice_item/sales_invoice_item.py
index 26d0f76..cb6190f 100644
--- a/accounts/doctype/sales_invoice_item/sales_invoice_item.py
+++ b/accounts/doctype/sales_invoice_item/sales_invoice_item.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 # License: GNU General Public License v3. See license.txt
 
 from __future__ import unicode_literals
diff --git a/accounts/doctype/sales_invoice_item/sales_invoice_item.txt b/accounts/doctype/sales_invoice_item/sales_invoice_item.txt
index 07cdc54..d7dac74 100644
--- a/accounts/doctype/sales_invoice_item/sales_invoice_item.txt
+++ b/accounts/doctype/sales_invoice_item/sales_invoice_item.txt
@@ -2,7 +2,7 @@
  {
   "creation": "2013-06-04 11:02:19", 
   "docstatus": 0, 
-  "modified": "2013-08-29 16:58:56", 
+  "modified": "2013-11-02 19:41:24", 
   "modified_by": "Administrator", 
   "owner": "Administrator"
  }, 
@@ -297,6 +297,7 @@
   "read_only": 0
  }, 
  {
+  "description": "<a href=\"#Sales Browser/Item Group\">Add / Edit</a>", 
   "doctype": "DocField", 
   "fieldname": "item_group", 
   "fieldtype": "Link", 
diff --git a/accounts/doctype/sales_taxes_and_charges/sales_taxes_and_charges.py b/accounts/doctype/sales_taxes_and_charges/sales_taxes_and_charges.py
index 26d0f76..cb6190f 100644
--- a/accounts/doctype/sales_taxes_and_charges/sales_taxes_and_charges.py
+++ b/accounts/doctype/sales_taxes_and_charges/sales_taxes_and_charges.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 # License: GNU General Public License v3. See license.txt
 
 from __future__ import unicode_literals
diff --git a/accounts/doctype/sales_taxes_and_charges_master/sales_taxes_and_charges_master.js b/accounts/doctype/sales_taxes_and_charges_master/sales_taxes_and_charges_master.js
index a7a88d4..e2e5047 100644
--- a/accounts/doctype/sales_taxes_and_charges_master/sales_taxes_and_charges_master.js
+++ b/accounts/doctype/sales_taxes_and_charges_master/sales_taxes_and_charges_master.js
@@ -1,7 +1,10 @@
-// Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+// Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 // License: GNU General Public License v3. See license.txt
 
 //--------- ONLOAD -------------
+
+wn.require("app/js/controllers/accounts.js");
+
 cur_frm.cscript.onload = function(doc, cdt, cdn) {
 	if(doc.doctype === "Sales Taxes and Charges Master")
 		erpnext.add_applicable_territory();
@@ -92,7 +95,7 @@
 cur_frm.cscript.charge_type = function(doc, cdt, cdn) {
 	var d = locals[cdt][cdn];
 	if(d.idx == 1 && (d.charge_type == 'On Previous Row Amount' || d.charge_type == 'On Previous Row Total')){
-		alert("You cannot select Charge Type as 'On Previous Row Amount' or 'On Previous Row Total' for first row");
+		alert(wn._("You cannot select Charge Type as 'On Previous Row Amount' or 'On Previous Row Total' for first row"));
 		d.charge_type = '';
 	}
 	validated = false;
@@ -105,16 +108,16 @@
 cur_frm.cscript.row_id = function(doc, cdt, cdn) {
 	var d = locals[cdt][cdn];
 	if(!d.charge_type && d.row_id){
-		alert("Please select Charge Type first");
+		alert(wn._("Please select Charge Type first"));
 		d.row_id = '';
 	}
 	else if((d.charge_type == 'Actual' || d.charge_type == 'On Net Total') && d.row_id) {
-		alert("You can Enter Row only if your Charge Type is 'On Previous Row Amount' or ' Previous Row Total'");
+		alert(wn._("You can Enter Row only if your Charge Type is 'On Previous Row Amount' or ' Previous Row Total'"));
 		d.row_id = '';
 	}
 	else if((d.charge_type == 'On Previous Row Amount' || d.charge_type == 'On Previous Row Total') && d.row_id){
 		if(d.row_id >= d.idx){
-			alert("You cannot Enter Row no. greater than or equal to current row no. for this Charge type");
+			alert(wn._("You cannot Enter Row no. greater than or equal to current row no. for this Charge type"));
 			d.row_id = '';
 		}
 	}
@@ -142,25 +145,10 @@
 	}	
 }
 
-
-cur_frm.cscript.account_head = function(doc, cdt, cdn) {
-	var d = locals[cdt][cdn];
-	if(!d.charge_type && d.account_head){
-		alert("Please select Charge Type first");
-		validated = false;
-		d.account_head = '';
-	}
-	else if(d.account_head && d.charge_type) {
-		arg = "{'charge_type' : '" + d.charge_type +"', 'account_head' : '" + d.account_head + "'}";
-		return get_server_fields('get_rate', arg, 'other_charges', doc, cdt, cdn, 1);
-	}
-	refresh_field('account_head',d.name,'other_charges');
-}
-
 cur_frm.cscript.rate = function(doc, cdt, cdn) {
 	var d = locals[cdt][cdn];
 	if(!d.charge_type && d.rate) {
-		alert("Please select Charge Type first");
+		alert(wn._("Please select Charge Type first"));
 		d.rate = '';
 	}
 	validated = false;
@@ -170,11 +158,11 @@
 cur_frm.cscript.tax_amount = function(doc, cdt, cdn) {
 	var d = locals[cdt][cdn];
 	if(!d.charge_type && d.tax_amount){
-		alert("Please select Charge Type first");
+		alert(wn._("Please select Charge Type first"));
 		d.tax_amount = '';
 	}
 	else if(d.charge_type && d.tax_amount) {
-		alert("You cannot directly enter Amount and if your Charge Type is Actual enter your amount in Rate");
+		alert(wn._("You cannot directly enter Amount and if your Charge Type is Actual enter your amount in Rate"));
 		d.tax_amount = '';
 	}
 	validated = false;
diff --git a/accounts/doctype/sales_taxes_and_charges_master/sales_taxes_and_charges_master.py b/accounts/doctype/sales_taxes_and_charges_master/sales_taxes_and_charges_master.py
index 019edcb..64bf6c6 100644
--- a/accounts/doctype/sales_taxes_and_charges_master/sales_taxes_and_charges_master.py
+++ b/accounts/doctype/sales_taxes_and_charges_master/sales_taxes_and_charges_master.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 # License: GNU General Public License v3. See license.txt
 
 from __future__ import unicode_literals
@@ -6,11 +6,7 @@
 from webnotes.utils import cint
 from webnotes.model.controller import DocListController
 
-class DocType(DocListController):
-	def get_rate(self, arg):
-		from webnotes.model.code import get_obj
-		return get_obj('Sales Common').get_rate(arg)
-		
+class DocType(DocListController):		
 	def validate(self):
 		if self.doc.is_default == 1:
 			webnotes.conn.sql("""update `tabSales Taxes and Charges Master` set is_default = 0 
diff --git a/accounts/doctype/sales_taxes_and_charges_master/test_sales_taxes_and_charges_master.py b/accounts/doctype/sales_taxes_and_charges_master/test_sales_taxes_and_charges_master.py
index 7a013fb..ee753d5 100644
--- a/accounts/doctype/sales_taxes_and_charges_master/test_sales_taxes_and_charges_master.py
+++ b/accounts/doctype/sales_taxes_and_charges_master/test_sales_taxes_and_charges_master.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 # License: GNU General Public License v3. See license.txt
 
 test_records = [
diff --git a/accounts/doctype/shipping_rule/shipping_rule.js b/accounts/doctype/shipping_rule/shipping_rule.js
index 2a0c433..cdd5397 100644
--- a/accounts/doctype/shipping_rule/shipping_rule.js
+++ b/accounts/doctype/shipping_rule/shipping_rule.js
@@ -1,4 +1,4 @@
-// Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+// Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 // License: GNU General Public License v3. See license.txt
 
 $.extend(cur_frm.cscript, {
diff --git a/accounts/doctype/shipping_rule/shipping_rule.py b/accounts/doctype/shipping_rule/shipping_rule.py
index 4eafb01..dd4db5f 100644
--- a/accounts/doctype/shipping_rule/shipping_rule.py
+++ b/accounts/doctype/shipping_rule/shipping_rule.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 # License: GNU General Public License v3. See license.txt
 
 # For license information, please see license.txt
diff --git a/accounts/doctype/shipping_rule/test_shipping_rule.py b/accounts/doctype/shipping_rule/test_shipping_rule.py
index a9aa4c7..8bac02b 100644
--- a/accounts/doctype/shipping_rule/test_shipping_rule.py
+++ b/accounts/doctype/shipping_rule/test_shipping_rule.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 # License: GNU General Public License v3. See license.txt
 
 import webnotes
diff --git a/accounts/doctype/shipping_rule_condition/shipping_rule_condition.py b/accounts/doctype/shipping_rule_condition/shipping_rule_condition.py
index 784339d..e5468e5 100644
--- a/accounts/doctype/shipping_rule_condition/shipping_rule_condition.py
+++ b/accounts/doctype/shipping_rule_condition/shipping_rule_condition.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 # License: GNU General Public License v3. See license.txt
 
 # For license information, please see license.txt
diff --git a/accounts/general_ledger.py b/accounts/general_ledger.py
index 9afcf94..87814b1 100644
--- a/accounts/general_ledger.py
+++ b/accounts/general_ledger.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 # License: GNU General Public License v3. See license.txt
 
 from __future__ import unicode_literals
diff --git a/accounts/page/accounts_browser/accounts_browser.js b/accounts/page/accounts_browser/accounts_browser.js
index 6b57795..d57073a 100644
--- a/accounts/page/accounts_browser/accounts_browser.js
+++ b/accounts/page/accounts_browser/accounts_browser.js
@@ -1,4 +1,4 @@
-// Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+// Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 // License: GNU General Public License v3. See license.txt
 
 // tree of chart of accounts / cost centers
@@ -18,37 +18,39 @@
 
 	var main = $(wrapper).find(".layout-main"),
 		chart_area = $("<div>")
-			.css({"margin-bottom": "15px"})
+			.css({"margin-bottom": "15px", "min-height": "200px"})
 			.appendTo(main),
-		help_area = $('<div class="well">\
-		<h4>Quick Help</h4>\
-		<ol>\
-		<li>To add child nodes, explore tree and click on the node under which you \
-			want to add more nodes.\
-		<li>Accounting Entries can be made against leaf nodes, called <b>Ledgers</b>.\
-		 	Entries against <b>Groups</b> are not allowed.\
-		<li>Please do NOT create Account (Ledgers) for Customers and Suppliers. \
-			They are created directly from the Customer / Supplier masters.\
-		<li><b>To create a Bank Account:</b> Go to the appropriate group \
-			(usually Application of Funds > Current Assets > Bank Accounts)\
-			and create a new Account Ledger (by clicking on Add Child) of \
-			type "Bank or Cash"\
-		<li><b>To create a Tax Account:</b> Go to the appropriate group \
-			(usually Source of Funds > Current Liabilities > Taxes and Duties) \
-			and create a new Account Ledger (by clicking on Add Child) of type\
-			 "Tax" and do mention the Tax rate.\
-		</ol>\
-		<p>Please setup your chart of accounts before you start Accounting Entries</p>\
-	</div>').appendTo(main);
+		help_area = $('<div class="well">'+
+		'<h4>'+wn._('Quick Help')+'</h4>'+
+		'<ol>'+
+			'<li>'+wn._('To add child nodes, explore tree and click on the node under which you want to add more nodes.')+'</li>'+
+			'<li>'+
+			      wn._('Accounting Entries can be made against leaf nodes, called')+
+				 '<b>' +wn._('Ledgers')+'</b>.'+ wn._('Entries against') +
+				 '<b>' +wn._('Groups') + '</b>'+ wn._('are not allowed.')+
+		    '</li>'+
+			'<li>'+wn._('Please do NOT create Account (Ledgers) for Customers and Suppliers. They are created directly from the Customer / Supplier masters.')+'</li>'+
+			'<li>'+
+			     '<b>'+wn._('To create a Bank Account:')+'</b>'+ 
+			      wn._('Go to the appropriate group (usually Application of Funds > Current Assets > Bank Accounts)')+
+			      wn._('and create a new Account Ledger (by clicking on Add Child) of type "Bank or Cash"')+
+			'</li>'+
+			'<li>'+
+			      '<b>'+wn._('To create a Tax Account:')+'</b>'+
+			      wn._('Go to the appropriate group (usually Source of Funds > Current Liabilities > Taxes and Duties)')+
+			      wn._('and create a new Account Ledger (by clicking on Add Child) of type "Tax" and do mention the Tax rate.')+
+			'</li>'+
+		'</ol>'+
+		'<p>'+wn._('Please setup your chart of accounts before you start Accounting Entries')+'</p></div>').appendTo(main);
 	
 	if (wn.boot.profile.can_create.indexOf("Company") !== -1) {
-		wrapper.appframe.add_button('New Company', function() { newdoc('Company'); },
+		wrapper.appframe.add_button(wn._('New Company'), function() { newdoc('Company'); },
 			'icon-plus');
 	}
 	
-	wrapper.appframe.add_button('Refresh', function() {  	
+	wrapper.appframe.set_title_right('Refresh', function() {  	
 			wrapper.$company_select.change();
-		}, 'icon-refresh');
+		});
 
 	// company-select
 	wrapper.$company_select = wrapper.appframe.add_select("Company", [])
@@ -145,20 +147,20 @@
 		var node_links = [];
 		// edit
 		if (wn.model.can_read(this.ctype) !== -1) {
-			node_links.push('<a onclick="erpnext.account_chart.open();">Edit</a>');
+			node_links.push('<a onclick="erpnext.account_chart.open();">'+wn._('Edit')+'</a>');
 		}
 		if (data.expandable && wn.boot.profile.in_create.indexOf(this.ctype) !== -1) {
-			node_links.push('<a onclick="erpnext.account_chart.new_node();">Add Child</a>');
+			node_links.push('<a onclick="erpnext.account_chart.new_node();">'+wn._('Add Child')+'</a>');
 		} else if (this.ctype === 'Account' && wn.boot.profile.can_read.indexOf("GL Entry") !== -1) {
-			node_links.push('<a onclick="erpnext.account_chart.show_ledger();">View Ledger</a>');
+			node_links.push('<a onclick="erpnext.account_chart.show_ledger();">'+wn._('View Ledger')+'</a>');
 		}
 
 		if (this.can_write) {
-			node_links.push('<a onclick="erpnext.account_chart.rename()">Rename</a>');
+			node_links.push('<a onclick="erpnext.account_chart.rename()">'+wn._('Rename')+'</a>');
 		};
 	
 		if (this.can_delete) {
-			node_links.push('<a onclick="erpnext.account_chart.delete()">Delete</a>');
+			node_links.push('<a onclick="erpnext.account_chart.delete()">'+wn._('Delete')+'</a>');
 		};
 		
 		link.toolbar.append(node_links.join(" | "));
@@ -204,20 +206,20 @@
 		
 		// the dialog
 		var d = new wn.ui.Dialog({
-			title:'New Account',
+			title:wn._('New Account'),
 			fields: [
-				{fieldtype:'Data', fieldname:'account_name', label:'New Account Name', reqd:true, 
-					description: "Name of new Account. Note: Please don't create accounts for Customers and Suppliers, \
-					they are created automatically from the Customer and Supplier master"},
-				{fieldtype:'Select', fieldname:'group_or_ledger', label:'Group or Ledger',
-					options:'Group\nLedger', description:'Further accounts can be made under Groups,\
-					 	but entries can be made against Ledger'},
-				{fieldtype:'Select', fieldname:'account_type', label:'Account Type',
+				{fieldtype:'Data', fieldname:'account_name', label:wn._('New Account Name'), reqd:true, 
+					description: wn._("Name of new Account. Note: Please don't create accounts for Customers and Suppliers,")+
+					wn._("they are created automatically from the Customer and Supplier master")},
+				{fieldtype:'Select', fieldname:'group_or_ledger', label:wn._('Group or Ledger'),
+					options:'Group\nLedger', description: wn._('Further accounts can be made under Groups,')+
+					 	wn._('but entries can be made against Ledger')},
+				{fieldtype:'Select', fieldname:'account_type', label:wn._('Account Type'),
 					options: ['', 'Fixed Asset Account', 'Bank or Cash', 'Expense Account', 'Tax',
 						'Income Account', 'Chargeable'].join('\n'),
-					description: "Optional. This setting will be used to filter in various transactions." },
-				{fieldtype:'Float', fieldname:'tax_rate', label:'Tax Rate'},
-				{fieldtype:'Button', fieldname:'create_new', label:'Create New' }
+					description: wn._("Optional. This setting will be used to filter in various transactions.") },
+				{fieldtype:'Float', fieldname:'tax_rate', label:wn._('Tax Rate')},
+				{fieldtype:'Button', fieldname:'create_new', label:wn._('Create New') }
 			]
 		})
 
@@ -282,13 +284,13 @@
 		var me = this;
 		// the dialog
 		var d = new wn.ui.Dialog({
-			title:'New Cost Center',
+			title:wn._('New Cost Center'),
 			fields: [
-				{fieldtype:'Data', fieldname:'cost_center_name', label:'New Cost Center Name', reqd:true},
-				{fieldtype:'Select', fieldname:'group_or_ledger', label:'Group or Ledger',
-					options:'Group\nLedger', description:'Further accounts can be made under Groups,\
-					 	but entries can be made against Ledger'},
-				{fieldtype:'Button', fieldname:'create_new', label:'Create New' }
+				{fieldtype:'Data', fieldname:'cost_center_name', label:wn._('New Cost Center Name'), reqd:true},
+				{fieldtype:'Select', fieldname:'group_or_ledger', label:wn._('Group or Ledger'),
+					options:'Group\nLedger', description:wn._('Further accounts can be made under Groups,')+
+					 	wn._('but entries can be made against Ledger')},
+				{fieldtype:'Button', fieldname:'create_new', label:wn._('Create New') }
 			]
 		});
 	
diff --git a/accounts/page/accounts_browser/accounts_browser.py b/accounts/page/accounts_browser/accounts_browser.py
index 61f4bfc..68a53b2 100644
--- a/accounts/page/accounts_browser/accounts_browser.py
+++ b/accounts/page/accounts_browser/accounts_browser.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 # License: GNU General Public License v3. See license.txt
 
 from __future__ import unicode_literals
@@ -15,7 +15,7 @@
 
 @webnotes.whitelist()
 def get_children():
-	args = webnotes.form_dict
+	args = webnotes.local.form_dict
 	ctype, company = args['ctype'], args['comp']
 	
 	# root
diff --git a/accounts/page/accounts_home/accounts_home.js b/accounts/page/accounts_home/accounts_home.js
index d6c3883..0116247 100644
--- a/accounts/page/accounts_home/accounts_home.js
+++ b/accounts/page/accounts_home/accounts_home.js
@@ -1,4 +1,4 @@
-// Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+// Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 // License: GNU General Public License v3. See license.txt"
 
 wn.module_page["Accounts"] = [
@@ -88,12 +88,12 @@
 			{
 				"label": wn._("Period Closing Voucher"),
 				"doctype": "Period Closing Voucher",
-				description: "Close Balance Sheet and book Profit or Loss."
+				description: wn._("Close Balance Sheet and book Profit or Loss.")
 			},
 			{
 				"page":"voucher-import-tool",
 				"label": wn._("Voucher Import Tool"),
-				"description": "Import accounting entries from CSV."
+				"description": wn._("Import accounting entries from CSV.")
 			},		
 		]
 	},
@@ -105,7 +105,7 @@
 				"label": wn._("Accounts Settings"),
 				"route": "Form/Accounts Settings",
 				"doctype":"Accounts Settings",
-				"description": "Settings for Accounts"
+				"description": wn._("Settings for Accounts")
 			},
 			{
 				"label": wn._("Sales Taxes and Charges Master"),
@@ -130,7 +130,7 @@
 			{
 				"label": wn._("Point-of-Sale Setting"),
 				"doctype":"POS Setting",
-				"description": "User settings for Point-of-sale (POS)"
+				"description": wn._("User settings for Point-of-sale (POS)")
 			},
 			{
 				"doctype":"Budget Distribution",
@@ -150,7 +150,7 @@
 			{
 				"doctype":"C-Form",
 				"label": wn._("C-Form"),
-				description: "C-Form records",
+				description: wn._("C-Form records"),
 				country: "India"
 			}
 		]
diff --git a/accounts/page/financial_analytics/financial_analytics.js b/accounts/page/financial_analytics/financial_analytics.js
index 13b9067..7fe0507 100644
--- a/accounts/page/financial_analytics/financial_analytics.js
+++ b/accounts/page/financial_analytics/financial_analytics.js
@@ -1,4 +1,4 @@
-// Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+// Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 // License: GNU General Public License v3. See license.txt
 
 wn.require("app/js/account_tree_grid.js");
@@ -6,19 +6,17 @@
 wn.pages['financial-analytics'].onload = function(wrapper) { 
 	wn.ui.make_app_page({
 		parent: wrapper,
-		title: 'Financial Analytics',
+		title: wn._('Financial Analytics'),
 		single_column: true
 	});
 	erpnext.trial_balance = new erpnext.FinancialAnalytics(wrapper, 'Financial Analytics');
-	
-	wrapper.appframe.add_home_breadcrumb()
 	wrapper.appframe.add_module_icon("Accounts")
-	wrapper.appframe.add_breadcrumb("icon-bar-chart")
+	
 }
 
 erpnext.FinancialAnalytics = erpnext.AccountTreeGrid.extend({
 	filters: [
-		{fieldtype:"Select", label: "PL or BS", options:["Profit and Loss", "Balance Sheet"],
+		{fieldtype:"Select", label: wn._("PL or BS"), options:["Profit and Loss", "Balance Sheet"],
 			filter: function(val, item, opts, me) {
 				if(item._show) return true;
 				
@@ -28,27 +26,27 @@
 				
 				return me.apply_zero_filter(val, item, opts, me);
 			}},
-		{fieldtype:"Select", label: "Company", link:"Company", default_value: "Select Company...",
+		{fieldtype:"Select", label: wn._("Company"), link:"Company", default_value: "Select Company...",
 			filter: function(val, item, opts) {
 				return item.company == val || val == opts.default_value || item._show;
 			}},
-		{fieldtype:"Select", label: "Fiscal Year", link:"Fiscal Year", 
+		{fieldtype:"Select", label: wn._("Fiscal Year"), link:"Fiscal Year", 
 			default_value: "Select Fiscal Year..."},
-		{fieldtype:"Date", label: "From Date"},
-		{fieldtype:"Label", label: "To"},
-		{fieldtype:"Date", label: "To Date"},
-		{fieldtype:"Select", label: "Range", 
+		{fieldtype:"Date", label: wn._("From Date")},
+		{fieldtype:"Label", label: wn._("To")},
+		{fieldtype:"Date", label: wn._("To Date")},
+		{fieldtype:"Select", label: wn._("Range"), 
 			options:["Daily", "Weekly", "Monthly", "Quarterly", "Yearly"]},
-		{fieldtype:"Button", label: "Refresh", icon:"icon-refresh icon-white", cssClass:"btn-info"},
-		{fieldtype:"Button", label: "Reset Filters"}
+		{fieldtype:"Button", label: wn._("Refresh"), icon:"icon-refresh icon-white"},
+		{fieldtype:"Button", label: wn._("Reset Filters")}
 	],
 	setup_columns: function() {
 		var std_columns = [
-			{id: "check", name: "Plot", field: "check", width: 30,
+			{id: "check", name: wn._("Plot"), field: "check", width: 30,
 				formatter: this.check_formatter},
-			{id: "name", name: "Account", field: "name", width: 300,
+			{id: "name", name: wn._("Account"), field: "name", width: 300,
 				formatter: this.tree_formatter},
-			{id: "opening", name: "Opening", field: "opening", hidden: true,
+			{id: "opening", name: wn._("Opening"), field: "opening", hidden: true,
 				formatter: this.currency_formatter}
 		];
 		
diff --git a/accounts/page/financial_statements/financial_statements.js b/accounts/page/financial_statements/financial_statements.js
index 4893125..8562707 100644
--- a/accounts/page/financial_statements/financial_statements.js
+++ b/accounts/page/financial_statements/financial_statements.js
@@ -1,4 +1,4 @@
-// Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+// Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 // License: GNU General Public License v3. See license.txt
 
 erpnext.fs = {}
@@ -6,7 +6,7 @@
 pscript['onload_Financial Statements'] = function(wrapper) {
 	wn.ui.make_app_page({
 		parent: wrapper,
-		"title": "Financial Statements",
+		"title": wn._("Financial Statements"),
 		"single_column": true,
 	});
 	
@@ -34,18 +34,18 @@
 		options: ['Loading...']
 	})
 
-	wrapper.appframe.add_button("Create", function() {
+	wrapper.appframe.add_button(wn._("Create"), function() {
 		pscript.stmt_new();
 	}, "icon-refresh")
 
-	wrapper.appframe.add_button("Print", function() {
+	wrapper.appframe.add_button(wn._("Print"), function() {
 		_p.go($i('print_html').innerHTML);
 	}, "icon-print")
 		
 	$(wrapper).find(".layout-main").html('<div id="print_html">\
 		<div id="stmt_title1" style="margin:16px 0px 4px 0px; font-size: 16px; font-weight: bold; color: #888;"></div>\
 		<div id="stmt_title2" style="margin:0px 0px 8px 0px; font-size: 16px; font-weight: bold;"></div>\
-		<div id="stmt_tree" style="margin: 0px 0px 16px; overflow: auto;">Please select options and click on Create</div>\
+		<div id="stmt_tree" style="margin: 0px 0px 16px; overflow: auto;">'+wn._('Please select options and click on Create')+'</div>\
 	</div>').css({"min-height": "400px"});
 
   // load companies
@@ -61,7 +61,7 @@
 
 pscript.stmt_new = function(stmt,company_name,level,period,year) {
     
-  $i('stmt_tree').innerHTML = 'Refreshing....';
+  $i('stmt_tree').innerHTML = wn._('Refreshing....');
   $i('stmt_tree').style.display = 'block';
   
   var company =erpnext.fs.stmt_company.get_value();
diff --git a/accounts/page/general_ledger/general_ledger.js b/accounts/page/general_ledger/general_ledger.js
index da28eb3..7eeab58 100644
--- a/accounts/page/general_ledger/general_ledger.js
+++ b/accounts/page/general_ledger/general_ledger.js
@@ -1,10 +1,10 @@
-// Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+// Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 // License: GNU General Public License v3. See license.txt
 
 wn.pages['general-ledger'].onload = function(wrapper) { 
 	wn.ui.make_app_page({
 		parent: wrapper,
-		title: 'General Ledger',
+		title: wn._('General Ledger'),
 		single_column: true
 	});
 	
@@ -16,7 +16,7 @@
 erpnext.GeneralLedger = wn.views.GridReport.extend({
 	init: function(wrapper) {
 		this._super({
-			title: "General Ledger",
+			title: wn._("General Ledger"),
 			page: wrapper,
 			parent: $(wrapper).find('.layout-main'),
 			appframe: wrapper.appframe,
@@ -25,40 +25,40 @@
 	},
 	setup_columns: function() {
 		this.columns = [
-			{id: "posting_date", name: "Posting Date", field: "posting_date", width: 100,
+			{id: "posting_date", name: wn._("Posting Date"), field: "posting_date", width: 100,
 				formatter: this.date_formatter},
-			{id: "account", name: "Account", field: "account", width: 240, 	
+			{id: "account", name: wn._("Account"), field: "account", width: 240, 	
 				link_formatter: {
 					filter_input: "account",
 					open_btn: true,
 					doctype: "'Account'"
 				}},
-			{id: "against_account", name: "Against Account", field: "against_account", 
+			{id: "against_account", name: wn._("Against Account"), field: "against_account", 
 				width: 240, hidden: !this.account},
 
-			{id: "debit", name: "Debit", field: "debit", width: 100,
+			{id: "debit", name: wn._("Debit"), field: "debit", width: 100,
 				formatter: this.currency_formatter},
-			{id: "credit", name: "Credit", field: "credit", width: 100,
+			{id: "credit", name: wn._("Credit"), field: "credit", width: 100,
 				formatter: this.currency_formatter},
-			{id: "voucher_type", name: "Voucher Type", field: "voucher_type", width: 120},
-			{id: "voucher_no", name: "Voucher No", field: "voucher_no", width: 160,
+			{id: "voucher_type", name: wn._("Voucher Type"), field: "voucher_type", width: 120},
+			{id: "voucher_no", name: wn._("Voucher No"), field: "voucher_no", width: 160,
 				link_formatter: {
 					filter_input: "voucher_no",
 					open_btn: true,
 					doctype: "dataContext.voucher_type"
 				}},
-			{id: "remarks", name: "Remarks", field: "remarks", width: 200,
+			{id: "remarks", name: wn._("Remarks"), field: "remarks", width: 200,
 				formatter: this.text_formatter},
 				
 		];
 	},
 	
 	filters: [
-		{fieldtype:"Select", label: "Company", link:"Company", default_value: "Select Company...",
+		{fieldtype:"Select", label: wn._("Company"), link:"Company", default_value: wn._("Select Company..."),
 			filter: function(val, item, opts) {
 				return item.company == val || val == opts.default_value;
 			}},
-		{fieldtype:"Link", label: "Account", link:"Account",
+		{fieldtype:"Link", label: wn._("Account"), link:"Account",
 			filter: function(val, item, opts, me) {
 				if(!val) {
 					return true;
@@ -68,22 +68,22 @@
 					return me.is_child_account(val, item.account);
 				}
 			}},
-		{fieldtype:"Data", label: "Voucher No",
+		{fieldtype:"Data", label: wn._("Voucher No"),
 			filter: function(val, item, opts) {
 				if(!val) return true;
 				return (item.voucher_no && item.voucher_no.indexOf(val)!=-1);
 			}},
-		{fieldtype:"Date", label: "From Date", filter: function(val, item) {
+		{fieldtype:"Date", label: wn._("From Date"), filter: function(val, item) {
 			return dateutil.str_to_obj(val) <= dateutil.str_to_obj(item.posting_date);
 		}},
-		{fieldtype:"Label", label: "To"},
-		{fieldtype:"Date", label: "To Date", filter: function(val, item) {
+		{fieldtype:"Label", label: wn._("To")},
+		{fieldtype:"Date", label: wn._("To Date"), filter: function(val, item) {
 			return dateutil.str_to_obj(val) >= dateutil.str_to_obj(item.posting_date);
 		}},
-		{fieldtype: "Check", label: "Group by Ledger"},
-		{fieldtype: "Check", label: "Group by Voucher"},
-		{fieldtype:"Button", label: "Refresh", icon:"icon-refresh icon-white", cssClass:"btn-info"},
-		{fieldtype:"Button", label: "Reset Filters"}
+		{fieldtype: "Check", label: wn._("Group by Ledger")},
+		{fieldtype: "Check", label: wn._("Group by Voucher")},
+		{fieldtype:"Button", label: wn._("Refresh"), icon:"icon-refresh icon-white"},
+		{fieldtype:"Button", label: wn._("Reset Filters")}
 	],
 	setup_filters: function() {
 		this._super();
@@ -160,7 +160,7 @@
 		var to_date = dateutil.str_to_obj(this.to_date);
 		
 		if(to_date < from_date) {
-			msgprint("From Date must be before To Date");
+			msgprint(wn._("From Date must be before To Date"));
 			return;
 		}
 		
@@ -236,7 +236,7 @@
 		closing.credit = opening.credit + totals.credit;
 
 		if(me.account) {
-			me.appframe.set_title("General Ledger: " + me.account);
+			me.appframe.set_title(wn._("General Ledger: ") + me.account);
 
 			// group by ledgers
 			if(this.account_by_name[this.account].group_or_ledger==="Group"
@@ -254,7 +254,7 @@
 			
 			out = [opening].concat(out).concat([totals, closing]);
 		} else {
-			me.appframe.set_title("General Ledger");
+			me.appframe.set_title(wn._("General Ledger"));
 			out = out.concat([totals]);
 		}
 
diff --git a/accounts/page/trial_balance/trial_balance.js b/accounts/page/trial_balance/trial_balance.js
index 6521256..83f56eb 100644
--- a/accounts/page/trial_balance/trial_balance.js
+++ b/accounts/page/trial_balance/trial_balance.js
@@ -1,4 +1,4 @@
-// Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+// Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 // License: GNU General Public License v3. See license.txt
 
 wn.require("app/js/account_tree_grid.js");
@@ -6,7 +6,7 @@
 wn.pages['trial-balance'].onload = function(wrapper) { 
 	wn.ui.make_app_page({
 		parent: wrapper,
-		title: 'Trial Balance',
+		title: wn._('Trial Balance'),
 		single_column: true
 	});
 	var TrialBalance = erpnext.AccountTreeGrid.extend({
@@ -17,8 +17,8 @@
 			// period closing entry checkbox
 			this.wrapper.bind("make", function() {
 				$('<div style="margin: 10px 0px; "\
-				 	class="with_period_closing_entry"><input type="checkbox" checked="checked">\
-					With period closing entry</div>')
+				 	class="with_period_closing_entry"><input type="checkbox" checked="checked">' + 
+						wn._("With period closing entry") + '</div>')
 					.appendTo(me.wrapper)
 					.find("input").click(function() { me.refresh(); });
 			});
@@ -45,7 +45,7 @@
 	})
 	erpnext.trial_balance = new TrialBalance(wrapper, 'Trial Balance');
 	
-	wrapper.appframe.add_home_breadcrumb()
+
 	wrapper.appframe.add_module_icon("Accounts")
-	wrapper.appframe.add_breadcrumb("icon-bar-chart")
+	
 }
\ No newline at end of file
diff --git a/accounts/page/voucher_import_tool/voucher_import_tool.js b/accounts/page/voucher_import_tool/voucher_import_tool.js
index 5a8538e..afacda8 100644
--- a/accounts/page/voucher_import_tool/voucher_import_tool.js
+++ b/accounts/page/voucher_import_tool/voucher_import_tool.js
@@ -1,32 +1,37 @@
-// Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+// Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 // License: GNU General Public License v3. See license.txt
 
 wn.pages['voucher-import-tool'].onload = function(wrapper) { 
 	wn.ui.make_app_page({
 		parent: wrapper,
-		title: 'Voucher Import Tool',
+		title: wn._('Voucher Import Tool'),
 		single_column: true
 	});
 	
-	$(wrapper).find('.layout-main').html('\
-		<p class="help">Import multiple accounting entries via CSV (spreadsheet) file:</p>\
-		<h3>1. Download Template</h3><br>\
-		<div style="padding-left: 30px;">\
-			<button class="btn btn-default btn-download-two-accounts">Download</button>\
-			<p class="help">Import multiple vouchers with one debit and one credit entry</p>\
-		</div>\
-		<div style="padding-left: 30px;">\
-			<button class="btn btn-default btn-download-multiple-accounts">Download</button>\
-			<p class="help">Import multiple vouchers with multiple accounts</p>\
-		</div>\
-		<hr>\
-		<h3>2. Upload</h3><br>\
-		<div style="padding-left: 30px;">\
-			<p class="help">Upload file in CSV format with UTF-8 encoding</p>\
-			<div id="voucher-upload"></div>\
-		</div><br>\
-		<div class="working"></div>\
-		<div class="well messages" style="display: none;"></div>');
+	$(wrapper).find('.layout-main').html('<p class="help">' +
+		wn._('Import multiple accounting entries via CSV (spreadsheet) file:') +
+		'</p><h3> 1. ' + wn._('Download Template') + '</h3><br>' +
+		'<div style="padding-left: 30px;">' +
+		    '<button class="btn btn-default btn-download-two-accounts">' +
+		    wn._('Download') + '</button>' +
+			'<p class="help">' + 
+			wn._('Import multiple vouchers with one debit and one credit entry') +
+			'</p></div>'+
+		'<div style="padding-left: 30px;">'+
+			'<button class="btn btn-default btn-download-multiple-accounts">' +
+				wn._('Download') + 
+			'</button><p class="help">' + 
+				wn._('Import multiple vouchers with multiple accounts')+
+			'</p>'+
+		'</div>'+
+		'<hr>'+
+		'<h3> 2. ' + wn._('Upload') + '</h3><br>'+
+		'<div style="padding-left: 30px;">'+
+			'<p class="help">' + wn._('Upload file in CSV format with UTF-8 encoding') +
+			'</p><div id="voucher-upload"></div>'+
+		'</div><br>'+
+		'<div class="working"></div>'+
+		'<div class="well messages" style="display: none;"></div>');
 		
 	wn.upload.make({
 		parent: $(wrapper).find("#voucher-upload"),
diff --git a/accounts/page/voucher_import_tool/voucher_import_tool.py b/accounts/page/voucher_import_tool/voucher_import_tool.py
index 9425afc..73fe14b 100644
--- a/accounts/page/voucher_import_tool/voucher_import_tool.py
+++ b/accounts/page/voucher_import_tool/voucher_import_tool.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 # License: GNU General Public License v3. See license.txt
 
 from __future__ import unicode_literals
@@ -64,10 +64,10 @@
 		
 		data, start_idx = get_data(rows, company_abbr, rows[0][0])
 	except Exception, e:
-		err_msg = webnotes.message_log and "<br>".join(webnotes.message_log) or cstr(e)
+		err_msg = webnotes.local.message_log and "<br>".join(webnotes.local.message_log) or cstr(e)
 		messages.append("""<p style='color: red'>%s</p>""" % (err_msg or "No message"))
 		webnotes.errprint(webnotes.getTraceback())
-		webnotes.message_log = []
+		webnotes.local.message_log = []
 		return messages
 		
 	return import_vouchers(common_values, data, start_idx, rows[0][0])
@@ -117,11 +117,11 @@
 			
 			d = data[i][0]
 			if import_type == "Voucher Import: Two Accounts" and flt(d.get("amount")) == 0:
-				webnotes.message_log = ["Amount not specified"]
+				webnotes.local.message_log = ["Amount not specified"]
 				raise Exception
 			elif import_type == "Voucher Import: Multiple Accounts" and \
 			 		(flt(d.get("total_debit")) == 0 or flt(d.get("total_credit")) == 0):
-				webnotes.message_log = ["Total Debit and Total Credit amount can not be zero"]
+				webnotes.local.message_log = ["Total Debit and Total Credit amount can not be zero"]
 				raise Exception
 			else:
 				d.posting_date = parse_date(d.posting_date)
@@ -174,7 +174,7 @@
 						details.append(detail)
 								
 				if not details:
-					webnotes.message_log = ["""No accounts found. 
+					webnotes.local.message_log = ["""No accounts found. 
 						If you entered accounts correctly, please check template once"""]
 					raise Exception
 					
@@ -193,12 +193,12 @@
 		webnotes.conn.commit()
 	except Exception, e:
 		webnotes.conn.rollback()
-		err_msg = webnotes.message_log and "<br>".join(webnotes.message_log) or cstr(e)
+		err_msg = webnotes.local.message_log and "<br>".join(webnotes.local.message_log) or cstr(e)
 		messages.append("""<p style='color: red'>[row #%s] %s failed: %s</p>"""
 			% ((start_idx + 1) + i, jv.name or "", err_msg or "No message"))
 		messages.append("<p style='color: red'>All transactions rolled back</p>")
 		webnotes.errprint(webnotes.getTraceback())
-		webnotes.message_log = []
+		webnotes.local.message_log = []
 			
 	return messages
 
diff --git a/accounts/report/accounts_payable/accounts_payable.js b/accounts/report/accounts_payable/accounts_payable.js
index 2c6c918..575f05e 100644
--- a/accounts/report/accounts_payable/accounts_payable.js
+++ b/accounts/report/accounts_payable/accounts_payable.js
@@ -1,18 +1,18 @@
-// Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+// Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 // License: GNU General Public License v3. See license.txt
 
 wn.query_reports["Accounts Payable"] = {
 	"filters": [
 		{
 			"fieldname":"company",
-			"label": "Company",
+			"label": wn._("Company"),
 			"fieldtype": "Link",
 			"options": "Company",
 			"default": wn.defaults.get_default("company")
 		},
 		{
 			"fieldname":"account",
-			"label": "Account",
+			"label": wn._("Account"),
 			"fieldtype": "Link",
 			"options": "Account",
 			"get_query": function() {
@@ -30,13 +30,13 @@
 		},
 		{
 			"fieldname":"report_date",
-			"label": "Date",
+			"label": wn._("Date"),
 			"fieldtype": "Date",
 			"default": get_today()
 		},
 		{
 			"fieldname":"ageing_based_on",
-			"label": "Ageing Based On",
+			"label": wn._("Ageing Based On"),
 			"fieldtype": "Select",
 			"options": 'Posting Date' + NEWLINE + 'Due Date',
 			"default": "Posting Date"
diff --git a/accounts/report/accounts_payable/accounts_payable.py b/accounts/report/accounts_payable/accounts_payable.py
index c1a1069..e5489d1 100644
--- a/accounts/report/accounts_payable/accounts_payable.py
+++ b/accounts/report/accounts_payable/accounts_payable.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 # License: GNU General Public License v3. See license.txt
 
 from __future__ import unicode_literals
@@ -130,4 +130,4 @@
 		(gle.account, report_date, gle.voucher_type, gle.voucher_no, gle.name))[0][0]
 		
 	outstanding_amount = flt(gle.credit) - flt(gle.debit) - flt(payment_amount)
-	return outstanding_amount
\ No newline at end of file
+	return outstanding_amount
diff --git a/accounts/report/accounts_receivable/accounts_receivable.js b/accounts/report/accounts_receivable/accounts_receivable.js
index 5f0b190..6f9822e 100644
--- a/accounts/report/accounts_receivable/accounts_receivable.js
+++ b/accounts/report/accounts_receivable/accounts_receivable.js
@@ -1,18 +1,18 @@
-// Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+// Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 // License: GNU General Public License v3. See license.txt
 
 wn.query_reports["Accounts Receivable"] = {
 	"filters": [
 		{
 			"fieldname":"company",
-			"label": "Company",
+			"label": wn._("Company"),
 			"fieldtype": "Link",
 			"options": "Company",
 			"default": wn.defaults.get_default("company")
 		},
 		{
 			"fieldname":"account",
-			"label": "Account",
+			"label": wn._("Account"),
 			"fieldtype": "Link",
 			"options": "Account",
 			"get_query": function() {
@@ -30,13 +30,13 @@
 		},
 		{
 			"fieldname":"report_date",
-			"label": "Date",
+			"label": wn._("Date"),
 			"fieldtype": "Date",
 			"default": get_today()
 		},
 		{
 			"fieldname":"ageing_based_on",
-			"label": "Ageing Based On",
+			"label": wn._("Ageing Based On"),
 			"fieldtype": "Select",
 			"options": 'Posting Date' + NEWLINE + 'Due Date',
 			"default": "Posting Date"
diff --git a/accounts/report/accounts_receivable/accounts_receivable.py b/accounts/report/accounts_receivable/accounts_receivable.py
index df7c93a..40f4d2a 100644
--- a/accounts/report/accounts_receivable/accounts_receivable.py
+++ b/accounts/report/accounts_receivable/accounts_receivable.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 # License: GNU General Public License v3. See license.txt
 
 from __future__ import unicode_literals
diff --git a/accounts/report/bank_clearance_summary/bank_clearance_summary.js b/accounts/report/bank_clearance_summary/bank_clearance_summary.js
index 8e6d0c0..ab98bf7 100644
--- a/accounts/report/bank_clearance_summary/bank_clearance_summary.js
+++ b/accounts/report/bank_clearance_summary/bank_clearance_summary.js
@@ -1,24 +1,24 @@
-// Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+// Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 // License: GNU General Public License v3. See license.txt
 
 wn.query_reports["Bank Clearance Summary"] = {
 	"filters": [
 		{
 			"fieldname":"from_date",
-			"label": "From Date",
+			"label": wn._("From Date"),
 			"fieldtype": "Date",
 			"default": wn.defaults.get_user_default("year_start_date"),
 			"width": "80"
 		},
 		{
 			"fieldname":"to_date",
-			"label": "To Date",
+			"label": wn._("To Date"),
 			"fieldtype": "Date",
 			"default": get_today()
 		},
 		{
 			"fieldname":"account",
-			"label": "Bank Account",
+			"label": wn._("Bank Account"),
 			"fieldtype": "Link",
 			"options": "Account",
 			"get_query": function() {
diff --git a/accounts/report/bank_clearance_summary/bank_clearance_summary.py b/accounts/report/bank_clearance_summary/bank_clearance_summary.py
index 0dfbc94..c2d7439 100644
--- a/accounts/report/bank_clearance_summary/bank_clearance_summary.py
+++ b/accounts/report/bank_clearance_summary/bank_clearance_summary.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 # License: GNU General Public License v3. See license.txt
 
 from __future__ import unicode_literals
diff --git a/accounts/report/bank_reconciliation_statement/bank_reconciliation_statement.js b/accounts/report/bank_reconciliation_statement/bank_reconciliation_statement.js
index bf971a7..b93f182 100644
--- a/accounts/report/bank_reconciliation_statement/bank_reconciliation_statement.js
+++ b/accounts/report/bank_reconciliation_statement/bank_reconciliation_statement.js
@@ -1,11 +1,11 @@
-// Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+// Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 // License: GNU General Public License v3. See license.txt
 
 wn.query_reports["Bank Reconciliation Statement"] = {
 	"filters": [
 		{
 			"fieldname":"account",
-			"label": "Bank Account",
+			"label": wn._("Bank Account"),
 			"fieldtype": "Link",
 			"options": "Account",
 			"get_query": function() {
@@ -20,7 +20,7 @@
 		},
 		{
 			"fieldname":"report_date",
-			"label": "Date",
+			"label": wn._("Date"),
 			"fieldtype": "Date",
 			"default": get_today()
 		},
diff --git a/accounts/report/bank_reconciliation_statement/bank_reconciliation_statement.py b/accounts/report/bank_reconciliation_statement/bank_reconciliation_statement.py
index 1b64850..431a649 100644
--- a/accounts/report/bank_reconciliation_statement/bank_reconciliation_statement.py
+++ b/accounts/report/bank_reconciliation_statement/bank_reconciliation_statement.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 # License: GNU General Public License v3. See license.txt
 
 from __future__ import unicode_literals
diff --git a/accounts/report/budget_variance_report/budget_variance_report.js b/accounts/report/budget_variance_report/budget_variance_report.js
index 2ed6018..b8e28f3 100644
--- a/accounts/report/budget_variance_report/budget_variance_report.js
+++ b/accounts/report/budget_variance_report/budget_variance_report.js
@@ -1,25 +1,25 @@
-// Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+// Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 // License: GNU General Public License v3. See license.txt
 
 wn.query_reports["Budget Variance Report"] = {
 	"filters": [
 		{
 			fieldname: "fiscal_year",
-			label: "Fiscal Year",
+			label: wn._("Fiscal Year"),
 			fieldtype: "Link",
 			options: "Fiscal Year",
 			default: sys_defaults.fiscal_year
 		},
 		{
 			fieldname: "period",
-			label: "Period",
+			label: wn._("Period"),
 			fieldtype: "Select",
 			options: "Monthly\nQuarterly\nHalf-Yearly\nYearly",
 			default: "Monthly"
 		},
 		{
 			fieldname: "company",
-			label: "Company",
+			label: wn._("Company"),
 			fieldtype: "Link",
 			options: "Company",
 			default: wn.defaults.get_default("company")
diff --git a/accounts/report/budget_variance_report/budget_variance_report.py b/accounts/report/budget_variance_report/budget_variance_report.py
index 652c185..2cbbd62 100644
--- a/accounts/report/budget_variance_report/budget_variance_report.py
+++ b/accounts/report/budget_variance_report/budget_variance_report.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 # License: GNU General Public License v3. See license.txt
 
 from __future__ import unicode_literals
diff --git a/accounts/report/customer_account_head/customer_account_head.py b/accounts/report/customer_account_head/customer_account_head.py
index 255f348..560b6fd 100644
--- a/accounts/report/customer_account_head/customer_account_head.py
+++ b/accounts/report/customer_account_head/customer_account_head.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 # License: GNU General Public License v3. See license.txt
 
 from __future__ import unicode_literals
diff --git a/accounts/report/gross_profit/gross_profit.js b/accounts/report/gross_profit/gross_profit.js
index aea0b8a..b01c40f 100644
--- a/accounts/report/gross_profit/gross_profit.js
+++ b/accounts/report/gross_profit/gross_profit.js
@@ -1,24 +1,24 @@
-// Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+// Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 // License: GNU General Public License v3. See license.txt
 
 wn.query_reports["Gross Profit"] = {
 	"filters": [
 		{
 			"fieldname":"company",
-			"label": "Company",
+			"label": wn._("Company"),
 			"fieldtype": "Link",
 			"options": "Company",
 			"default": wn.defaults.get_user_default("company")
 		},
 		{
 			"fieldname":"from_date",
-			"label": "From Date",
+			"label": wn._("From Date"),
 			"fieldtype": "Date",
 			"default": wn.defaults.get_user_default("year_start_date")
 		},
 		{
 			"fieldname":"to_date",
-			"label": "To Date",
+			"label": wn._("To Date"),
 			"fieldtype": "Date",
 			"default": wn.defaults.get_user_default("year_end_date")
 		},
diff --git a/accounts/report/gross_profit/gross_profit.py b/accounts/report/gross_profit/gross_profit.py
index 9917b69..8e73062 100644
--- a/accounts/report/gross_profit/gross_profit.py
+++ b/accounts/report/gross_profit/gross_profit.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 # License: GNU General Public License v3. See license.txt
 
 from __future__ import unicode_literals
@@ -75,7 +75,7 @@
 	
 	for d in webnotes.conn.sql("""select parenttype, parent, parent_item,
 		item_code, warehouse, -1*qty as total_qty, parent_detail_docname
-		from `tabDelivery Note Packing Item` where docstatus=1""", as_dict=True):
+		from `tabPacked Item` where docstatus=1""", as_dict=True):
 		item_sales_bom.setdefault(d.parenttype, webnotes._dict()).setdefault(d.parent,
 			webnotes._dict()).setdefault(d.parent_item, []).append(d)
 
diff --git a/accounts/report/item_wise_purchase_register/item_wise_purchase_register.js b/accounts/report/item_wise_purchase_register/item_wise_purchase_register.js
index 457c9a8..df9d7af 100644
--- a/accounts/report/item_wise_purchase_register/item_wise_purchase_register.js
+++ b/accounts/report/item_wise_purchase_register/item_wise_purchase_register.js
@@ -1,30 +1,30 @@
-// Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+// Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 // License: GNU General Public License v3. See license.txt
 
 wn.query_reports["Item-wise Purchase Register"] = {
 	"filters": [
 		{
 			"fieldname":"from_date",
-			"label": "From Date",
+			"label": wn._("From Date"),
 			"fieldtype": "Date",
 			"default": wn.defaults.get_user_default("year_start_date"),
 			"width": "80"
 		},
 		{
 			"fieldname":"to_date",
-			"label": "To Date",
+			"label": wn._("To Date"),
 			"fieldtype": "Date",
 			"default": get_today()
 		},
 		{
 			"fieldname": "item_code",
-			"label": "Item",
+			"label": wn._("Item"),
 			"fieldtype": "Link",
 			"options": "Item",
 		},
 		{
 			"fieldname":"account",
-			"label": "Account",
+			"label": wn._("Account"),
 			"fieldtype": "Link",
 			"options": "Account",
 			"get_query": function() {
@@ -42,7 +42,7 @@
 		},
 		{
 			"fieldname":"company",
-			"label": "Company",
+			"label": wn._("Company"),
 			"fieldtype": "Link",
 			"options": "Company",
 			"default": wn.defaults.get_default("company")
diff --git a/accounts/report/item_wise_purchase_register/item_wise_purchase_register.py b/accounts/report/item_wise_purchase_register/item_wise_purchase_register.py
index 4f11a61..7d81308 100644
--- a/accounts/report/item_wise_purchase_register/item_wise_purchase_register.py
+++ b/accounts/report/item_wise_purchase_register/item_wise_purchase_register.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 # License: GNU General Public License v3. See license.txt
 
 from __future__ import unicode_literals
diff --git a/accounts/report/item_wise_sales_register/item_wise_sales_register.js b/accounts/report/item_wise_sales_register/item_wise_sales_register.js
index c131fbd..361ac54 100644
--- a/accounts/report/item_wise_sales_register/item_wise_sales_register.js
+++ b/accounts/report/item_wise_sales_register/item_wise_sales_register.js
@@ -1,24 +1,24 @@
-// Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+// Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 // License: GNU General Public License v3. See license.txt
 
 wn.query_reports["Item-wise Sales Register"] = wn.query_reports["Sales Register"] = {
 	"filters": [
 		{
 			"fieldname":"from_date",
-			"label": "From Date",
+			"label": wn._("From Date"),
 			"fieldtype": "Date",
 			"default": wn.defaults.get_default("year_start_date"),
 			"width": "80"
 		},
 		{
 			"fieldname":"to_date",
-			"label": "To Date",
+			"label": wn._("To Date"),
 			"fieldtype": "Date",
 			"default": get_today()
 		},
 		{
 			"fieldname":"account",
-			"label": "Account",
+			"label": wn._("Account"),
 			"fieldtype": "Link",
 			"options": "Account",
 			"get_query": function() {
@@ -36,7 +36,7 @@
 		},
 		{
 			"fieldname":"company",
-			"label": "Company",
+			"label": wn._("Company"),
 			"fieldtype": "Link",
 			"options": "Company",
 			"default": wn.defaults.get_default("company")
diff --git a/accounts/report/item_wise_sales_register/item_wise_sales_register.py b/accounts/report/item_wise_sales_register/item_wise_sales_register.py
index ce8e3c5..dc5ecda 100644
--- a/accounts/report/item_wise_sales_register/item_wise_sales_register.py
+++ b/accounts/report/item_wise_sales_register/item_wise_sales_register.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 # License: GNU General Public License v3. See license.txt
 
 from __future__ import unicode_literals
diff --git a/accounts/report/payment_collection_with_ageing/payment_collection_with_ageing.js b/accounts/report/payment_collection_with_ageing/payment_collection_with_ageing.js
index 8d8c746..6773a0e 100644
--- a/accounts/report/payment_collection_with_ageing/payment_collection_with_ageing.js
+++ b/accounts/report/payment_collection_with_ageing/payment_collection_with_ageing.js
@@ -1,24 +1,24 @@
-// Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+// Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 // License: GNU General Public License v3. See license.txt
 
 wn.query_reports["Payment Collection With Ageing"] = {
 	"filters": [
 		{
 			"fieldname": "from_date",
-			"label": "From Date",
+			"label": wn._("From Date"),
 			"fieldtype": "Date",
 			"default": wn.defaults.get_user_default("year_start_date"),
 			"width": "80"
 		},
 		{
 			"fieldname":"to_date",
-			"label": "To Date",
+			"label": wn._("To Date"),
 			"fieldtype": "Date",
 			"default": get_today()
 		},
 		{
 			"fieldname":"account",
-			"label": "Customer Account",
+			"label": wn._("Customer Account"),
 			"fieldtype": "Link",
 			"options": "Account",
 			"get_query": function() {
@@ -36,7 +36,7 @@
 		},
 		{
 			"fieldname":"company",
-			"label": "Company",
+			"label": wn._("Company"),
 			"fieldtype": "Link",
 			"options": "Company",
 			"default": wn.defaults.get_default("company")
diff --git a/accounts/report/payment_collection_with_ageing/payment_collection_with_ageing.py b/accounts/report/payment_collection_with_ageing/payment_collection_with_ageing.py
index 41c5f3e..faee0ae 100644
--- a/accounts/report/payment_collection_with_ageing/payment_collection_with_ageing.py
+++ b/accounts/report/payment_collection_with_ageing/payment_collection_with_ageing.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 # License: GNU General Public License v3. See license.txt
 
 from __future__ import unicode_literals
diff --git a/accounts/report/payment_made_with_ageing/payment_made_with_ageing.js b/accounts/report/payment_made_with_ageing/payment_made_with_ageing.js
index 7b80bde..2d27b8e 100644
--- a/accounts/report/payment_made_with_ageing/payment_made_with_ageing.js
+++ b/accounts/report/payment_made_with_ageing/payment_made_with_ageing.js
@@ -1,23 +1,23 @@
-// Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+// Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 // License: GNU General Public License v3. See license.txt
 
 wn.query_reports["Payment Made With Ageing"] = {
 	"filters": [
 		{
 			fieldname: "from_date",
-			label: "From Date",
+			label: wn._("From Date"),
 			fieldtype: "Date",
 			default: wn.defaults.get_user_default("year_start_date"),
 		},
 		{
 			fieldname:"to_date",
-			label: "To Date",
+			label: wn._("To Date"),
 			fieldtype: "Date",
 			default: get_today()
 		},
 		{
 			fieldname:"account",
-			label: "Supplier Account",
+			label: wn._("Supplier Account"),
 			fieldtype: "Link",
 			options: "Account",
 			get_query: function() {
@@ -34,7 +34,7 @@
 		},
 		{
 			fieldname:"company",
-			label: "Company",
+			label: wn._("Company"),
 			fieldtype: "Link",
 			options: "Company",
 			default: wn.defaults.get_default("company")
diff --git a/accounts/report/payment_made_with_ageing/payment_made_with_ageing.py b/accounts/report/payment_made_with_ageing/payment_made_with_ageing.py
index 8d3618f..677dcfc 100644
--- a/accounts/report/payment_made_with_ageing/payment_made_with_ageing.py
+++ b/accounts/report/payment_made_with_ageing/payment_made_with_ageing.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 # License: GNU General Public License v3. See license.txt
 
 from __future__ import unicode_literals
diff --git a/accounts/report/purchase_invoice_trends/purchase_invoice_trends.js b/accounts/report/purchase_invoice_trends/purchase_invoice_trends.js
index 5dbc3fe..183e16a 100644
--- a/accounts/report/purchase_invoice_trends/purchase_invoice_trends.js
+++ b/accounts/report/purchase_invoice_trends/purchase_invoice_trends.js
@@ -1,4 +1,4 @@
-// Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+// Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 // License: GNU General Public License v3. See license.txt
 
 wn.require("app/js/purchase_trends_filters.js");
diff --git a/accounts/report/purchase_invoice_trends/purchase_invoice_trends.py b/accounts/report/purchase_invoice_trends/purchase_invoice_trends.py
index c0eb8c9..4c38bed 100644
--- a/accounts/report/purchase_invoice_trends/purchase_invoice_trends.py
+++ b/accounts/report/purchase_invoice_trends/purchase_invoice_trends.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 # License: GNU General Public License v3. See license.txt
 
 from __future__ import unicode_literals
diff --git a/accounts/report/purchase_register/purchase_register.js b/accounts/report/purchase_register/purchase_register.js
index 5944b1a..b38dcba 100644
--- a/accounts/report/purchase_register/purchase_register.js
+++ b/accounts/report/purchase_register/purchase_register.js
@@ -1,24 +1,24 @@
-// Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+// Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 // License: GNU General Public License v3. See license.txt
 
 wn.query_reports["Purchase Register"] = {
 	"filters": [
 		{
 			"fieldname":"from_date",
-			"label": "From Date",
+			"label": wn._("From Date"),
 			"fieldtype": "Date",
 			"default": wn.defaults.get_user_default("year_start_date"),
 			"width": "80"
 		},
 		{
 			"fieldname":"to_date",
-			"label": "To Date",
+			"label": wn._("To Date"),
 			"fieldtype": "Date",
 			"default": get_today()
 		},
 		{
 			"fieldname":"account",
-			"label": "Account",
+			"label": wn._("Account"),
 			"fieldtype": "Link",
 			"options": "Account",
 			"get_query": function() {
@@ -36,7 +36,7 @@
 		},
 		{
 			"fieldname":"company",
-			"label": "Company",
+			"label": wn._("Company"),
 			"fieldtype": "Link",
 			"options": "Company",
 			"default": wn.defaults.get_default("company")
diff --git a/accounts/report/purchase_register/purchase_register.py b/accounts/report/purchase_register/purchase_register.py
index d7bac9d..9225a08 100644
--- a/accounts/report/purchase_register/purchase_register.py
+++ b/accounts/report/purchase_register/purchase_register.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 # License: GNU General Public License v3. See license.txt
 
 from __future__ import unicode_literals
diff --git a/accounts/report/sales_invoice_trends/sales_invoice_trends.js b/accounts/report/sales_invoice_trends/sales_invoice_trends.js
index 449b6d2..3b004ab 100644
--- a/accounts/report/sales_invoice_trends/sales_invoice_trends.js
+++ b/accounts/report/sales_invoice_trends/sales_invoice_trends.js
@@ -1,4 +1,4 @@
-// Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+// Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 // License: GNU General Public License v3. See license.txt
 
 wn.require("app/js/sales_trends_filters.js");
diff --git a/accounts/report/sales_invoice_trends/sales_invoice_trends.py b/accounts/report/sales_invoice_trends/sales_invoice_trends.py
index 121473d..70c61d7 100644
--- a/accounts/report/sales_invoice_trends/sales_invoice_trends.py
+++ b/accounts/report/sales_invoice_trends/sales_invoice_trends.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 # License: GNU General Public License v3. See license.txt
 
 from __future__ import unicode_literals
diff --git a/accounts/report/sales_register/sales_register.js b/accounts/report/sales_register/sales_register.js
index 43c841f..4238e31 100644
--- a/accounts/report/sales_register/sales_register.js
+++ b/accounts/report/sales_register/sales_register.js
@@ -1,24 +1,24 @@
-// Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+// Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 // License: GNU General Public License v3. See license.txt
 
 wn.query_reports["Sales Register"] = {
 	"filters": [
 		{
 			"fieldname":"from_date",
-			"label": "From Date",
+			"label": wn._("From Date"),
 			"fieldtype": "Date",
 			"default": wn.defaults.get_default("year_start_date"),
 			"width": "80"
 		},
 		{
 			"fieldname":"to_date",
-			"label": "To Date",
+			"label": wn._("To Date"),
 			"fieldtype": "Date",
 			"default": get_today()
 		},
 		{
 			"fieldname":"account",
-			"label": "Account",
+			"label": wn._("Account"),
 			"fieldtype": "Link",
 			"options": "Account",
 			"get_query": function() {
@@ -36,7 +36,7 @@
 		},
 		{
 			"fieldname":"company",
-			"label": "Company",
+			"label": wn._("Company"),
 			"fieldtype": "Link",
 			"options": "Company",
 			"default": wn.defaults.get_default("company")
diff --git a/accounts/report/sales_register/sales_register.py b/accounts/report/sales_register/sales_register.py
index 4025f66..49b914e 100644
--- a/accounts/report/sales_register/sales_register.py
+++ b/accounts/report/sales_register/sales_register.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 # License: GNU General Public License v3. See license.txt
 
 from __future__ import unicode_literals
diff --git a/accounts/report/supplier_account_head/supplier_account_head.py b/accounts/report/supplier_account_head/supplier_account_head.py
index 53796ce..741e07f 100644
--- a/accounts/report/supplier_account_head/supplier_account_head.py
+++ b/accounts/report/supplier_account_head/supplier_account_head.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 # License: GNU General Public License v3. See license.txt
 
 from __future__ import unicode_literals
diff --git a/accounts/utils.py b/accounts/utils.py
index 5c6c16b..3ca1a8a 100644
--- a/accounts/utils.py
+++ b/accounts/utils.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 # License: GNU General Public License v3. See license.txt
 
 from __future__ import unicode_literals
@@ -108,7 +108,7 @@
 @webnotes.whitelist()
 def add_ac(args=None):
 	if not args:
-		args = webnotes.form_dict
+		args = webnotes.local.form_dict
 		args.pop("cmd")
 		
 	ac = webnotes.bean(args)
@@ -121,7 +121,7 @@
 @webnotes.whitelist()
 def add_cc(args=None):
 	if not args:
-		args = webnotes.form_dict
+		args = webnotes.local.form_dict
 		args.pop("cmd")
 		
 	cc = webnotes.bean(args)
diff --git a/buying/doctype/buying_settings/buying_settings.py b/buying/doctype/buying_settings/buying_settings.py
index 3f4f96d..53e4479 100644
--- a/buying/doctype/buying_settings/buying_settings.py
+++ b/buying/doctype/buying_settings/buying_settings.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 # License: GNU General Public License v3. See license.txt
 
 # For license information, please see license.txt
@@ -13,4 +13,7 @@
 	def validate(self):
 		for key in ["supplier_type", "supp_master_name", "maintain_same_rate", "buying_price_list"]:
 			webnotes.conn.set_default(key, self.doc.fields.get(key, ""))
-	
\ No newline at end of file
+
+		from setup.doctype.naming_series.naming_series import set_by_naming_series
+		set_by_naming_series("Supplier", "supplier_name", 
+			self.doc.get("supp_master_name")=="Naming Series", hide_name_field=False)
diff --git a/buying/doctype/purchase_common/purchase_common.js b/buying/doctype/purchase_common/purchase_common.js
index 433a76f..9661f6e 100644
--- a/buying/doctype/purchase_common/purchase_common.js
+++ b/buying/doctype/purchase_common/purchase_common.js
@@ -1,4 +1,4 @@
-// Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+// Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 // License: GNU General Public License v3. See license.txt
 
 // Preset
@@ -8,6 +8,7 @@
 
 wn.provide("erpnext.buying");
 wn.require("app/js/transaction.js");
+wn.require("app/js/controllers/accounts.js");
 
 erpnext.buying.BuyingController = erpnext.TransactionController.extend({
 	onload: function() {
@@ -413,26 +414,27 @@
 		setup_field_label_map(["net_total_import", "grand_total_import", "in_words_import",
 			"other_charges_added_import", "other_charges_deducted_import"], this.frm.doc.currency);
 		
-		setup_field_label_map(["conversion_rate"], 	"1 " + this.frm.doc.currency 
+		cur_frm.set_df_property("conversion_rate", "description", "1 " + this.frm.doc.currency 
 			+ " = [?] " + company_currency);
 		
 		if(this.frm.doc.price_list_currency && this.frm.doc.price_list_currency!=company_currency) {
-			setup_field_label_map(["plc_conversion_rate"], 	"1 " + this.frm.doc.price_list_currency 
+			cur_frm.set_df_property("plc_conversion_rate", "description", "1 " + this.frm.doc.price_list_currency 
 				+ " = [?] " + company_currency);
 		}
 		
 		// toggle fields
 		this.frm.toggle_display(["conversion_rate", "net_total", "grand_total", 
 			"in_words", "other_charges_added", "other_charges_deducted"],
-			this.frm.doc.currency != company_currency);
-			
-		this.frm.toggle_display(["plc_conversion_rate"], 
-			this.frm.price_list_currency != company_currency);
+			this.frm.doc.currency !== company_currency);
 		
+		this.frm.toggle_display(["plc_conversion_rate", "price_list_currency"], 
+			this.frm.doc.price_list_currency !== company_currency);		
+
 		// set labels
 		$.each(field_label_map, function(fname, label) {
 			me.frm.fields_dict[fname].set_label(label);
 		});
+
 	},
 	
 	change_grid_labels: function(company_currency) {
diff --git a/buying/doctype/purchase_common/purchase_common.py b/buying/doctype/purchase_common/purchase_common.py
index 9b6dc6c..c265874 100644
--- a/buying/doctype/purchase_common/purchase_common.py
+++ b/buying/doctype/purchase_common/purchase_common.py
@@ -1,49 +1,22 @@
-# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 # License: GNU General Public License v3. See license.txt
 
 from __future__ import unicode_literals
 import webnotes
 
 from webnotes.utils import cstr, flt
-from webnotes.model.bean import getlist
+from webnotes.model.utils import getlist
 from webnotes import msgprint, _
 
 from buying.utils import get_last_purchase_details
 
-sql = webnotes.conn.sql
 	
 from controllers.buying_controller import BuyingController
 class DocType(BuyingController):
 	def __init__(self, doc, doclist=None):
 		self.doc = doc
 		self.doclist = doclist
-
-	def is_item_table_empty(self, obj):
-		if not len(obj.doclist.get({"parentfield": obj.fname})):
-			msgprint(_("You need to put at least one item in the item table."), raise_exception=True)
-
-	def get_supplier_details(self, name = ''):
-		details = sql("select supplier_name,address from `tabSupplier` where name = '%s' and docstatus != 2" %(name), as_dict = 1)
-		if details:
-			ret = {
-				'supplier_name'	:	details and details[0]['supplier_name'] or '',
-				'supplier_address'	:	details and details[0]['address'] or ''
-			}
-			# ********** get primary contact details (this is done separately coz. , in case there is no primary contact thn it would not be able to fetch customer details in case of join query)
-			contact_det = sql("select contact_name, contact_no, email_id from `tabContact` where supplier = '%s' and is_supplier = 1 and is_primary_contact = 'Yes' and docstatus != 2" %(name), as_dict = 1)
-			ret['contact_person'] = contact_det and contact_det[0]['contact_name'] or ''
-			return ret
-		else:
-			msgprint("Supplier : %s does not exists" % (name))
-			raise Exception
 	
-	# Get Available Qty at Warehouse
-	def get_bin_details( self, arg = ''):
-		arg = eval(arg)
-		bin = sql("select projected_qty from `tabBin` where item_code = %s and warehouse = %s", (arg['item_code'], arg['warehouse']), as_dict=1)
-		ret = { 'projected_qty' : bin and flt(bin[0]['projected_qty']) or 0 }
-		return ret
-
 	def update_last_purchase_rate(self, obj, is_submit):
 		"""updates last_purchase_rate in item table for each item"""
 		
@@ -70,7 +43,7 @@
 
 			# update last purchsae rate
 			if last_purchase_rate:
-				sql("update `tabItem` set last_purchase_rate = %s where name = %s",
+				webnotes.conn.sql("update `tabItem` set last_purchase_rate = %s where name = %s",
 						(flt(last_purchase_rate),d.item_code))
 	
 	def get_last_purchase_rate(self, obj):
@@ -107,7 +80,7 @@
 				raise Exception
 			
 			# udpate with latest quantities
-			bin = sql("select projected_qty from `tabBin` where item_code = %s and warehouse = %s", (d.item_code, d.warehouse), as_dict = 1)
+			bin = webnotes.conn.sql("select projected_qty from `tabBin` where item_code = %s and warehouse = %s", (d.item_code, d.warehouse), as_dict = 1)
 			
 			f_lst ={'projected_qty': bin and flt(bin[0]['projected_qty']) or 0, 'ordered_qty': 0, 'received_qty' : 0}
 			if d.doctype == 'Purchase Receipt Item':
@@ -116,7 +89,7 @@
 				if d.fields.has_key(x):
 					d.fields[x] = f_lst[x]
 			
-			item = sql("select is_stock_item, is_purchase_item, is_sub_contracted_item, end_of_life from tabItem where name=%s", 
+			item = webnotes.conn.sql("select is_stock_item, is_purchase_item, is_sub_contracted_item, end_of_life from tabItem where name=%s", 
 				d.item_code)
 			if not item:
 				msgprint("Item %s does not exist in Item Master." % cstr(d.item_code), raise_exception=True)
@@ -139,7 +112,7 @@
 			# if is not stock item
 			f = [d.schedule_date, d.item_code, d.description]
 			
-			ch = sql("select is_stock_item from `tabItem` where name = '%s'"%d.item_code)
+			ch = webnotes.conn.sql("select is_stock_item from `tabItem` where name = '%s'"%d.item_code)
 			
 			if ch and ch[0][0] == 'Yes':	
 				# check for same items
@@ -165,18 +138,18 @@
 		# but if in Material Request uom KG it can change in PO
 		
 		get_qty = (transaction == 'Material Request - Purchase Order') and 'qty * conversion_factor' or 'qty'
-		qty = sql("select sum(%s) from `tab%s` where %s = '%s' and docstatus = 1 and parent != '%s'"% ( get_qty, curr_doctype, ref_tab_fname, ref_tab_dn, curr_parent_name))
+		qty = webnotes.conn.sql("select sum(%s) from `tab%s` where %s = '%s' and docstatus = 1 and parent != '%s'"% ( get_qty, curr_doctype, ref_tab_fname, ref_tab_dn, curr_parent_name))
 		qty = qty and flt(qty[0][0]) or 0 
 		
 		# get total qty of ref doctype
 		#--------------------
-		max_qty = sql("select qty from `tab%s` where name = '%s' and docstatus = 1"% (ref_doc_tname, ref_tab_dn))
+		max_qty = webnotes.conn.sql("select qty from `tab%s` where name = '%s' and docstatus = 1"% (ref_doc_tname, ref_tab_dn))
 		max_qty = max_qty and flt(max_qty[0][0]) or 0
 		
 		return cstr(qty)+'~~~'+cstr(max_qty)
 
 	def check_for_stopped_status(self, doctype, docname):
-		stopped = sql("select name from `tab%s` where name = '%s' and status = 'Stopped'" % 
+		stopped = webnotes.conn.sql("select name from `tab%s` where name = '%s' and status = 'Stopped'" % 
 			( doctype, docname))
 		if stopped:
 			msgprint("One cannot do any transaction against %s : %s, it's status is 'Stopped'" % 
@@ -184,7 +157,7 @@
 	
 	def check_docstatus(self, check, doctype, docname , detail_doctype = ''):
 		if check == 'Next':
-			submitted = sql("""select t1.name from `tab%s` t1,`tab%s` t2 
+			submitted = webnotes.conn.sql("""select t1.name from `tab%s` t1,`tab%s` t2 
 				where t1.name = t2.parent and t2.prevdoc_docname = %s and t1.docstatus = 1""" 
 				% (doctype, detail_doctype, '%s'), docname)
 			if submitted:
@@ -192,23 +165,8 @@
 					+ _(" has already been submitted."), raise_exception=1)
 
 		if check == 'Previous':
-			submitted = sql("""select name from `tab%s` 
+			submitted = webnotes.conn.sql("""select name from `tab%s` 
 				where docstatus = 1 and name = %s"""% (doctype, '%s'), docname)
 			if not submitted:
 				msgprint(cstr(doctype) + ": " + cstr(submitted[0][0]) 
 					+ _(" not submitted"), raise_exception=1)
-
-	def get_rate(self, arg, obj):
-		arg = eval(arg)
-		rate = sql("select account_type, tax_rate from `tabAccount` where name = %s" 
-			, (arg['account_head']), as_dict=1)
-		
-		return {'rate':	rate and (rate[0]['account_type'] == 'Tax' \
-			and not arg['charge_type'] == 'Actual') and flt(rate[0]['tax_rate']) or 0 }
-
-	def get_prevdoc_date(self, obj):
-		for d in getlist(obj.doclist, obj.fname):
-			if d.prevdoc_doctype and d.prevdoc_docname:
-				dt = sql("select transaction_date from `tab%s` where name = %s" 
-					% (d.prevdoc_doctype, '%s'), (d.prevdoc_docname))
-				d.prevdoc_date = dt and dt[0][0].strftime('%Y-%m-%d') or ''
\ No newline at end of file
diff --git a/buying/doctype/purchase_order/purchase_order.js b/buying/doctype/purchase_order/purchase_order.js
index d35072d..dad2864 100644
--- a/buying/doctype/purchase_order/purchase_order.js
+++ b/buying/doctype/purchase_order/purchase_order.js
@@ -1,4 +1,4 @@
-// Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+// Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 // License: GNU General Public License v3. See license.txt
 
 wn.provide("erpnext.buying");
@@ -23,21 +23,21 @@
 			cur_frm.dashboard.add_progress(cint(doc.per_billed) + wn._("% Billed"), 
 				doc.per_billed);
 
-
 			cur_frm.add_custom_button('Send SMS', cur_frm.cscript.send_sms);
+
 			if(flt(doc.per_received, 2) < 100) 
-				cur_frm.add_custom_button('Make Purchase Receipt', this.make_purchase_receipt);	
+				cur_frm.add_custom_button(wn._('Make Purchase Receipt'), this.make_purchase_receipt);	
 			if(flt(doc.per_billed, 2) < 100) 
-				cur_frm.add_custom_button('Make Invoice', this.make_purchase_invoice);
+				cur_frm.add_custom_button(wn._('Make Invoice'), this.make_purchase_invoice);
 			if(flt(doc.per_billed, 2) < 100 || doc.per_received < 100) 
-				cur_frm.add_custom_button('Stop', cur_frm.cscript['Stop Purchase Order']);
+				cur_frm.add_custom_button(wn._('Stop'), cur_frm.cscript['Stop Purchase Order'], "icon-exclamation");
 		} else if(doc.docstatus===0) {
 			cur_frm.cscript.add_from_mappers();
 		}
 
 		if(doc.docstatus == 1 && doc.status == 'Stopped')
-			cur_frm.add_custom_button('Unstop Purchase Order', 
-				cur_frm.cscript['Unstop Purchase Order']);
+			cur_frm.add_custom_button(wn._('Unstop Purchase Order'), 
+				cur_frm.cscript['Unstop Purchase Order'], "icon-check");
 	},
 		
 	make_purchase_receipt: function() {
@@ -137,7 +137,7 @@
 
 cur_frm.cscript['Stop Purchase Order'] = function() {
 	var doc = cur_frm.doc;
-	var check = confirm("Do you really want to STOP " + doc.name);
+	var check = confirm(wn._("Do you really want to STOP ") + doc.name);
 
 	if (check) {
 		return $c('runserverobj', args={'method':'update_status', 'arg': 'Stopped', 'docs': wn.model.compress(make_doclist(doc.doctype, doc.name))}, function(r,rt) {
@@ -148,7 +148,7 @@
 
 cur_frm.cscript['Unstop Purchase Order'] = function() {
 	var doc = cur_frm.doc;
-	var check = confirm("Do you really want to UNSTOP " + doc.name);
+	var check = confirm(wn._("Do you really want to UNSTOP ") + doc.name);
 
 	if (check) {
 		return $c('runserverobj', args={'method':'update_status', 'arg': 'Submitted', 'docs': wn.model.compress(make_doclist(doc.doctype, doc.name))}, function(r,rt) {
@@ -185,9 +185,9 @@
 			if(cl[i].prevdoc_doctype == 'Material Request' && cl[i].prevdoc_docname && prevdoc_list.indexOf(cl[i].prevdoc_docname) == -1) {
 				prevdoc_list.push(cl[i].prevdoc_docname);
 				if(prevdoc_list.length ==1)
-					out += make_row(cl[i].prevdoc_doctype, cl[i].prevdoc_docname, cl[i].prevdoc_date,0);
+					out += make_row(cl[i].prevdoc_doctype, cl[i].prevdoc_docname, null,0);
 				else
-					out += make_row('', cl[i].prevdoc_docname, cl[i].prevdoc_date,0);
+					out += make_row('', cl[i].prevdoc_docname,null,0);
 			}
 		}
 	}
diff --git a/buying/doctype/purchase_order/purchase_order.py b/buying/doctype/purchase_order/purchase_order.py
index 64f89e3..33d8b48 100644
--- a/buying/doctype/purchase_order/purchase_order.py
+++ b/buying/doctype/purchase_order/purchase_order.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 # License: GNU General Public License v3. See license.txt
 
 from __future__ import unicode_literals
@@ -9,7 +9,6 @@
 from webnotes.model.code import get_obj
 from webnotes import msgprint
 
-sql = webnotes.conn.sql
 	
 from controllers.buying_controller import BuyingController
 class DocType(BuyingController):
@@ -42,7 +41,6 @@
 
 		pc_obj = get_obj(dt='Purchase Common')
 		pc_obj.validate_for_items(self)
-		pc_obj.get_prevdoc_date(self)
 		self.check_for_stopped_status(pc_obj)
 
 		self.validate_uom_is_integer("uom", "qty")
@@ -66,10 +64,6 @@
 			}
 		})
 
-	# get available qty at warehouse
-	def get_bin_details(self, arg = ''):
-		return get_obj(dt='Purchase Common').get_bin_details(arg)
-
 	def get_schedule_dates(self):
 		for d in getlist(self.doclist, 'po_details'):
 			if d.prevdoc_detail_docname and not d.schedule_date:
@@ -133,8 +127,8 @@
 				update_bin(args)
 				
 	def check_modified_date(self):
-		mod_db = sql("select modified from `tabPurchase Order` where name = '%s'" % self.doc.name)
-		date_diff = sql("select TIMEDIFF('%s', '%s')" % ( mod_db[0][0],cstr(self.doc.modified)))
+		mod_db = webnotes.conn.sql("select modified from `tabPurchase Order` where name = '%s'" % self.doc.name)
+		date_diff = webnotes.conn.sql("select TIMEDIFF('%s', '%s')" % ( mod_db[0][0],cstr(self.doc.modified)))
 		
 		if date_diff and date_diff[0][0]:
 			msgprint(cstr(self.doc.doctype) +" => "+ cstr(self.doc.name) +" has been modified. Please Refresh. ")
@@ -153,7 +147,6 @@
 
 	def on_submit(self):
 		purchase_controller = webnotes.get_obj("Purchase Common")
-		purchase_controller.is_item_table_empty(self)
 		
 		self.update_prevdoc_status()
 		self.update_bin(is_submit = 1, is_stopped = 0)
@@ -173,7 +166,7 @@
 		pc_obj.check_docstatus(check = 'Next', doctype = 'Purchase Receipt', docname = self.doc.name, detail_doctype = 'Purchase Receipt Item')
 
 		# Check if Purchase Invoice has been submitted against current Purchase Order
-		submitted = sql("select t1.name from `tabPurchase Invoice` t1,`tabPurchase Invoice Item` t2 where t1.name = t2.parent and t2.purchase_order = '%s' and t1.docstatus = 1" % self.doc.name)
+		submitted = webnotes.conn.sql("select t1.name from `tabPurchase Invoice` t1,`tabPurchase Invoice Item` t2 where t1.name = t2.parent and t2.purchase_order = '%s' and t1.docstatus = 1" % self.doc.name)
 		if submitted:
 			msgprint("Purchase Invoice : " + cstr(submitted[0][0]) + " has already been submitted !")
 			raise Exception
@@ -186,9 +179,6 @@
 	def on_update(self):
 		pass
 		
-	def get_rate(self,arg):
-		return get_obj('Purchase Common').get_rate(arg,self)
-
 @webnotes.whitelist()
 def make_purchase_receipt(source_name, target_doclist=None):
 	from webnotes.model.mapper import get_mapped_doclist
diff --git a/buying/doctype/purchase_order/purchase_order.txt b/buying/doctype/purchase_order/purchase_order.txt
index d3c1620..6a97eed 100644
--- a/buying/doctype/purchase_order/purchase_order.txt
+++ b/buying/doctype/purchase_order/purchase_order.txt
@@ -2,12 +2,13 @@
  {
   "creation": "2013-05-21 16:16:39", 
   "docstatus": 0, 
-  "modified": "2013-09-12 18:34:54", 
+  "modified": "2013-11-05 23:09:58", 
   "modified_by": "Administrator", 
   "owner": "Administrator"
  }, 
  {
   "allow_attach": 1, 
+  "allow_import": 1, 
   "autoname": "naming_series:", 
   "doctype": "DocType", 
   "document_type": "Transaction", 
@@ -48,11 +49,10 @@
   "options": "icon-user"
  }, 
  {
-  "description": "To manage multiple series please go to Setup > Manage Series", 
   "doctype": "DocField", 
   "fieldname": "naming_series", 
   "fieldtype": "Select", 
-  "label": "Document Numbering Series", 
+  "label": "Series", 
   "no_copy": 1, 
   "oldfieldname": "naming_series", 
   "oldfieldtype": "Select", 
@@ -126,13 +126,11 @@
   "width": "50%"
  }, 
  {
-  "description": "The date at which current entry is made in system.", 
   "doctype": "DocField", 
   "fieldname": "transaction_date", 
   "fieldtype": "Date", 
   "in_filter": 1, 
   "label": "Purchase Order Date", 
-  "no_copy": 1, 
   "oldfieldname": "transaction_date", 
   "oldfieldtype": "Date", 
   "reqd": 1, 
@@ -179,7 +177,6 @@
   "fieldtype": "Column Break"
  }, 
  {
-  "description": "Supplier's currency", 
   "doctype": "DocField", 
   "fieldname": "currency", 
   "fieldtype": "Link", 
@@ -210,7 +207,6 @@
   "fieldtype": "Column Break"
  }, 
  {
-  "description": "Consider this Price List for fetching rate. (only which have \"For Buying\" as checked)", 
   "doctype": "DocField", 
   "fieldname": "buying_price_list", 
   "fieldtype": "Link", 
@@ -219,7 +215,6 @@
   "print_hide": 1
  }, 
  {
-  "depends_on": "buying_price_list", 
   "doctype": "DocField", 
   "fieldname": "price_list_currency", 
   "fieldtype": "Link", 
@@ -229,7 +224,6 @@
   "read_only": 1
  }, 
  {
-  "depends_on": "buying_price_list", 
   "doctype": "DocField", 
   "fieldname": "plc_conversion_rate", 
   "fieldtype": "Float", 
@@ -312,7 +306,7 @@
   "doctype": "DocField", 
   "fieldname": "purchase_other_charges", 
   "fieldtype": "Link", 
-  "label": "Purchase Taxes and Charges", 
+  "label": "Tax Master", 
   "no_copy": 0, 
   "oldfieldname": "purchase_other_charges", 
   "oldfieldtype": "Link", 
@@ -485,7 +479,7 @@
   "doctype": "DocField", 
   "fieldname": "tc_name", 
   "fieldtype": "Link", 
-  "label": "Select Terms and Conditions", 
+  "label": "Terms", 
   "oldfieldname": "tc_name", 
   "oldfieldtype": "Link", 
   "options": "Terms and Conditions", 
@@ -495,7 +489,7 @@
   "doctype": "DocField", 
   "fieldname": "terms", 
   "fieldtype": "Text Editor", 
-  "label": "Terms and Conditions1", 
+  "label": "Terms and Conditions", 
   "oldfieldname": "terms", 
   "oldfieldtype": "Text Editor"
  }, 
@@ -603,7 +597,7 @@
   "doctype": "DocField", 
   "fieldname": "select_print_heading", 
   "fieldtype": "Link", 
-  "label": "Select Print Heading", 
+  "label": "Print Heading", 
   "no_copy": 1, 
   "oldfieldname": "select_print_heading", 
   "oldfieldtype": "Link", 
@@ -613,14 +607,6 @@
  }, 
  {
   "doctype": "DocField", 
-  "fieldname": "instructions", 
-  "fieldtype": "Text", 
-  "label": "Instructions", 
-  "oldfieldname": "instructions", 
-  "oldfieldtype": "Text"
- }, 
- {
-  "doctype": "DocField", 
   "fieldname": "column_break5", 
   "fieldtype": "Column Break", 
   "oldfieldtype": "Column Break", 
@@ -657,26 +643,6 @@
   "read_only": 1
  }, 
  {
-  "doctype": "DocField", 
-  "fieldname": "payment_terms", 
-  "fieldtype": "Text", 
-  "label": "Payment Terms", 
-  "no_copy": 1, 
-  "oldfieldname": "payment_terms", 
-  "oldfieldtype": "Text", 
-  "print_hide": 0
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "remarks", 
-  "fieldtype": "Text", 
-  "label": "Remarks", 
-  "no_copy": 1, 
-  "oldfieldname": "remarks", 
-  "oldfieldtype": "Text", 
-  "print_hide": 1
- }, 
- {
   "description": "Required raw materials issued to the supplier for producing a sub - contracted item.", 
   "doctype": "DocField", 
   "fieldname": "raw_material_details", 
diff --git a/buying/doctype/purchase_order/test_purchase_order.py b/buying/doctype/purchase_order/test_purchase_order.py
index bd5f410..f6c435c 100644
--- a/buying/doctype/purchase_order/test_purchase_order.py
+++ b/buying/doctype/purchase_order/test_purchase_order.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 # License: GNU General Public License v3. See license.txt
 
 
diff --git a/buying/doctype/purchase_order_item/purchase_order_item.py b/buying/doctype/purchase_order_item/purchase_order_item.py
index 26d0f76..cb6190f 100644
--- a/buying/doctype/purchase_order_item/purchase_order_item.py
+++ b/buying/doctype/purchase_order_item/purchase_order_item.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 # License: GNU General Public License v3. See license.txt
 
 from __future__ import unicode_literals
diff --git a/buying/doctype/purchase_order_item/purchase_order_item.txt b/buying/doctype/purchase_order_item/purchase_order_item.txt
index 36b81d2..4145a7f 100755
--- a/buying/doctype/purchase_order_item/purchase_order_item.txt
+++ b/buying/doctype/purchase_order_item/purchase_order_item.txt
@@ -2,7 +2,7 @@
  {
   "creation": "2013-05-24 19:29:06", 
   "docstatus": 0, 
-  "modified": "2013-08-07 14:44:12", 
+  "modified": "2013-11-02 19:41:27", 
   "modified_by": "Administrator", 
   "owner": "Administrator"
  }, 
@@ -308,21 +308,6 @@
  }, 
  {
   "doctype": "DocField", 
-  "fieldname": "prevdoc_date", 
-  "fieldtype": "Date", 
-  "hidden": 1, 
-  "in_filter": 1, 
-  "in_list_view": 0, 
-  "label": "Material Request Date", 
-  "no_copy": 1, 
-  "oldfieldname": "prevdoc_date", 
-  "oldfieldtype": "Date", 
-  "print_hide": 1, 
-  "read_only": 1, 
-  "search_index": 0
- }, 
- {
-  "doctype": "DocField", 
   "fieldname": "prevdoc_detail_docname", 
   "fieldtype": "Data", 
   "hidden": 1, 
@@ -374,6 +359,7 @@
   "read_only": 1
  }, 
  {
+  "description": "<a href=\"#Sales Browser/Item Group\">Add / Edit</a>", 
   "doctype": "DocField", 
   "fieldname": "item_group", 
   "fieldtype": "Link", 
diff --git a/buying/doctype/purchase_order_item_supplied/purchase_order_item_supplied.py b/buying/doctype/purchase_order_item_supplied/purchase_order_item_supplied.py
index 26d0f76..cb6190f 100644
--- a/buying/doctype/purchase_order_item_supplied/purchase_order_item_supplied.py
+++ b/buying/doctype/purchase_order_item_supplied/purchase_order_item_supplied.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 # License: GNU General Public License v3. See license.txt
 
 from __future__ import unicode_literals
diff --git a/buying/doctype/purchase_receipt_item_supplied/purchase_receipt_item_supplied.py b/buying/doctype/purchase_receipt_item_supplied/purchase_receipt_item_supplied.py
index 26d0f76..cb6190f 100644
--- a/buying/doctype/purchase_receipt_item_supplied/purchase_receipt_item_supplied.py
+++ b/buying/doctype/purchase_receipt_item_supplied/purchase_receipt_item_supplied.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 # License: GNU General Public License v3. See license.txt
 
 from __future__ import unicode_literals
diff --git a/buying/doctype/quality_inspection/quality_inspection.js b/buying/doctype/quality_inspection/quality_inspection.js
index f3517b4..84dd3cc 100644
--- a/buying/doctype/quality_inspection/quality_inspection.js
+++ b/buying/doctype/quality_inspection/quality_inspection.js
@@ -1,4 +1,4 @@
-// Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+// Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 // License: GNU General Public License v3. See license.txt
 
 cur_frm.cscript.inspection_type = function(doc, cdt, cdn) {
diff --git a/buying/doctype/quality_inspection/quality_inspection.py b/buying/doctype/quality_inspection/quality_inspection.py
index 3380bd6..f837d97 100644
--- a/buying/doctype/quality_inspection/quality_inspection.py
+++ b/buying/doctype/quality_inspection/quality_inspection.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 # License: GNU General Public License v3. See license.txt
 
 from __future__ import unicode_literals
diff --git a/buying/doctype/quality_inspection/quality_inspection.txt b/buying/doctype/quality_inspection/quality_inspection.txt
index 0a92104..d4a2d8f 100644
--- a/buying/doctype/quality_inspection/quality_inspection.txt
+++ b/buying/doctype/quality_inspection/quality_inspection.txt
@@ -2,7 +2,7 @@
  {
   "creation": "2013-04-30 13:13:03", 
   "docstatus": 0, 
-  "modified": "2013-08-08 14:22:07", 
+  "modified": "2013-11-02 14:05:38", 
   "modified_by": "Administrator", 
   "owner": "Administrator"
  }, 
@@ -62,7 +62,7 @@
   "doctype": "DocField", 
   "fieldname": "naming_series", 
   "fieldtype": "Select", 
-  "label": "Document Numbering Series", 
+  "label": "Series", 
   "no_copy": 1, 
   "options": "\nQAI/11-12/", 
   "reqd": 1
diff --git a/buying/doctype/quality_inspection_reading/quality_inspection_reading.py b/buying/doctype/quality_inspection_reading/quality_inspection_reading.py
index 26d0f76..cb6190f 100644
--- a/buying/doctype/quality_inspection_reading/quality_inspection_reading.py
+++ b/buying/doctype/quality_inspection_reading/quality_inspection_reading.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 # License: GNU General Public License v3. See license.txt
 
 from __future__ import unicode_literals
diff --git a/buying/doctype/supplier/supplier.js b/buying/doctype/supplier/supplier.js
index 58045f5..0618616 100644
--- a/buying/doctype/supplier/supplier.js
+++ b/buying/doctype/supplier/supplier.js
@@ -1,14 +1,11 @@
-// Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+// Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 // License: GNU General Public License v3. See license.txt
 
 wn.require('app/setup/doctype/contact_control/contact_control.js');
 
 cur_frm.cscript.refresh = function(doc,dt,dn) {
 	cur_frm.cscript.make_dashboard(doc);
-	if(sys_defaults.supp_master_name == 'Supplier Name')
-		hide_field('naming_series');
-	else
-		unhide_field('naming_series'); 
+	erpnext.hide_naming_series();
     
 	if(doc.__islocal){
     	hide_field(['address_html','contact_html']); 
@@ -70,7 +67,7 @@
 				return "select name, address_type, address_line1, address_line2, city, state, country, pincode, fax, email_id, phone, is_primary_address, is_shipping_address from tabAddress where supplier='"+cur_frm.docname+"' and docstatus != 2 order by is_primary_address desc"
 			},
 			as_dict: 1,
-			no_results_message: 'No addresses created',
+			no_results_message: wn._('No addresses created'),
 			render_row: cur_frm.cscript.render_address_row,
 		});
 		// note: render_address_row is defined in contact_control.js
@@ -88,10 +85,16 @@
 				return "select name, first_name, last_name, email_id, phone, mobile_no, department, designation, is_primary_contact from tabContact where supplier='"+cur_frm.docname+"' and docstatus != 2 order by is_primary_contact desc"
 			},
 			as_dict: 1,
-			no_results_message: 'No contacts created',
+			no_results_message: wn._('No contacts created'),
 			render_row: cur_frm.cscript.render_contact_row,
 		});
 		// note: render_contact_row is defined in contact_control.js
 	}
 	cur_frm.contact_list.run();
+}
+
+cur_frm.fields_dict['default_price_list'].get_query = function(doc,cdt,cdn) {
+	return{
+		filters:{'buying_or_selling': "Buying"}
+	}
 }
\ No newline at end of file
diff --git a/buying/doctype/supplier/supplier.py b/buying/doctype/supplier/supplier.py
index afad61a..f60d4dd 100644
--- a/buying/doctype/supplier/supplier.py
+++ b/buying/doctype/supplier/supplier.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 # License: GNU General Public License v3. See license.txt
 
 from __future__ import unicode_literals
@@ -9,7 +9,6 @@
 from webnotes import msgprint, _
 from webnotes.model.doc import make_autoname
 
-sql = webnotes.conn.sql
 
 from utilities.transaction_base import TransactionBase
 
@@ -29,7 +28,7 @@
 			self.doc.name = make_autoname(self.doc.naming_series + '.#####')
 
 	def update_credit_days_limit(self):
-		sql("""update tabAccount set credit_days = %s where name = %s""", 
+		webnotes.conn.sql("""update tabAccount set credit_days = %s where name = %s""", 
 			(cint(self.doc.credit_days), self.doc.name + " - " + self.get_company_abbr()))
 
 	def on_update(self):
@@ -43,7 +42,7 @@
 		self.update_credit_days_limit()
 	
 	def get_payables_group(self):
-		g = sql("select payables_group from tabCompany where name=%s", self.doc.company)
+		g = webnotes.conn.sql("select payables_group from tabCompany where name=%s", self.doc.company)
 		g = g and g[0][0] or ''
 		if not g:
 			msgprint("Update Company master, assign a default group for Payables")
@@ -65,14 +64,14 @@
 		msgprint(_("Created Group ") + ac)
 	
 	def get_company_abbr(self):
-		return sql("select abbr from tabCompany where name=%s", self.doc.company)[0][0]
+		return webnotes.conn.sql("select abbr from tabCompany where name=%s", self.doc.company)[0][0]
 	
 	def get_parent_account(self, abbr):
 		if (not self.doc.supplier_type):
 			msgprint("Supplier Type is mandatory")
 			raise Exception
 		
-		if not sql("select name from tabAccount where name=%s and debit_or_credit = 'Credit' and ifnull(is_pl_account, 'No') = 'No'", (self.doc.supplier_type + " - " + abbr)):
+		if not webnotes.conn.sql("select name from tabAccount where name=%s and debit_or_credit = 'Credit' and ifnull(is_pl_account, 'No') = 'No'", (self.doc.supplier_type + " - " + abbr)):
 
 			# if not group created , create it
 			self.add_account(self.doc.supplier_type, self.get_payables_group(), abbr)
@@ -90,7 +89,7 @@
 			abbr = self.get_company_abbr() 
 			parent_account = self.get_parent_account(abbr)
 						
-			if not sql("select name from tabAccount where name=%s", (self.doc.name + " - " + abbr)):
+			if not webnotes.conn.sql("select name from tabAccount where name=%s", (self.doc.name + " - " + abbr)):
 				ac_bean = webnotes.bean({
 					"doctype": "Account",
 					'account_name': self.doc.name,
@@ -121,15 +120,15 @@
 	
 	def get_contacts(self,nm):
 		if nm:
-			contact_details =webnotes.conn.convert_to_lists(sql("select name, CONCAT(IFNULL(first_name,''),' ',IFNULL(last_name,'')),contact_no,email_id from `tabContact` where supplier = '%s'"%nm))
+			contact_details =webnotes.conn.convert_to_lists(webnotes.conn.sql("select name, CONCAT(IFNULL(first_name,''),' ',IFNULL(last_name,'')),contact_no,email_id from `tabContact` where supplier = '%s'"%nm))
 	 
 			return contact_details
 		else:
 			return ''
 			
 	def delete_supplier_address(self):
-		for rec in sql("select * from `tabAddress` where supplier=%s", (self.doc.name,), as_dict=1):
-			sql("delete from `tabAddress` where name=%s",(rec['name']))
+		for rec in webnotes.conn.sql("select * from `tabAddress` where supplier=%s", (self.doc.name,), as_dict=1):
+			webnotes.conn.sql("delete from `tabAddress` where name=%s",(rec['name']))
 	
 	def delete_supplier_contact(self):
 		for contact in webnotes.conn.sql_list("""select name from `tabContact` 
@@ -138,7 +137,7 @@
 	
 	def delete_supplier_account(self):
 		"""delete supplier's ledger if exist and check balance before deletion"""
-		acc = sql("select name from `tabAccount` where master_type = 'Supplier' \
+		acc = webnotes.conn.sql("select name from `tabAccount` where master_type = 'Supplier' \
 			and master_name = %s and docstatus < 2", self.doc.name)
 		if acc:
 			from webnotes.model import delete_doc
diff --git a/buying/doctype/supplier/supplier.txt b/buying/doctype/supplier/supplier.txt
index 56336d4..5c722f1 100644
--- a/buying/doctype/supplier/supplier.txt
+++ b/buying/doctype/supplier/supplier.txt
@@ -2,7 +2,7 @@
  {
   "creation": "2013-01-10 16:34:11", 
   "docstatus": 0, 
-  "modified": "2013-09-10 10:53:50", 
+  "modified": "2013-11-19 11:31:28", 
   "modified_by": "Administrator", 
   "owner": "Administrator"
  }, 
@@ -42,7 +42,6 @@
   "name": "Supplier"
  }, 
  {
-  "description": "Note: You Can Manage Multiple Address or Contacts via Addresses & Contacts", 
   "doctype": "DocField", 
   "fieldname": "basic_info", 
   "fieldtype": "Section Break", 
@@ -52,6 +51,16 @@
  }, 
  {
   "doctype": "DocField", 
+  "fieldname": "naming_series", 
+  "fieldtype": "Select", 
+  "label": "Series", 
+  "no_copy": 1, 
+  "oldfieldname": "naming_series", 
+  "oldfieldtype": "Select", 
+  "options": "\nSUPP\nSUPP/10-11/"
+ }, 
+ {
+  "doctype": "DocField", 
   "fieldname": "supplier_name", 
   "fieldtype": "Data", 
   "in_list_view": 1, 
@@ -63,6 +72,12 @@
  }, 
  {
   "doctype": "DocField", 
+  "fieldname": "column_break0", 
+  "fieldtype": "Column Break", 
+  "width": "50%"
+ }, 
+ {
+  "doctype": "DocField", 
   "fieldname": "supplier_type", 
   "fieldtype": "Link", 
   "in_list_view": 1, 
@@ -73,22 +88,7 @@
   "reqd": 1
  }, 
  {
-  "doctype": "DocField", 
-  "fieldname": "column_break0", 
-  "fieldtype": "Column Break", 
-  "width": "50%"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "naming_series", 
-  "fieldtype": "Select", 
-  "label": "Document Numbering Series", 
-  "no_copy": 1, 
-  "oldfieldname": "naming_series", 
-  "oldfieldtype": "Select", 
-  "options": "\nSUPP\nSUPP/10-11/"
- }, 
- {
+  "depends_on": "eval:!doc.__islocal", 
   "doctype": "DocField", 
   "fieldname": "address_contacts", 
   "fieldtype": "Section Break", 
@@ -97,14 +97,6 @@
   "options": "icon-map-marker"
  }, 
  {
-  "depends_on": "eval:doc.__islocal", 
-  "doctype": "DocField", 
-  "fieldname": "address_desc", 
-  "fieldtype": "HTML", 
-  "label": "Address Desc", 
-  "options": "<em>Addresses will appear only when you save the supplier</em>"
- }, 
- {
   "doctype": "DocField", 
   "fieldname": "address_html", 
   "fieldtype": "HTML", 
@@ -118,14 +110,6 @@
   "width": "50%"
  }, 
  {
-  "depends_on": "eval:doc.__islocal", 
-  "doctype": "DocField", 
-  "fieldname": "contact_desc", 
-  "fieldtype": "HTML", 
-  "label": "Contact Desc", 
-  "options": "<em>Contact Details will appear only when you save the supplier</em>"
- }, 
- {
   "doctype": "DocField", 
   "fieldname": "contact_html", 
   "fieldtype": "HTML", 
@@ -133,6 +117,7 @@
   "read_only": 1
  }, 
  {
+  "depends_on": "eval:!doc.__islocal", 
   "doctype": "DocField", 
   "fieldname": "communication_history", 
   "fieldtype": "Section Break", 
@@ -169,7 +154,13 @@
   "search_index": 0
  }, 
  {
-  "description": "This currency will get fetched in Purchase transactions of this supplier", 
+  "doctype": "DocField", 
+  "fieldname": "default_price_list", 
+  "fieldtype": "Link", 
+  "label": "Price List", 
+  "options": "Price List"
+ }, 
+ {
   "doctype": "DocField", 
   "fieldname": "default_currency", 
   "fieldtype": "Link", 
@@ -178,21 +169,6 @@
   "options": "Currency"
  }, 
  {
-  "description": "Statutory info and other general information about your Supplier", 
-  "doctype": "DocField", 
-  "fieldname": "supplier_details", 
-  "fieldtype": "Text", 
-  "label": "Supplier Details", 
-  "oldfieldname": "supplier_details", 
-  "oldfieldtype": "Code"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "column_break2", 
-  "fieldtype": "Column Break", 
-  "width": "50%"
- }, 
- {
   "doctype": "DocField", 
   "fieldname": "credit_days", 
   "fieldtype": "Int", 
@@ -200,6 +176,12 @@
  }, 
  {
   "doctype": "DocField", 
+  "fieldname": "column_break2", 
+  "fieldtype": "Column Break", 
+  "width": "50%"
+ }, 
+ {
+  "doctype": "DocField", 
   "fieldname": "website", 
   "fieldtype": "Data", 
   "label": "Website", 
@@ -207,6 +189,15 @@
   "oldfieldtype": "Data"
  }, 
  {
+  "description": "Statutory info and other general information about your Supplier", 
+  "doctype": "DocField", 
+  "fieldname": "supplier_details", 
+  "fieldtype": "Text", 
+  "label": "Supplier Details", 
+  "oldfieldname": "supplier_details", 
+  "oldfieldtype": "Code"
+ }, 
+ {
   "doctype": "DocField", 
   "fieldname": "communications", 
   "fieldtype": "Table", 
diff --git a/buying/doctype/supplier/test_supplier.py b/buying/doctype/supplier/test_supplier.py
index 8f8e144..d5bd4cb 100644
--- a/buying/doctype/supplier/test_supplier.py
+++ b/buying/doctype/supplier/test_supplier.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 # License: GNU General Public License v3. See license.txt
 
 test_records = [
diff --git a/buying/doctype/supplier_quotation/supplier_quotation.js b/buying/doctype/supplier_quotation/supplier_quotation.js
index 3fba931..92bf7a1 100644
--- a/buying/doctype/supplier_quotation/supplier_quotation.js
+++ b/buying/doctype/supplier_quotation/supplier_quotation.js
@@ -1,4 +1,4 @@
-// Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+// Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 // License: GNU General Public License v3. See license.txt
 
 // define defaults for purchase common
@@ -16,7 +16,7 @@
 		this._super();
 
 		if (this.frm.doc.docstatus === 1) {
-			cur_frm.add_custom_button("Make Purchase Order", this.make_purchase_order);
+			cur_frm.add_custom_button(wn._("Make Purchase Order"), this.make_purchase_order);
 		} 
 		else if (this.frm.doc.docstatus===0) {
 			cur_frm.add_custom_button(wn._('From Material Request'), 
diff --git a/buying/doctype/supplier_quotation/supplier_quotation.py b/buying/doctype/supplier_quotation/supplier_quotation.py
index c3d2f78..dc564b9 100644
--- a/buying/doctype/supplier_quotation/supplier_quotation.py
+++ b/buying/doctype/supplier_quotation/supplier_quotation.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 # License: GNU General Public License v3. See license.txt
 
 from __future__ import unicode_literals
@@ -26,9 +26,6 @@
 		self.validate_uom_is_integer("uom", "qty")
 
 	def on_submit(self):
-		purchase_controller = webnotes.get_obj("Purchase Common")
-		purchase_controller.is_item_table_empty(self)
-		
 		webnotes.conn.set(self.doc, "status", "Submitted")
 
 	def on_cancel(self):
@@ -54,7 +51,6 @@
 	def validate_common(self):
 		pc = get_obj('Purchase Common')
 		pc.validate_for_items(self)
-		pc.get_prevdoc_date(self)
 
 @webnotes.whitelist()
 def make_purchase_order(source_name, target_doclist=None):
diff --git a/buying/doctype/supplier_quotation/supplier_quotation.txt b/buying/doctype/supplier_quotation/supplier_quotation.txt
index 36747d3..fcef822 100644
--- a/buying/doctype/supplier_quotation/supplier_quotation.txt
+++ b/buying/doctype/supplier_quotation/supplier_quotation.txt
@@ -2,12 +2,13 @@
  {
   "creation": "2013-05-21 16:16:45", 
   "docstatus": 0, 
-  "modified": "2013-08-09 14:45:58", 
+  "modified": "2013-11-03 14:14:12", 
   "modified_by": "Administrator", 
   "owner": "Administrator"
  }, 
  {
   "allow_attach": 1, 
+  "allow_import": 1, 
   "autoname": "naming_series:", 
   "doctype": "DocType", 
   "document_type": "Transaction", 
@@ -48,11 +49,10 @@
   "options": "icon-user"
  }, 
  {
-  "description": "To manage multiple series please go to Setup > Manage Series", 
   "doctype": "DocField", 
   "fieldname": "naming_series", 
   "fieldtype": "Select", 
-  "label": "Document Numbering Series", 
+  "label": "Series", 
   "no_copy": 1, 
   "oldfieldname": "naming_series", 
   "oldfieldtype": "Select", 
@@ -126,7 +126,6 @@
   "width": "50%"
  }, 
  {
-  "description": "The date at which current entry is made in system.", 
   "doctype": "DocField", 
   "fieldname": "transaction_date", 
   "fieldtype": "Date", 
@@ -173,7 +172,6 @@
   "options": "icon-tag"
  }, 
  {
-  "description": "Supplier's currency", 
   "doctype": "DocField", 
   "fieldname": "currency", 
   "fieldtype": "Link", 
@@ -206,7 +204,6 @@
   "width": "50%"
  }, 
  {
-  "description": "Consider this Price List for fetching rate. (only which have \"For Buying\" as checked)", 
   "doctype": "DocField", 
   "fieldname": "buying_price_list", 
   "fieldtype": "Link", 
@@ -483,7 +480,7 @@
   "doctype": "DocField", 
   "fieldname": "tc_name", 
   "fieldtype": "Link", 
-  "label": "Select Terms and Conditions", 
+  "label": "Terms", 
   "oldfieldname": "tc_name", 
   "oldfieldtype": "Link", 
   "options": "Terms and Conditions", 
@@ -586,7 +583,7 @@
   "doctype": "DocField", 
   "fieldname": "select_print_heading", 
   "fieldtype": "Link", 
-  "label": "Select Print Heading", 
+  "label": "Print Heading", 
   "no_copy": 1, 
   "oldfieldname": "select_print_heading", 
   "oldfieldtype": "Link", 
diff --git a/buying/doctype/supplier_quotation/test_supplier_quotation.py b/buying/doctype/supplier_quotation/test_supplier_quotation.py
index d6468d5..82ad42a 100644
--- a/buying/doctype/supplier_quotation/test_supplier_quotation.py
+++ b/buying/doctype/supplier_quotation/test_supplier_quotation.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 # License: GNU General Public License v3. See license.txt
 
 
diff --git a/buying/doctype/supplier_quotation_item/supplier_quotation_item.py b/buying/doctype/supplier_quotation_item/supplier_quotation_item.py
index 26d0f76..cb6190f 100644
--- a/buying/doctype/supplier_quotation_item/supplier_quotation_item.py
+++ b/buying/doctype/supplier_quotation_item/supplier_quotation_item.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 # License: GNU General Public License v3. See license.txt
 
 from __future__ import unicode_literals
diff --git a/buying/doctype/supplier_quotation_item/supplier_quotation_item.txt b/buying/doctype/supplier_quotation_item/supplier_quotation_item.txt
index 1d16291..f09f5a8 100644
--- a/buying/doctype/supplier_quotation_item/supplier_quotation_item.txt
+++ b/buying/doctype/supplier_quotation_item/supplier_quotation_item.txt
@@ -2,7 +2,7 @@
  {
   "creation": "2013-05-22 12:43:10", 
   "docstatus": 0, 
-  "modified": "2013-08-07 14:44:18", 
+  "modified": "2013-11-02 19:41:29", 
   "modified_by": "Administrator", 
   "owner": "Administrator"
  }, 
@@ -261,21 +261,6 @@
  }, 
  {
   "doctype": "DocField", 
-  "fieldname": "prevdoc_date", 
-  "fieldtype": "Date", 
-  "hidden": 1, 
-  "in_filter": 1, 
-  "in_list_view": 0, 
-  "label": "Material Request Date", 
-  "no_copy": 1, 
-  "oldfieldname": "prevdoc_date", 
-  "oldfieldtype": "Date", 
-  "print_hide": 1, 
-  "read_only": 1, 
-  "search_index": 0
- }, 
- {
-  "doctype": "DocField", 
   "fieldname": "prevdoc_detail_docname", 
   "fieldtype": "Data", 
   "hidden": 1, 
@@ -303,6 +288,7 @@
   "read_only": 1
  }, 
  {
+  "description": "<a href=\"#Sales Browser/Item Group\">Add / Edit</a>", 
   "doctype": "DocField", 
   "fieldname": "item_group", 
   "fieldtype": "Link", 
diff --git a/buying/page/buying_home/buying_home.js b/buying/page/buying_home/buying_home.js
index b6de994..5c5668e 100644
--- a/buying/page/buying_home/buying_home.js
+++ b/buying/page/buying_home/buying_home.js
@@ -1,4 +1,4 @@
-// Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+// Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 // License: GNU General Public License v3. See license.txt"
 
 wn.module_page["Buying"] = [
@@ -58,7 +58,7 @@
 				"label": wn._("Buying Settings"),
 				"route": "Form/Buying Settings",
 				"doctype":"Buying Settings",
-				"description": "Settings for Buying Module"
+				"description": wn._("Settings for Buying Module")
 			},
 			{
 				"label": wn._("Purchase Taxes and Charges Master"),
diff --git a/buying/page/purchase_analytics/purchase_analytics.js b/buying/page/purchase_analytics/purchase_analytics.js
index c163052..0df62c8 100644
--- a/buying/page/purchase_analytics/purchase_analytics.js
+++ b/buying/page/purchase_analytics/purchase_analytics.js
@@ -1,24 +1,24 @@
-// Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+// Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 // License: GNU General Public License v3. See license.txt
 
 wn.pages['purchase-analytics'].onload = function(wrapper) { 
 	wn.ui.make_app_page({
 		parent: wrapper,
-		title: 'Purchase Analytics',
+		title: wn._('Purchase Analytics'),
 		single_column: true
 	});					
 	
 	new erpnext.PurchaseAnalytics(wrapper);
 	
-	wrapper.appframe.add_home_breadcrumb()
+
 	wrapper.appframe.add_module_icon("Buying")
-	wrapper.appframe.add_breadcrumb("icon-bar-chart")
+	
 }
 
 erpnext.PurchaseAnalytics = wn.views.TreeGridReport.extend({
 	init: function(wrapper) {
 		this._super({
-			title: "Purchase Analytics",
+			title: wn._("Purchase Analytics"),
 			page: wrapper,
 			parent: $(wrapper).find('.layout-main'),
 			appframe: wrapper.appframe,
@@ -31,7 +31,7 @@
 		
 		this.tree_grids = {
 			"Supplier Type": {
-				label: "Supplier Type / Supplier",
+				label: wn._("Supplier Type / Supplier"),
 				show: true, 
 				item_key: "supplier",
 				parent_field: "parent_supplier_type", 
@@ -44,7 +44,7 @@
 				}
 			},
 			"Supplier": {
-				label: "Supplier",
+				label: wn._("Supplier"),
 				show: false, 
 				item_key: "supplier",
 				formatter: function(item) {
@@ -74,7 +74,7 @@
 		this.tree_grid = this.tree_grids[this.tree_type];
 
 		var std_columns = [
-			{id: "check", name: "Plot", field: "check", width: 30,
+			{id: "check", name: wn._("Plot"), field: "check", width: 30,
 				formatter: this.check_formatter},
 			{id: "name", name: this.tree_grid.label, field: "name", width: 300,
 				formatter: this.tree_formatter},
@@ -86,23 +86,23 @@
 		this.columns = std_columns.concat(this.columns);
 	},
 	filters: [
-		{fieldtype:"Select", label: "Tree Type", options:["Supplier Type", "Supplier", 
+		{fieldtype:"Select", label: wn._("Tree Type"), options:["Supplier Type", "Supplier", 
 			"Item Group", "Item"],
 			filter: function(val, item, opts, me) {
 				return me.apply_zero_filter(val, item, opts, me);
 			}},
-		{fieldtype:"Select", label: "Based On", options:["Purchase Invoice", 
+		{fieldtype:"Select", label: wn._("Based On"), options:["Purchase Invoice", 
 			"Purchase Order", "Purchase Receipt"]},
-		{fieldtype:"Select", label: "Value or Qty", options:["Value", "Quantity"]},
-		{fieldtype:"Select", label: "Company", link:"Company", 
+		{fieldtype:"Select", label: wn._("Value or Qty"), options:["Value", "Quantity"]},
+		{fieldtype:"Select", label: wn._("Company"), link:"Company", 
 			default_value: "Select Company..."},
-		{fieldtype:"Date", label: "From Date"},
-		{fieldtype:"Label", label: "To"},
-		{fieldtype:"Date", label: "To Date"},
-		{fieldtype:"Select", label: "Range", 
+		{fieldtype:"Date", label: wn._("From Date")},
+		{fieldtype:"Label", label: wn._("To")},
+		{fieldtype:"Date", label: wn._("To Date")},
+		{fieldtype:"Select", label: wn._("Range"), 
 			options:["Daily", "Weekly", "Monthly", "Quarterly", "Yearly"]},
-		{fieldtype:"Button", label: "Refresh", icon:"icon-refresh icon-white", cssClass:"btn-info"},
-		{fieldtype:"Button", label: "Reset Filters"}
+		{fieldtype:"Button", label: wn._("Refresh"), icon:"icon-refresh icon-white"},
+		{fieldtype:"Button", label: wn._("Reset Filters")}
 	],
 	setup_filters: function() {
 		var me = this;
@@ -130,18 +130,18 @@
 			})
 			
 			wn.report_dump.data["Supplier Type"] = [{
-				name: "All Supplier Types", 
+				name: wn._("All Supplier Types"), 
 				id: "All Supplier Types",
 			}].concat(wn.report_dump.data["Supplier Type"]);
 			
 			wn.report_dump.data["Supplier"].push({
-				name: "Not Set", 
+				name: wn._("Not Set"), 
 				parent_supplier_type: "All Supplier Types",
 				id: "Not Set",
 			});
 
 			wn.report_dump.data["Item"].push({
-				name: "Not Set", 
+				name: wn._("Not Set"), 
 				parent_item_group: "All Item Groups",
 				id: "Not Set",
 			});
diff --git a/buying/report/purchase_order_trends/purchase_order_trends.js b/buying/report/purchase_order_trends/purchase_order_trends.js
index 41cb660..2c7ffc0 100644
--- a/buying/report/purchase_order_trends/purchase_order_trends.js
+++ b/buying/report/purchase_order_trends/purchase_order_trends.js
@@ -1,4 +1,4 @@
-// Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+// Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 // License: GNU General Public License v3. See license.txt
 
 wn.require("app/js/purchase_trends_filters.js");
diff --git a/buying/report/purchase_order_trends/purchase_order_trends.py b/buying/report/purchase_order_trends/purchase_order_trends.py
index 3c99e06..df8d7cf 100644
--- a/buying/report/purchase_order_trends/purchase_order_trends.py
+++ b/buying/report/purchase_order_trends/purchase_order_trends.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 # License: GNU General Public License v3. See license.txt
 
 from __future__ import unicode_literals
diff --git a/buying/utils.py b/buying/utils.py
index 85cb856..0d9c8fa 100644
--- a/buying/utils.py
+++ b/buying/utils.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 # License: GNU General Public License v3. See license.txt
 
 from __future__ import unicode_literals
diff --git a/controllers/accounts_controller.py b/controllers/accounts_controller.py
index 0c5ce2a..5388ee1 100644
--- a/controllers/accounts_controller.py
+++ b/controllers/accounts_controller.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 # License: GNU General Public License v3. See license.txt
 
 from __future__ import unicode_literals
@@ -423,12 +423,17 @@
 			self._abbr = webnotes.conn.get_value("Company", self.doc.company, "abbr")
 			
 		return self._abbr
-		
+
 	def check_credit_limit(self, account):
 		total_outstanding = webnotes.conn.sql("""
 			select sum(ifnull(debit, 0)) - sum(ifnull(credit, 0)) 
 			from `tabGL Entry` where account = %s""", account)
 		
-		total_outstanding = flt(total_outstanding[0][0]) if total_outstanding else 0
+		total_outstanding = total_outstanding[0][0] if total_outstanding else 0
 		if total_outstanding:
-			get_obj('Account', account).check_credit_limit(total_outstanding)
\ No newline at end of file
+			get_obj('Account', account).check_credit_limit(total_outstanding)
+
+
+@webnotes.whitelist()
+def get_tax_rate(account_head):
+	return webnotes.conn.get_value("Account", account_head, "tax_rate")
\ No newline at end of file
diff --git a/controllers/buying_controller.py b/controllers/buying_controller.py
index fd3428e..b52d51c 100644
--- a/controllers/buying_controller.py
+++ b/controllers/buying_controller.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 # License: GNU General Public License v3. See license.txt
 
 from __future__ import unicode_literals
@@ -21,6 +21,7 @@
 		if self.doc.supplier and not self.doc.supplier_name:
 			self.doc.supplier_name = webnotes.conn.get_value("Supplier", 
 				self.doc.supplier, "supplier_name")
+		self.is_item_table_empty()
 		self.validate_stock_or_nonstock_items()
 		self.validate_warehouse()
 		
@@ -278,3 +279,8 @@
 					(", ".join((["%s"]*len(item_codes))),), item_codes)]
 
 		return self._purchase_items
+
+
+	def is_item_table_empty(self):
+		if not len(self.doclist.get({"parentfield": self.fname})):
+			webnotes.throw(_("Item table can not be blank"))
\ No newline at end of file
diff --git a/controllers/js/contact_address_common.js b/controllers/js/contact_address_common.js
index 7589947..7c938d7 100644
--- a/controllers/js/contact_address_common.js
+++ b/controllers/js/contact_address_common.js
@@ -1,4 +1,4 @@
-// Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+// Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 // License: GNU General Public License v3. See license.txt
 
 cur_frm.cscript.onload = function(doc, cdt, cdn) {	
diff --git a/controllers/queries.py b/controllers/queries.py
index 7681e6f..9d64d16 100644
--- a/controllers/queries.py
+++ b/controllers/queries.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 # License: GNU General Public License v3. See license.txt
 
 from __future__ import unicode_literals
@@ -183,4 +183,36 @@
 				"fcond": get_filters_cond(doctype, filters, []),
 				"mcond": get_match_cond(doctype),
 				"start": "%(start)s", "page_len": "%(page_len)s", "txt": "%(txt)s"
-			}, { "start": start, "page_len": page_len, "txt": ("%%%s%%" % txt) })
\ No newline at end of file
+			}, { "start": start, "page_len": page_len, "txt": ("%%%s%%" % txt) })
+
+def get_batch_no(doctype, txt, searchfield, start, page_len, filters):
+	from controllers.queries import get_match_cond
+
+	if filters.has_key('warehouse'):
+		return webnotes.conn.sql("""select batch_no from `tabStock Ledger Entry` sle 
+				where item_code = '%(item_code)s' 
+					and warehouse = '%(warehouse)s' 
+					and batch_no like '%(txt)s' 
+					and exists(select * from `tabBatch` 
+							where name = sle.batch_no 
+								and (ifnull(expiry_date, '')='' or expiry_date >= '%(posting_date)s') 
+								and docstatus != 2) 
+					%(mcond)s
+				group by batch_no having sum(actual_qty) > 0 
+				order by batch_no desc 
+				limit %(start)s, %(page_len)s """ % {'item_code': filters['item_code'], 
+					'warehouse': filters['warehouse'], 'posting_date': filters['posting_date'], 
+					'txt': "%%%s%%" % txt, 'mcond':get_match_cond(doctype, searchfield), 
+					'start': start, 'page_len': page_len})
+	else:
+		return webnotes.conn.sql("""select name from tabBatch 
+				where docstatus != 2 
+					and item = '%(item_code)s' 
+					and (ifnull(expiry_date, '')='' or expiry_date >= '%(posting_date)s')
+					and name like '%(txt)s' 
+					%(mcond)s 
+				order by name desc 
+				limit %(start)s, %(page_len)s""" % {'item_code': filters['item_code'], 
+				'posting_date': filters['posting_date'], 'txt': "%%%s%%" % txt, 
+				'mcond':get_match_cond(doctype, searchfield),'start': start, 
+				'page_len': page_len})
diff --git a/controllers/selling_controller.py b/controllers/selling_controller.py
index 37674ee..fd4ca40 100644
--- a/controllers/selling_controller.py
+++ b/controllers/selling_controller.py
@@ -1,9 +1,9 @@
-# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 # License: GNU General Public License v3. See license.txt
 
 from __future__ import unicode_literals
 import webnotes
-from webnotes.utils import cint, flt, comma_or, _round, add_days, cstr
+from webnotes.utils import cint, flt, comma_or, _round, cstr
 from setup.utils import get_company_currency
 from selling.utils import get_item_details
 from webnotes import msgprint, _
@@ -15,6 +15,14 @@
 		# contact, address, item details and pos details (if applicable)
 		self.set_missing_values()
 		
+	def validate(self):
+		super(SellingController, self).validate()
+		self.validate_max_discount()
+		check_active_sales_items(self)
+	
+	def get_sender(self, comm):
+		return webnotes.conn.get_value('Sales Email Settings', None, 'email_id')
+	
 	def set_missing_values(self, for_validate=False):
 		super(SellingController, self).set_missing_values(for_validate)
 		
@@ -233,4 +241,121 @@
 			self.doc.order_type = "Sales"
 		elif self.doc.order_type not in valid_types:
 			msgprint(_(self.meta.get_label("order_type")) + " " + 
-				_("must be one of") + ": " + comma_or(valid_types), raise_exception=True)
\ No newline at end of file
+				_("must be one of") + ": " + comma_or(valid_types), raise_exception=True)
+				
+	def check_credit(self, grand_total):
+		customer_account = webnotes.conn.get_value("Account", {"company": self.doc.company, 
+			"master_name": self.doc.customer}, "name")
+		if customer_account:
+			total_outstanding = webnotes.conn.sql("""select 
+				sum(ifnull(debit, 0)) - sum(ifnull(credit, 0)) 
+				from `tabGL Entry` where account = %s""", customer_account)
+			total_outstanding = total_outstanding[0][0] if total_outstanding else 0
+			
+			outstanding_including_current = flt(total_outstanding) + flt(grand_total)
+			webnotes.bean('Account', customer_account).run_method("check_credit_limit", 
+				outstanding_including_current)
+				
+	def validate_max_discount(self):
+		for d in self.doclist.get({"parentfield": self.fname}):
+			discount = flt(webnotes.conn.get_value("Item", d.item_code, "max_discount"))
+			
+			if discount and flt(d.adj_rate) > discount:
+				webnotes.throw(_("You cannot give more than ") + cstr(discount) + "% " + 
+					_("discount on Item Code") + ": " + cstr(d.item_code))
+					
+	def get_item_list(self):
+		il = []
+		for d in self.doclist.get({"parentfield": self.fname}):
+			reserved_warehouse = ""
+			reserved_qty_for_main_item = 0
+			
+			if self.doc.doctype == "Sales Order":
+				if (webnotes.conn.get_value("Item", d.item_code, "is_stock_item") == 'Yes' or 
+					self.has_sales_bom(d.item_code)) and not d.reserved_warehouse:
+						webnotes.throw(_("Please enter Reserved Warehouse for item ") + 
+							d.item_code + _(" as it is stock Item or packing item"))
+				reserved_warehouse = d.reserved_warehouse
+				if flt(d.qty) > flt(d.delivered_qty):
+					reserved_qty_for_main_item = flt(d.qty) - flt(d.delivered_qty)
+				
+			if self.doc.doctype == "Delivery Note" and d.against_sales_order:
+				# if SO qty is 10 and there is tolerance of 20%, then it will allow DN of 12.
+				# But in this case reserved qty should only be reduced by 10 and not 12
+				
+				already_delivered_qty = self.get_already_delivered_qty(self.doc.name, 
+					d.against_sales_order, d.prevdoc_detail_docname)
+				so_qty, reserved_warehouse = self.get_so_qty_and_warehouse(d.prevdoc_detail_docname)
+				
+				if already_delivered_qty + d.qty > so_qty:
+					reserved_qty_for_main_item = -(so_qty - already_delivered_qty)
+				else:
+					reserved_qty_for_main_item = -flt(d.qty)
+
+			if self.has_sales_bom(d.item_code):
+				for p in self.doclist.get({"parentfield": "packing_details"}):
+					if p.parent_detail_docname == d.name and p.parent_item == d.item_code:
+						# the packing details table's qty is already multiplied with parent's qty
+						il.append(webnotes._dict({
+							'warehouse': p.warehouse,
+							'reserved_warehouse': reserved_warehouse,
+							'item_code': p.item_code,
+							'qty': flt(p.qty),
+							'reserved_qty': (flt(p.qty)/flt(d.qty)) * reserved_qty_for_main_item,
+							'uom': p.uom,
+							'batch_no': cstr(p.batch_no).strip(),
+							'serial_no': cstr(p.serial_no).strip(),
+							'name': d.name
+						}))
+			else:
+				il.append(webnotes._dict({
+					'warehouse': d.warehouse,
+					'reserved_warehouse': reserved_warehouse,
+					'item_code': d.item_code,
+					'qty': d.qty,
+					'reserved_qty': reserved_qty_for_main_item,
+					'uom': d.stock_uom,
+					'batch_no': cstr(d.batch_no).strip(),
+					'serial_no': cstr(d.serial_no).strip(),
+					'name': d.name
+				}))
+		return il
+		
+	def has_sales_bom(self, item_code):
+		return webnotes.conn.sql("""select name from `tabSales BOM` 
+			where new_item_code=%s and docstatus != 2""", item_code)
+			
+	def get_already_delivered_qty(self, dn, so, so_detail):
+		qty = webnotes.conn.sql("""select sum(qty) from `tabDelivery Note Item` 
+			where prevdoc_detail_docname = %s and docstatus = 1 
+			and against_sales_order = %s 
+			and parent != %s""", (so_detail, so, dn))
+		return qty and flt(qty[0][0]) or 0.0
+
+	def get_so_qty_and_warehouse(self, so_detail):
+		so_item = webnotes.conn.sql("""select qty, reserved_warehouse from `tabSales Order Item`
+			where name = %s and docstatus = 1""", so_detail, as_dict=1)
+		so_qty = so_item and flt(so_item[0]["qty"]) or 0.0
+		so_warehouse = so_item and so_item[0]["reserved_warehouse"] or ""
+		return so_qty, so_warehouse
+		
+	def check_stop_sales_order(self, ref_fieldname):
+		for d in self.doclist.get({"parentfield": self.fname}):
+			if d.fields.get(ref_fieldname):
+				status = webnotes.conn.get_value("Sales Order", d.fields[ref_fieldname], "status")
+				if status == "Stopped":
+					webnotes.throw(self.doc.doctype + 
+						_(" can not be created/modified against stopped Sales Order ") + 
+						d.fields[ref_fieldname])
+		
+def check_active_sales_items(obj):
+	for d in obj.doclist.get({"parentfield": obj.fname}):
+		if d.item_code:
+			item = webnotes.conn.sql("""select docstatus, is_sales_item, 
+				is_service_item, default_income_account from tabItem where name = %s""", 
+				d.item_code, as_dict=True)[0]
+			if item.is_sales_item == 'No' and item.is_service_item == 'No':
+				webnotes.throw(_("Item is neither Sales nor Service Item") + ": " + d.item_code)
+			if d.income_account and not item.default_income_account:
+				webnotes.conn.set_value("Item", d.item_code, "default_income_account", 
+					d.income_account)
diff --git a/controllers/status_updater.py b/controllers/status_updater.py
index 070f200..b274526 100644
--- a/controllers/status_updater.py
+++ b/controllers/status_updater.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 # License: GNU General Public License v3. See license.txt
 
 from __future__ import unicode_literals
@@ -8,6 +8,51 @@
 
 from webnotes.model.controller import DocListController
 
+status_map = {
+	"Contact": [
+		["Replied", "communication_sent"],
+		["Open", "communication_received"]
+	],
+	"Job Applicant": [
+		["Replied", "communication_sent"],
+		["Open", "communication_received"]
+	],
+	"Lead": [
+		["Replied", "communication_sent"],
+		["Converted", "has_customer"],
+		["Opportunity", "has_opportunity"],
+		["Open", "communication_received"],
+	],
+	"Opportunity": [
+		["Draft", None],
+		["Submitted", "eval:self.doc.docstatus==1"],
+		["Lost", "eval:self.doc.status=='Lost'"],
+		["Quotation", "has_quotation"],
+		["Replied", "communication_sent"],
+		["Cancelled", "eval:self.doc.docstatus==2"],
+		["Open", "communication_received"],
+	],
+	"Quotation": [
+		["Draft", None],
+		["Submitted", "eval:self.doc.docstatus==1"],
+		["Lost", "eval:self.doc.status=='Lost'"],
+		["Ordered", "has_sales_order"],
+		["Replied", "communication_sent"],
+		["Cancelled", "eval:self.doc.docstatus==2"],
+		["Open", "communication_received"],
+	],
+	"Sales Order": [
+		["Draft", None],
+		["Submitted", "eval:self.doc.docstatus==1"],
+		["Stopped", "eval:self.doc.status=='Stopped'"],
+		["Cancelled", "eval:self.doc.docstatus==2"],
+	],
+	"Support Ticket": [
+		["Replied", "communication_sent"],
+		["Open", "communication_received"]
+	],
+}
+
 class StatusUpdater(DocListController):
 	"""
 		Updates the status of the calling records
@@ -20,6 +65,45 @@
 		self.update_qty()
 		self.validate_qty()
 	
+	def set_status(self, update=False):
+		if self.doc.get("__islocal"):
+			return
+			
+		if self.doc.doctype in status_map:
+			sl = status_map[self.doc.doctype][:]
+			sl.reverse()
+			for s in sl:
+				if not s[1]:
+					self.doc.status = s[0]
+					break
+				elif s[1].startswith("eval:"):
+					if eval(s[1][5:]):
+						self.doc.status = s[0]
+						break
+				elif getattr(self, s[1])():
+					self.doc.status = s[0]
+					break
+		
+			if update:
+				webnotes.conn.set_value(self.doc.doctype, self.doc.name, "status", self.doc.status)
+	
+	def on_communication(self):
+		self.communication_set = True
+		self.set_status(update=True)
+		del self.communication_set
+	
+	def communication_received(self):
+		if getattr(self, "communication_set", False):
+			last_comm = self.doclist.get({"doctype":"Communication"})
+			if last_comm:
+				return last_comm[-1].sent_or_received == "Received"
+
+	def communication_sent(self):
+		if getattr(self, "communication_set", False):
+			last_comm = self.doclist.get({"doctype":"Communication"})
+			if last_comm:
+				return last_comm[-1].sent_or_received == "Sent"
+			
 	def validate_qty(self):
 		"""
 			Validates qty at row level
diff --git a/controllers/stock_controller.py b/controllers/stock_controller.py
index 229c035..8a4a402 100644
--- a/controllers/stock_controller.py
+++ b/controllers/stock_controller.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 # License: GNU General Public License v3. See license.txt
 
 from __future__ import unicode_literals
diff --git a/controllers/trends.py b/controllers/trends.py
index ffce993..7d96a4e 100644
--- a/controllers/trends.py
+++ b/controllers/trends.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 # License: GNU General Public License v3. See license.txt
 
 from __future__ import unicode_literals
diff --git a/docs/dev/docs.dev.install.md b/docs/dev/docs.dev.install.md
index 03fc6bd..f9df566 100644
--- a/docs/dev/docs.dev.install.md
+++ b/docs/dev/docs.dev.install.md
@@ -11,15 +11,34 @@
 
 ### ERPNext Installer (Beta)
 
-Install ERPNext in one command!
-
+1. Make sure that you have Python 2.7+
+```
+$ python -c "import platform; print platform.python_version()"
+2.7.3
+```
+or
+```
+$ which python2.7
+/usr/bin/python2.7
+```
+If your python version is less than 2.7, then follow,
+	* For CentOS, you can refer to http://toomuchdata.com/2012/06/25/how-to-install-python-2-7-3-on-centos-6-2/
+	* For Ubuntu, refer to http://askubuntu.com/questions/101591/how-do-i-install-python-2-7-2-on-ubuntu/101595#101595
+1. Make sure the 'passwd' command exists. Install passwd if necessary (e.g. on CentOS, run `yum install passwd`)
 1. Switch to root user using `sudo su`
-1. Create a folder where you want to install erpnext
-1. Go to the new folder
 1. `wget https://raw.github.com/webnotes/erpnext/master/install_erpnext.py`
-1. `python install_erpnext.py`
+1. `python2.7 install_erpnext.py --create_user`
+
+ This will create a user 'erpnext' and install erpnext in its home directory.
+To start a development server, login as erpnext with password erpnext (or `su erpnext` from your root shell)
+```
+cd /home/erpnext/erpnext
+./lib/wnf.py --serve
+```
 
 > If you are installing on your server for deployment, remember to change Administrator's password!
+> You can set the erpnext username and password by passing it to the install script,
+`python2.7 install_erpnext.py --create_user --username erpnext_username --password secretpassword`
 
 > If you get stuck, post your questions at [ERPNext Developer Forum](https://groups.google.com/forum/#!forum/erpnext-developer-forum)
 
@@ -37,5 +56,10 @@
 ### Upgrade / run latest patches
 
 1. Backup your database!
-1. Go to Setup > Update ERPNext
-1. Click on 'Update'
\ No newline at end of file
+```
+./lib/wnf.py --backup
+```
+1. Pull changes
+```
+./lib/wnf.py --update origin master
+```
diff --git a/docs/docs.user.stock.accounting_for_stock.md b/docs/docs.user.stock.accounting_for_stock.md
deleted file mode 100644
index bf91fe5..0000000
--- a/docs/docs.user.stock.accounting_for_stock.md
+++ /dev/null
@@ -1,42 +0,0 @@
----
-{
-	"_label": "Accounting of Inventory / Stock"
-}
----
-
-The value of available inventory is treated as an Asset in company's Chart of Accounts. Depending on the type of items, it can be treated as Fixed Asset or Current Asset. To prepare Balance Sheet, you should make the accounting entries for those assets. 
-There are generally two different methods of accounting for inventory:
-
-
-### **Auto / Perpetual Inventory**
-
-In this process, for each stock transactions, the system posts relevant accounting entries to sync stock balance and accounting balance. This is the default setting in ERPNext for new accounts.
-
-When you buy and receive items, those items are booked as the company’s assets (stock-in-hand / fixed-assets). When you sell and deliver those items, an expense (cost-of-goods-sold) equal to the buying cost of the items is booked. General Ledger entries are made after every stock transaction.  As a result, the value as per Stock Ledger always remains same with the relevant account balance. This improves accuracy of Balance Sheet and Profit and Loss statement.
-
-To check accounting entries for a particular stock transaction, please check [**examples**](docs.user.stock.perpetual_inventory.html)
-
-#### **Advantages**
-
-Perpetual Inventory system will make it easier for you to maintain accuracy of company's asset and expense values. Stock balances will always be synced with relevant account balances, so no more periodic manual entry has to be done to balance them.
-
-In case of new back-dated stock transactions or cancellation/amendment of an existing transaction, all the future Stock Ledger entries and GL Entries will be recalculated for all items of that transaction.
-The same is applicable if any cost is added to the submitted Purchase Receipt, later through the Landed Cost Wizard.
-
->Note: Perpetual Inventory totally depends upon the item valuation rate. Hence, you have to be more careful entering valuation rate while making any incoming stock transactions like Purchase Receipt, Material Receipt, or Manufacturing / Repack.
-
--
-
-### **Periodic Inventory**
-
-In this method, accounting entries are manually created periodically, to sync stock balance and relevant account balance. The system does not create accounting entries automatically for assets, at the time of material purchases or sales.
-
-In an accounting period, when you buy and receive items, an expense is booked in your accounting system. You sell and deliver some of these items.
-
-At the end of an accounting period, the total value of items to be sold, need to be booked as the company’s assets, often known as stock-in-hand. 
-
-The difference between the value of the items remaining to be sold and the previous period’s stock-in-hand value can be positive or negative. If positive, this value is removed from expenses (cost-of-goods-sold) and is added to assets (stock-in-hand / fixed-assets). If negative, a reverse entry is passed. 
-
-This complete process is called Periodic Inventory.
-
-If you are an existing user using Periodic Inventory and want to use Perpetual Inventory, you have to follow some steps to migrate. For details, check [**Migration From Periodic Inventory**](docs.user.stock.perpetual_inventory.html)
diff --git a/docs/docs.user.stock.perpetual_inventory.md b/docs/docs.user.stock.perpetual_inventory.md
deleted file mode 100644
index eb10326..0000000
--- a/docs/docs.user.stock.perpetual_inventory.md
+++ /dev/null
@@ -1,313 +0,0 @@
----
-{
-	"_label": "Perpetual Inventory"
-}
----
-
-In perpetual inventory, system creates accounting entries for each stock transactions, so that stock and account balance will always remain same. The account balance will be posted against their respective account heads for each Warehouse. On saving of a Warehouse, the system will automatically create an account head with the same name as warehouse. As account balance is maintained for each Warehouse, you should create Warehouses, based on the type of items (Current / Fixed Assets) it stores.
-
-At the time of items received in a particular warehouse, the balance of asset account (linked to that warehouse) will be increased. Similarly when you deliver some items from that warehouse, an expense will be booked and the asset account will be reduced, based on the valuation amount of those items.
-
-
-## **Activation**
-
-1. Setup the following default accounts for each Company 
-	- Stock Received But Not Billed
-	- Stock Adjustment Account
-	- Expenses Included In Valuation
-	- Cost Center
-	
-2. In perpetual inventory, the system will maintain seperate account balance for each warehouse under separate account head. To create that account head, enter "Create Account Under" in Warehouse master.
-
-3. Activate Perpetual Inventory
-> Setup > Accounts Settings > Make Accounting Entry For Every Stock Movement
-
-
--
-
-## **Example**
-
-Consider following Chart of Accounts and Warehouse setup for your company:
-
-#### Chart of Accounts
-
-- Assets (Dr)
-  - Current Assets
-    - Accounts Receivable
-      - Jane Doe
-    - Stock Assets
-      - Stores
-      - Finished Goods
-      - Work In Progress
-    - Tax Assets
-      - VAT
-  - Fixed Assets
-    - Fixed Asset Warehouse
-- Liabilities (Cr)
-  - Current Liabilities
-    - Accounts Payable
-      - East Wind Inc.
-    - Stock Liabilities
-      - Stock Received But Not Billed
-    - Tax Liabilities
-      - Service Tax
-- Income (Cr)
-  - Direct Income
-    - Sales Account
-- Expenses (Dr)
-  - Direct Expenses
-    - Stock Expenses
-      - Cost of Goods Sold
-      - Expenses Included In Valuation
-      - Stock Adjustment
-      - Shipping Charges
-      - Customs Duty
-  
-#### Warehouse - Account Configuration
-
-- Stores
-- Work In Progress
-- Finished Goods
-- Fixed Asset Warehouse
-
-### **Purchase Receipt**
-
-Suppose you have purchased *10 nos* of item "RM0001" at *$200* and *5 nos* of item "Desktop" at **$100** from supplier "East Wind Inc". Following are the details of Purchase Receipt:
-
-<b>Supplier:</b> East Wind Inc.
-
-<b>Items:</b>
-<table class="table table-bordered">
-	<thead>
-		<tr>
-			<th>Item</th><th>Warehouse</th><th>Qty</th>
-			<th>Rate</th><th>Amount</th><th>Valuation Amount</th>
-		</tr>
-	</thead>
-	<tbody>
-		<tr>
-			<td>RM0001</td><td>Stores</td><td>10</td><td>200</td><td>2000</td><td>2200</td>
-		</tr>
-		<tr>
-			<td>Desktop</td><td>Fixed Asset Warehouse</td>
-			<td>5</td><td>100</td><td>500</td><td>550</td>
-		</tr>
-	</tbody>
-</table>
-	
-**Taxes:**
-
-<table class="table table-bordered">
-	<thead>
-		<tr><th>Account</th><th>Amount</th><th>Category</th></tr>
-	</thead>
-	<tbody>
-		<tr><td>Shipping Charges</td><td>100</td><td>Total and Valuation</td></tr>
-		<tr><td>VAT</td><td>120</td><td>Total</td></tr>
-		<tr><td>Customs Duty</td><td>150</td><td>Valuation</td></tr>
-	</tbody>
-</table>
-
-**Stock Ledger**
-
-![pr_stock_ledger](img/accounting-for-stock-2.png)
-
-**General Ledger**
-
-![pr_general_ledger](img/accounting-for-stock-3.png)
-
-As stock balance increases through Purchase Receipt, "Store" and "Fixed Asset Warehouse" accounts are debited and a temporary account "Stock Receipt But Not Billed" account is credited, to maintain double entry accounting system.
-
-
---
-
-### **Purchase Invoice**
-
-On receiving Bill from supplier, for the above Purchase Receipt, you will make Purchase Invoice for the same. The general ledger entries are as follows:
-
-**General Ledger**
-
-![pi_general_ledger](img/accounting-for-stock-4.png)
-
-
-Here "Stock Received But Not Billed" account is debited and nullified the effect of Purchase Receipt. "Expenses Included In Valuation" account has been credited which ensures the valuation expense accounts are not booked (debited) twice (in Purchase Invoice and Delivery Note).
-
---
-
-### **Delivery Note**
-
-Lets say, you have an order from "Jane Doe" to deliver 5 nos of item "RM0001" at $300. Following are the details of Delivery Note:
-
-**Customer:** Jane Doe
-
-**Items:**
-<table class="table table-bordered">
-	<thead>
-		<tr><th>Item</th><th>Warehouse</th><th>Qty</th><th>Rate</th><th>Amount</th></tr>
-	</thead>
-	<tbody>
-		<tr><td>RM0001</td><td>Stores</td><td>5</td><td>300</td><td>1500</td></tr>
-	</tbody>
-</table>
-	
-**Taxes:**
-
-<table class="table table-bordered">
-	<thead>
-		<tr><th>Account</th><th>Amount</th></tr>
-	</thead>
-	<tbody>
-		<tr><td>Service Tax</td><td>150</td></tr>
-		<tr><td>VAT</td><td>100</td></tr>
-	</tbody>
-</table>
-
-
-**Stock Ledger**
-
-![dn_stock_ledger](img/accounting-for-stock-5.png)
-
-**General Ledger**
-
-![dn_general_ledger](img/accounting-for-stock-6.png)
-
-As item is delivered from "Stores" warehouse, "Stores" account is credited and equal amount is debited to the expense account "Cost of Goods Sold". The debit/credit amount is equal to the total valuation amount (buying cost) of the selling items. And valuation amount is calculated based on your prefferred valuation method (FIFO / Moving Average) or actual cost of serialized items.
-<pre>
-	<code>
-In this example, we have considered valuation method as FIFO. 
-Valuation Rate 	= Purchase Rate + Charges Included in Valuation 
-				= 200 + (250 * (2000 / 2500) / 10) 
-				= 220
-Total Valuation Amount 	= 220 * 5 
-						= 1100
-	</code>
-</pre>
-
---
-
-### **Sales Invoice with Update Stock**
-
-Lets say, you did not make Delivery Note against the above order and instead you have made Sales Invoice directly, with "Update Stock" options.  The details of the Sales Invoice are same as the above Delivery Note.
-
-**Stock Ledger**
-
-![si_stock_ledger](img/accounting-for-stock-7.png)
-
-**General Ledger**
-
-![si_general_ledger](img/accounting-for-stock-8.png)
-
-Here, apart from normal account entries for invoice, "Stores" and "Cost of Goods Sold" accounts are also affected based on the valuation amount.
-
---
-
-### **Stock Entry (Material Receipt)**
-
-**Items:**
-<table class="table table-bordered">
-	<thead>
-		<tr><th>Item</th><th>Target Warehouse</th><th>Qty</th><th>Rate</th><th>Amount</th></tr>
-	</thead>
-	<tbody>
-		<tr><td>RM0001</td><td>Stores</td><td>50</td><td>220</td><td>11000</td></tr>
-	</tbody>
-</table>
-
-**Stock Ledger**
-
-![mr_stock_ledger](img/accounting-for-stock-9.png)
-
-**General Ledger**
-
-![mr_stock_ledger](img/accounting-for-stock-10.png)
- 
---
-
-### **Stock Entry (Material Issue)**
-
-**Items:**
-<table class="table table-bordered">
-	<thead>
-		<tr><th>Item</th><th>Source Warehouse</th><th>Qty</th><th>Rate</th><th>Amount</th></tr>
-	</thead>
-	<tbody>
-		<tr><td>RM0001</td><td>Stores</td><td>10</td><td>220</td><td>2200</td></tr>
-	</tbody>
-</table>
-
-**Stock Ledger**
-
-![mi_stock_ledger](img/accounting-for-stock-11.png)
-
-**General Ledger**
-
-![mi_stock_ledger](img/accounting-for-stock-12.png)
-
---
-
-### **Stock Entry (Material Transfer)**
-
-**Items:**
-<table class="table table-bordered">
-	<thead>
-		<tr><th>Item</th><th>Source Warehouse</th><th>Target Warehouse</th>
-		<th>Qty</th><th>Rate</th><th>Amount</th></tr>
-	</thead>
-	<tbody>
-		<tr><td>RM0001</td><td>Stores</td><td>Work In Progress</td>
-		<td>10</td><td>220</td><td>2200</td></tr>
-	</tbody>
-</table>
-
-**Stock Ledger**
-
-![mtn_stock_ledger](img/accounting-for-stock-13.png)
-
-**General Ledger**
-
-![mtn_general_ledger](img/accounting-for-stock-14.png)
-
---
-
-### **Stock Entry (Sales Return - Sales Invoice booked)**
-
-**Items:**
-<table class="table table-bordered">
-	<thead>
-		<tr><th>Item</th><th>Target Warehouse</th><th>Qty</th><th>Rate</th><th>Amount</th></tr>
-	</thead>
-	<tbody>
-		<tr><td>RM0001</td><td>Stores</td><td>2</td><td>200</td><td>400</td></tr>
-	</tbody>
-</table>
-
-**Stock Ledger**
-
-![sret_stock_ledger](img/accounting-for-stock-15.png)
-
-**General Ledger**
-
-![sret_general_ledger](img/accounting-for-stock-16.png)
-
-
---
-
-### **Stock Entry (Purchase Return)**
-
-**Items:**
-<table class="table table-bordered">
-	<thead>
-		<tr><th>Item</th><th>Source Warehouse</th><th>Qty</th><th>Rate</th><th>Amount</th></tr>
-	</thead>
-	<tbody>
-		<tr><td>RM0001</td><td>Stores</td><td>4</td><td>220</td><td>880</td></tr>
-	</tbody>
-</table>
-
-**Stock Ledger**
-
-![pret_stock_ledger](img/accounting-for-stock-17.png)
-
-**General Ledger**
-
-![pret_general_ledger](img/accounting-for-stock-18.png)
diff --git a/docs/user/accounts/docs.user.accounts.reports.md b/docs/user/accounts/docs.user.accounts.reports.md
index 24fb3b3..5806875 100644
--- a/docs/user/accounts/docs.user.accounts.reports.md
+++ b/docs/user/accounts/docs.user.accounts.reports.md
@@ -1,6 +1,6 @@
 ---
 {
-	"_label": "Reports"
+	"_label": "Accounting Reports"
 }
 ---
 Some of the major accounting reports are:
diff --git a/docs/user/customer_portal/docs.user.customer_portal.login.md b/docs/user/customer_portal/docs.user.customer_portal.login.md
index c0c5e78..a41d0b2 100644
--- a/docs/user/customer_portal/docs.user.customer_portal.login.md
+++ b/docs/user/customer_portal/docs.user.customer_portal.login.md
@@ -1,6 +1,6 @@
 ---
 {
-	"_label": "Login"
+	"_label": "Portal Login"
 }
 ---
 To login into the customer account, the customer has to use his email id and the password sent by ERPNext; generated through the sign-up process.
diff --git a/docs/user/customer_portal/docs.user.customer_portal.md b/docs/user/customer_portal/docs.user.customer_portal.md
index fc886f1..54d6e30 100644
--- a/docs/user/customer_portal/docs.user.customer_portal.md
+++ b/docs/user/customer_portal/docs.user.customer_portal.md
@@ -4,7 +4,7 @@
 	"_toc": [
 		"docs.user.customer_portal.sign_up",
 		"docs.user.customer_portal.login",
-		"docs.user.customer_portal.orders",
+		"docs.user.customer_portal.order",
 		"docs.user.customer_portal.tickets"
 	]
 }
diff --git a/docs/user/customize/docs.user.customize.modules.md b/docs/user/customize/docs.user.customize.modules.md
deleted file mode 100644
index 8bd21b6..0000000
--- a/docs/user/customize/docs.user.customize.modules.md
+++ /dev/null
@@ -1,22 +0,0 @@
----
-{
-	"_label": "Hiding Modules and Features "
-}
----
-### Hiding Unused Features
-
-As you have seen from this manual that ERPNext contains tons of features which you may not use. We have observed that most users start with using 20% of the features, though a different 20%. To hide fields belonging to features you dont require, go to:
-
-> Setup > Customize ERPNext > Disable Features.
-
-Check / uncheck the features you want to use and refresh your page for the changes to take effect.
-
----
-
-### Hiding Module Icons
-
-To hide modules (icons) from the home page, go to:
-
-Setup > Customize ERPNext > Modules Setup
-
-> Note: Modules are automatically hidden for users that have no permissions on the documents within that module. For example, if a user has no permissions on Purchase Order, Purchase Request, Supplier, the “Buying” module will automatically be hidden.
diff --git a/docs/user/docs.user.md b/docs/user/docs.user.md
index 1b79ee7..8c58ad4 100644
--- a/docs/user/docs.user.md
+++ b/docs/user/docs.user.md
@@ -97,12 +97,14 @@
 	1. [Stock Entry / Material Transfer](docs.user.stock.stock_entry.html)
 	1. [Opening Stock](docs.user.accounts.opening_stock.html)
 	1. [Material Issue](docs.user.stock.material_issue.html)
-	1. [Sales Return](docs.user.stock.sales_return.html)
 	1. [Purchase Return](docs.user.stock.purchase_return.html)
 	1. [Projected Quantity](docs.user.stock.projected_quantity.html)
 	1. [Accounting for Stock](docs.user.stock.accounting_for_stock.html)
 	1. [Perpetual Inventory](docs.user.stock.perpetual_inventory.html)
-	1. [Migrate to Perpetual Inventory](docs.user.stock.migrate_to_perpetual.html)
+	1. [How To](docs.user.stocks.how_to.html)
+         1. [Repack Products](docs.user.stock.how_to_repack_products.html)
+         1. [Sales Return](docs.user.stock.sales_return.html)
+	     1. [Migrate to Perpetual Inventory](docs.user.stock.migrate_to_perpetual.html)
 1. [Accounts](docs.user.accounts.html)
 	1. [Chart of Accounts](docs.user.setup.accounting.html)
 	1. [Chart of Cost Centers](docs.user.setup.cost_centers.html)
@@ -143,6 +145,7 @@
 	1. [Style](docs.user.website.style.html)
 	1. [Blog](docs.user.website.blog.html)
 	1. [Shopping Cart](docs.user.website.shopping_cart.html)
+	1. [Add Products](docs.user.website.add_products_to_website.html)
 1. [Tools](docs.user.tools.html)
 	1. [To Do](docs.user.tools.todo.html)
 	1. [Calendar](docs.user.tools.calendar.html)
@@ -165,6 +168,9 @@
 	1. [DocType Fields](docs.user.knowledge.doctype_fields.html)
 	1. [Attachment and CSV Files](docs.user.knowledge.attachment_csv.html)
 	1. [Format using Markdown](docs.user.knowledge.markdown.html)
+	1. [Make-to-Stock Manufacturing](docs.user.knowledge.make_to_stock.html)
+	1. [Make-to-Order Manufacturing](docs.user.knowledge.make_to_order.html)
+	1. [Engineer-to-Order Manufacturing](docs.user.knowledge.engineer_to_order.html)
 1. [Customer Portal](docs.user.customer_portal.html)
 	1. [Sign Up](docs.user.customer_portal.sign_up.html)
 	2. [Login](docs.user.customer_portal.login.html)
diff --git a/docs/user/knowledge/docs.user.knowledge.engineer_to_order.md b/docs/user/knowledge/docs.user.knowledge.engineer_to_order.md
new file mode 100644
index 0000000..a48ad70
--- /dev/null
+++ b/docs/user/knowledge/docs.user.knowledge.engineer_to_order.md
@@ -0,0 +1,14 @@
+---
+{
+	"_label": "Engineer-to-Order Manufacturing"
+}
+---
+
+Engineer-to-order manufacturing is a strategy where the product is designed and manufactured based on very specific customer requirements. Since the end product tends to be complex, customers may engage with the ETO company throughout the entire design and manufacturing phases, to ensure that their specifications are met. This strategy is used by construction, fabrication industry, etc. 
+
+Since most specifications like design, requirements, engineering changes etc are often tossed back and forth several times between the ETO company and the customer, either party can become confused if the exchange of product information is poorly managed. Managing and identifying parts for production is an important step.
+
+Engineered-to-order products are often built from difficult to source parts, expensive parts and highly engineered components. Thus, acquiring the necessary product components can be a time consuming and costly endeavor, causing issues before and during production runs.
+
+To manage ETO products  maintain a consistent serial number records and create a Bill of Material for each product. Focus on the bill of materials rather then on the estimation and budgeting of the product.
+
diff --git a/docs/user/knowledge/docs.user.knowledge.make_to_order.md b/docs/user/knowledge/docs.user.knowledge.make_to_order.md
new file mode 100644
index 0000000..8b83120
--- /dev/null
+++ b/docs/user/knowledge/docs.user.knowledge.make_to_order.md
@@ -0,0 +1,14 @@
+---
+{
+	"_label": "Make-to-Order Manufacturing"
+}
+---
+
+Make-to-order is a manufacturing process in which manufacturing starts only after a customer's order is received.
+
+The company has some standard items but the product is only made when the customer places an order. This is true for furniture, for designer gift items etc.
+
+Manufacturing after receiving customer's orders means to start a pull-type supply chain operation because manufacturing is performed when demand is confirmed, i.e. being pulled by demand. 
+
+In this type of manufacturing, production orders are linked to one or more sales orders.
+
diff --git a/docs/user/knowledge/docs.user.knowledge.make_to_stock.md b/docs/user/knowledge/docs.user.knowledge.make_to_stock.md
new file mode 100644
index 0000000..ea07c58
--- /dev/null
+++ b/docs/user/knowledge/docs.user.knowledge.make_to_stock.md
@@ -0,0 +1,16 @@
+---
+{
+	"_label": "Make-to-Stock Manufacturing"
+}
+---
+
+Make-to-stock manufacturing is a system based on keeping stocks ready for customers in order to provide instant availability to customers. Products like FMCG goods and electronics are made and stocked. Here, the production cycle is completed before the sales orders are made. 
+
+This strategy is used by businesses to match production with consumer demand forecasts. The make-to-stock (MTS) method forecasts demand, to determine how much stock should be produced. If demand for the product can be accurately forecasted, the MTS strategy can be an efficient choice.
+
+The main drawback to the make-to-stock (MTS) method is that it relies heavily on the accuracy of demand forecasts. Inaccurate forecasts will lead to losses stemming from excessive inventory or stockouts.
+
+
+
+
+
diff --git a/docs/user/knowledge/docs.user.knowledge.md b/docs/user/knowledge/docs.user.knowledge.md
index 1fa88d9..229083a 100644
--- a/docs/user/knowledge/docs.user.knowledge.md
+++ b/docs/user/knowledge/docs.user.knowledge.md
@@ -8,7 +8,10 @@
 		"docs.user.knowledge.doctype",
 		"docs.user.knowledge.doctype_fields",
 		"docs.user.knowledge.attachment_csv",
-		"docs.user.knowledge.markdown"		
+		"docs.user.knowledge.markdown",
+		"docs.user.knowledge.make-to-stock",
+		"docs.user.knowledge.make-to-order",
+		"docs.user.knowledge.engineer-to-order"		
 	]
 }
 ---
diff --git a/docs/user/mfg/docs.user.mfg.planning.md b/docs/user/mfg/docs.user.mfg.planning.md
index 8d43ab8..a8075e1 100644
--- a/docs/user/mfg/docs.user.mfg.planning.md
+++ b/docs/user/mfg/docs.user.mfg.planning.md
@@ -15,19 +15,57 @@
 > Manufacturing > Production Planning Tool
 
 
-![Production Planning Tool](img/production-planning-tool.png)
+![Material Requisition Planning](img/mrp.png)
+
+<br>
 
 
+#### Step 1: Select and get Sales Order
+
+Select sales orders for MRP using filters (Time, Item, and Customer)
+
+
+![Production Planning Tool](img/mrp-1.png)
+
+Click on Get Sales Order to generate a list.
+
+![Production Planning Tool](img/mrp-1.1.png)
+
+<br>
+
+
+#### Step 2: Get Item from Sales Orders.
+
+ You can add/remove or change quantity of these Items.
+
+ ![Production Planning Tool](img/mrp-2.png)
+
+
+<br>
+
+#### Step 3: Create Production Orders
+
+![Production Planning Tool](img/mrp-3.png)
+
+<br>
+
+#### Step 4: Create Material Request
+
+Create Material Request for Items with projected shortfall.
+
+
+![Production Planning Tool](img/mrp-4.png)
+
+<br>
 
 The Production Planning Tool is used in two stages:
 
 - Selection of Open Sales Orders for the period based on “Expected Delivery Date”.
 - Selection of Items from those Sales Orders.
-- Click on “Raise Production Orders” 
 
-The tool will update if you have already created Production Orders for this Item against this Sales Order (“Planned Quantity”).
+
+The tool will update if you have already created Production Orders for a particular Item against its Sales Order (“Planned Quantity”).
 
 You can always edit the Item list and increase / reduce quantities to plan your production.
 
 > Note: How do you change a Production Plan? The output of the Production Planning Tool is the Production Order. Once your orders are created, you can change them by amending the Production Orders.
-
diff --git a/docs/user/projects/docs.user.projects.md b/docs/user/projects/docs.user.projects.md
index beeeb0b..5c5bdf7 100644
--- a/docs/user/projects/docs.user.projects.md
+++ b/docs/user/projects/docs.user.projects.md
@@ -2,7 +2,7 @@
 {
 	"_label": "Projects",
 	"_toc": [
-		"docs.user.projects.projects",
+		"docs.user.projects.project",
 		"docs.user.projects.task",
 		"docs.user.projects.timelog"
 	]
diff --git a/docs/user/projects/docs.user.projects.projects.md b/docs/user/projects/docs.user.projects.projects.md
index 9bcda3d..5376b0a 100644
--- a/docs/user/projects/docs.user.projects.projects.md
+++ b/docs/user/projects/docs.user.projects.projects.md
@@ -1,6 +1,6 @@
 ---
 {
-	"_label": "Projects"
+	"_label": "Project"
 }
 ---
 
diff --git a/docs/user/selling/docs.user.selling.customer_groups.md b/docs/user/selling/docs.user.selling.customer_groups.md
index f079dee..7c92ad7 100644
--- a/docs/user/selling/docs.user.selling.customer_groups.md
+++ b/docs/user/selling/docs.user.selling.customer_groups.md
@@ -6,6 +6,27 @@
 
 Customer Group is a category where you specify your customer group type. Your customers can be Individuals or they can be corporate(Company) customers. Your customers could also be government officials or non-profit organisations. ERPNext allows you to create your own Customer Group.
 
+To create a new Customer Group, go to
+
+> Selling > Customer Group
 
 
-![Customer Group Tree](img/customer-group-tree.png)
+#### Step 1: Click on Add Child
+
+
+![Customer Group Tree](img/customer-group-tree-1.png)
+
+<br>
+
+#### Step 2: Name the Customer Group
+
+![Customer Group Tree](img/customer-group-tree-2.png)
+
+
+The new Customer Group will be added to the Customer Group Tree.
+
+
+![Customer Group Tree](img/customer-group-tree-3.png)
+
+
+
diff --git a/docs/user/selling/docs.user.selling.sales_order.md b/docs/user/selling/docs.user.selling.sales_order.md
index 882964b..fc53780 100644
--- a/docs/user/selling/docs.user.selling.sales_order.md
+++ b/docs/user/selling/docs.user.selling.sales_order.md
@@ -3,7 +3,7 @@
 	"_label": "Sales Order"
 }
 ---
-The Sales Order confirms your sales and triggers purchase (**Purchase Request**) shipment (**Delivery Note**), billing (**Sales Invoice**) and manufacturing (**Production Plan**)
+The Sales Order confirms your sales and triggers purchase (**Material  Request**) shipment (**Delivery Note**), billing (**Sales Invoice**) and manufacturing (**Production Plan**)
 
 A Sales Order is usually a binding Contract with your Customer.
 
@@ -41,7 +41,7 @@
 
 #### Reservation and Warehouses
 
-If your Sales Order contains Items for which inventory is tracked (Is Stock Item is “Yes”). ERPNext will ask you for “Reservation Warehouse”. If you have set a default Warehouse for the Item, it will automatically set this Warehouse here.
+If your Sales Order contains Items for which inventory is tracked (Is Stock Item is “Yes”) then, ERPNext will ask you for “Reservation Warehouse”. If you have set a default Warehouse for the Item, it will automatically set this Warehouse here.
 
 This “reserved” quantity will help you project what is the quantity you need to purchase based on all your commitments.
 
diff --git a/docs/user/selling/docs.user.selling.sales_partner.md b/docs/user/selling/docs.user.selling.sales_partner.md
index df8241c..0125a09 100644
--- a/docs/user/selling/docs.user.selling.sales_partner.md
+++ b/docs/user/selling/docs.user.selling.sales_partner.md
@@ -6,6 +6,14 @@
 
 People who assist you in getting business are termed as Sales Partners. Sales Partners can be represented by different names in ERPNext. You can call them Channel Partner, Distributor, Dealer, Agent, Retailer, Implementation Partner, Reseller etc. Based on the partner's functions and their areas of expertise, you can create your own Sales Partner Names.
 
+To create a sales partner go to 
+
+> Setup > Sales Partner > New Sales Partner
+
 
 ![Sales Partner](img/sales-partner.png)
 
+To include the name of your Partner on your website, check the "Show in Website" box.
+
+![Sales Partner](img/sales-partner-1.png)
+
diff --git a/docs/user/selling/docs.user.selling.sales_person.md b/docs/user/selling/docs.user.selling.sales_person.md
index 71a4739..efc8836 100644
--- a/docs/user/selling/docs.user.selling.sales_person.md
+++ b/docs/user/selling/docs.user.selling.sales_person.md
@@ -6,3 +6,16 @@
 
 The person who helps in selling your products or services is called a Sales Person. A Sales Person could be your Sales Manager, Sales Executive, General Manager-Sales, Vice President-Sales etc.
 
+To create a sales person go to:
+
+> Setup > Sales Person
+
+
+![Sales Person](img/sales-person-1.png)
+
+<br>
+
+Click on "Add Child" to create new sales persons.
+
+
+![Sales Person](img/sales-person-2.png)
\ No newline at end of file
diff --git a/docs/user/selling/docs.user.selling.territory.md b/docs/user/selling/docs.user.selling.territory.md
index d471880..0584c08 100644
--- a/docs/user/selling/docs.user.selling.territory.md
+++ b/docs/user/selling/docs.user.selling.territory.md
@@ -12,3 +12,6 @@
 ![Territory Tree](img/territory-tree.png)
 
 
+To add more territories to an existing tree, click on "Add Child"
+
+![Territory Tree](img/territory-tree-1.png)
diff --git a/docs/user/setup/docs.user.setup.taxes.md b/docs/user/setup/docs.user.setup.taxes.md
index 7043429..ef3bbd5 100644
--- a/docs/user/setup/docs.user.setup.taxes.md
+++ b/docs/user/setup/docs.user.setup.taxes.md
@@ -17,6 +17,11 @@
 
 
 - **Inclusive and Exclusive Tax**: ERPNext allows you to enter Item rates which are tax inclusive.
+
+![Inclusive Tax](img/inclusive-tax.png)
+
+
+
 - **Exception to the rule**: Item tax settings are required only if a particular Item has a different tax rate than the rate defined in the standard tax Account
 - **Item tax is overwrite-able**: You can overwrite or change the item tax rate by going to the Item master in the Item tax table.
 
diff --git a/docs/user/stock/docs.user.stock.how_to.md b/docs/user/stock/docs.user.stock.how_to.md
new file mode 100644
index 0000000..0f38091
--- /dev/null
+++ b/docs/user/stock/docs.user.stock.how_to.md
@@ -0,0 +1,8 @@
+---
+{
+	"_label": "How to"
+}
+---
+
+
+This page contains most frequently asked questions on Stocks.
diff --git a/docs/user/stock/docs.user.stock.how_to_repack_products.md b/docs/user/stock/docs.user.stock.how_to_repack_products.md
new file mode 100644
index 0000000..4c386e4
--- /dev/null
+++ b/docs/user/stock/docs.user.stock.how_to_repack_products.md
@@ -0,0 +1,38 @@
+---
+{
+	"_label": "How to repack products?"
+}
+---
+
+
+#### Step 1: Go to Stock Entry
+
+#### Step 2: Select Purpose as Manufacture/Repack.
+
+![Repack](img/repack-1.png)
+
+#### Step 3: Fill Item details and BOM details.
+<br>
+
+### FAQ
+
+#### Q. How to repack products/items into smaller units?
+
+A lot of retailers / distributors buy large quantities of an item and repack them into smaller units. You can do this in ERPNext through Stock Entry.
+
+This entry is explained with an example.
+
+If you have a product, say - wheat, create a Stock Entry for the total amount of wheat stock in the Source Warehouse. Keep the UOM as KG.
+
+![Repack](img/stock-entry-repack.png)
+
+If you pack your item-wheat in boxes, and want to measure stock in terms of numbers, say - [5 kg wheat in 1 box];then, go to Stock Entry and select purpose as 'Manufacture/Repack'. Create one Item as Wheat with UOM KG. In this case mention only the source warehouse. Create another Item as Wheat Bag and mention UOM as Nos. Mention Target Warehouse for Wheat Bags. Mention Valuation numbers, save and submit the entry.
+
+The stock will be calculated as per the entry and will reflect in the stock report.
+
+
+![Repack](img/repack-2.png)
+
+
+
+
diff --git a/docs/user/stock/docs.user.stock.md b/docs/user/stock/docs.user.stock.md
index d0ab146..07662a7 100644
--- a/docs/user/stock/docs.user.stock.md
+++ b/docs/user/stock/docs.user.stock.md
@@ -17,7 +17,9 @@
 		"docs.user.stock.projected_quantity",
 		"docs.user.stock.accounting_for_stock",
 		"docs.user.stock.perpetual_inventory",
-		"docs.user.stock.migrate_to_perpetual"
+		"docs.user.stock.migrate_to_perpetual",
+		"docs.user.stock.how_to_repack_products",
+		"docs.user.stock.how_to"
 	]
 }
 ---
diff --git a/docs/user/stock/docs.user.stock.purchase_return.md b/docs/user/stock/docs.user.stock.purchase_return.md
index 13a325a..de2a312 100644
--- a/docs/user/stock/docs.user.stock.purchase_return.md
+++ b/docs/user/stock/docs.user.stock.purchase_return.md
@@ -9,9 +9,25 @@
 > Stock > Stock Entry > New Stock Entry
 
 
-![Purchase Return](img/purchase-return.png)
+
+#### Step 1: Select Purpose as Purchase Return.
+#### Step 2: Enter Purchase Return No.
 
 
+![Purchase Return](img/purchase-return-1.png)
+
+<br>
+
+
+#### Step 3: Enter Item Details
+#### Step 4: Update Warehouse Details
+
+
+![Purchase Return](img/purchase-return-1.png)
+
+#### Step 5: Provide Supplier Details
+
+![Purchase Return](img/purchase-return-3.png)
 
 
 - To select Purchase Return go to Stock Entry.
@@ -21,3 +37,8 @@
 - Provide Supplier Information.
 - Save the document.
 
+#### Debit Note
+
+Once the Stock Entry is submitted, you can click on Make Debit Note  button and a new Journal Voucher will be created pre-filled with the customer's account and Items' income account.
+
+![Purchase Return](img/purchase-return-4.png)
\ No newline at end of file
diff --git a/docs/user/stock/docs.user.stock.sales_return.md b/docs/user/stock/docs.user.stock.sales_return.md
index 3198db0..8ae7d49 100644
--- a/docs/user/stock/docs.user.stock.sales_return.md
+++ b/docs/user/stock/docs.user.stock.sales_return.md
@@ -7,15 +7,42 @@
 
 > Stock > Stock Entry > New Stock Entry
 
+#### Step 1: Select Purpose as "Sales Return"
 
 
-![Sales Return](img/sales-return.png)
+#### Step 2: Enter the Delivery Note No. or Sales Invoice No.
+
+<br>
 
 
+![Sales Return](img/sales-return-1.png)
+
+<br>
+
+#### Step 3: Enter Item Details
+
+
+![Sales Return](img/sales-return-2.png)
+
+<br>
+
+#### Step 4: Mention Contact Information of the Customer.
+
+
+![Sales Return](img/sales-return-3.png)
+
+<br>
 
 
 - For Sales Return click on Stock Entry
 - Select Sales Return under Purpose
-- Mention the Delivery Note number and the Sales Invoice number.
+- Mention the Delivery Note number or the Sales Invoice number.
 - Mention Contact Information of the Customer.
-- Save the file.
\ No newline at end of file
+- Save the file and Submit the Stock Entry.
+
+#### Credit Note
+
+Once the Stock Entry is submitted, you can click on Make Credit Note  button and a new Journal Voucher will be created pre-filled with the customer's account and Items' income account.
+
+![Sales Return](img/sales-return-4.png)
+
diff --git a/docs/user/website/docs.user.website.add_products_to_website.md b/docs/user/website/docs.user.website.add_products_to_website.md
new file mode 100644
index 0000000..9259ec6
--- /dev/null
+++ b/docs/user/website/docs.user.website.add_products_to_website.md
@@ -0,0 +1,60 @@
+---
+{
+	"_label": "Add Products to Website"
+}
+---
+### Add Products to the Website
+
+To list your Item on the Website, fill the Item details and save the file. Once the file is saved, a plus (+) button will appear next to the Image icon. Click on the plus button and add your Item image. The html code will be generated automatically. 
+
+##### Step 1: Save Image
+
+![Webimage](img/item-webimage.png)
+
+<br>
+
+##### Step 2: Check the 'Show in Website' box.
+
+Under the Website section, please check the box that says 'show in Website'. Once the box is checked, the page will display other fields for entering information. 
+
+![Webimage](img/item-webimage-1.png)
+
+<br>
+
+
+##### Step 3: Enter Website Details
+
+![Webimage](img/item-webimage-2.png)
+
+
+The page name will be generated automatically. Mention the Item-Group under which the Item will be displayed.
+
+#### Item Groups
+
+Mention the Item Group under this column. If you wish to list your Item under the broad category products, name your Item Group as Products. In case you have various varieties of Item and want to classify them under different names, make Item Groups with those names and check the box that says 'show in Website'. For Example, if you wish to create a category called 'Bags', create a Item Group named Bags.
+
+
+![Item Group](img/itemgroup-webimage-bags.png)
+
+Once the Item Group is created go to the Website Settings page under Website. Enter the Label, Url, and Parent Label.
+
+
+![Item Group](img/itemgroup-website-settings.png)
+
+<br>
+
+#### Webpage labels
+
+![Webpage](img/webpage-labels.png)
+
+Add more Items under a particular Item Group.
+
+To add more Items under a certain Label, mention the Item Group on the Item Page. The Items will be added automatically on the Webpage, under the Item Group Label. For Example, To add Item-Kiddies Bag and Butterfly Print Bag, check the 'Show in Website'box. The Items will be placed under the Label Bags on the Webpage.
+
+![Item Group](img/itemgroup-websettings.png)
+
+<br>
+
+Item Group Display
+
+![Item Group Display](img/webpage-itemgroup-display.png)
\ No newline at end of file
diff --git a/docs/user/website/docs.user.website.blog.md b/docs/user/website/docs.user.website.blog_post.md
similarity index 95%
rename from docs/user/website/docs.user.website.blog.md
rename to docs/user/website/docs.user.website.blog_post.md
index b71836e..706492f 100644
--- a/docs/user/website/docs.user.website.blog.md
+++ b/docs/user/website/docs.user.website.blog_post.md
@@ -1,6 +1,6 @@
 ---
 {
-	"_label": "Blog"
+	"_label": "Blog Post"
 }
 ---
 Blogs are a great way to share your thoughts about your business and keep your customers and readers updated of what you are up to.
diff --git a/docs/user/website/docs.user.website.md b/docs/user/website/docs.user.website.md
index b628e71..60d4b15 100644
--- a/docs/user/website/docs.user.website.md
+++ b/docs/user/website/docs.user.website.md
@@ -5,7 +5,8 @@
 		"docs.user.website.setup",
 		"docs.user.website.web_page",
 		"docs.user.website.style",
-		"docs.user.website.blog"
+		"docs.user.website.blog_post",
+		"docs.user.website.add_products_to_website"
 	]
 }
 ---
diff --git a/home/doctype/feed/feed.py b/home/doctype/feed/feed.py
index 25abf57..dcfb7ba 100644
--- a/home/doctype/feed/feed.py
+++ b/home/doctype/feed/feed.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 # License: GNU General Public License v3. See license.txt
 
 from __future__ import unicode_literals
@@ -7,10 +7,16 @@
 from webnotes.model import db_exists
 from webnotes.model.bean import copy_doclist
 
-sql = webnotes.conn.sql
 	
 
 
 class DocType:
   def __init__(self,d,dl):
-    self.doc, self.doclist = d, dl
\ No newline at end of file
+    self.doc, self.doclist = d, dl
+	
+def on_doctype_update():
+	if not webnotes.conn.sql("""show index from `tabFeed` 
+		where Key_name="feed_doctype_docname_index" """):
+		webnotes.conn.commit()
+		webnotes.conn.sql("""alter table `tabFeed` 
+			add index feed_doctype_docname_index(doc_type, doc_name)""")
\ No newline at end of file
diff --git a/home/doctype/feed/feed.txt b/home/doctype/feed/feed.txt
index c80e24c..8dde5f9 100644
--- a/home/doctype/feed/feed.txt
+++ b/home/doctype/feed/feed.txt
@@ -2,7 +2,7 @@
  {
   "creation": "2012-07-03 13:29:42", 
   "docstatus": 0, 
-  "modified": "2013-07-05 14:38:06", 
+  "modified": "2013-11-15 10:16:00", 
   "modified_by": "Administrator", 
   "owner": "Administrator"
  }, 
diff --git a/home/page/activity/activity.css b/home/page/activity/activity.css
index 34562cb..28b1b40 100644
--- a/home/page/activity/activity.css
+++ b/home/page/activity/activity.css
@@ -15,9 +15,9 @@
 }
 
 #page-activity .date-sep {
-	margin-bottom: 11px;
+	margin: 0px -15px 11px -15px;
 	padding: 5px 0px;
-	border-bottom: 1px solid #aaa;
+	border-bottom: 2px solid #aaa;
 	color: #555;
 	font-size: 10px;
 }
\ No newline at end of file
diff --git a/home/page/activity/activity.js b/home/page/activity/activity.js
index 8d45193..c4b0cf3 100644
--- a/home/page/activity/activity.js
+++ b/home/page/activity/activity.js
@@ -1,15 +1,16 @@
-// Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+// Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 // License: GNU General Public License v3. See license.txt
 
 wn.pages['activity'].onload = function(wrapper) {
 	wn.ui.make_app_page({
 		parent: wrapper,
-		title: "Activity",
+		title: wn._("Activity"),
 		single_column: true
 	})
 	wrapper.appframe.add_module_icon("Activity");
 	
 	var list = new wn.ui.Listing({
+		hide_refresh: true,
 		appframe: wrapper.appframe,
 		method: 'home.page.activity.activity.get_feed',
 		parent: $(wrapper).find(".layout-main"),
@@ -18,10 +19,12 @@
 		}
 	});
 	list.run();
+
+	wrapper.appframe.set_title_right("Refresh", function() { list.run(); });
 	
 	// Build Report Button
 	if(wn.boot.profile.can_get_report.indexOf("Feed")!=-1) {
-		wrapper.appframe.add_button('Build Report', function() {
+		wrapper.appframe.add_primary_action(wn._('Build Report'), function() {
 			wn.set_route('Report', "Feed");
 		}, 'icon-th')
 	}
diff --git a/home/page/activity/activity.py b/home/page/activity/activity.py
index 1f72d7e..2d902e1 100644
--- a/home/page/activity/activity.py
+++ b/home/page/activity/activity.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 # License: GNU General Public License v3. See license.txt
 
 from __future__ import unicode_literals
diff --git a/home/page/latest_updates/latest_updates.js b/home/page/latest_updates/latest_updates.js
index 094eeb5..80ba85e 100644
--- a/home/page/latest_updates/latest_updates.js
+++ b/home/page/latest_updates/latest_updates.js
@@ -1,10 +1,10 @@
-// Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+// Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 // License: GNU General Public License v3. See license.txt
 
 wn.pages['latest-updates'].onload = function(wrapper) { 
 	wn.ui.make_app_page({
 		parent: wrapper,
-		title: 'Latest Updates',
+		title: wn._('Latest Updates'),
 		single_column: true
 	});
 		
@@ -16,9 +16,9 @@
 		method:"home.page.latest_updates.latest_updates.get",
 		callback: function(r) {
 			parent.empty();
-			$("<p class='help'>Report issues at\
-				<a href='https://github.com/webnotes/erpnext/issues'>GitHub Issues</a></p>\
-				<hr><h3>Commit Log</h3>")
+			$("<p class='help'>"+wn._("Report issues at")+
+				"<a href='https://github.com/webnotes/erpnext/issues'>"+wn._("GitHub Issues")+"</a></p>\
+				<hr><h3>"+wn._("Commit Log")+"</h3>")
 					.appendTo(parent);
 				
 			var $tbody = $('<table class="table table-bordered"><tbody></tbody></table>')
diff --git a/home/page/latest_updates/latest_updates.py b/home/page/latest_updates/latest_updates.py
index b4e3f44..90e87f1 100644
--- a/home/page/latest_updates/latest_updates.py
+++ b/home/page/latest_updates/latest_updates.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 # License: GNU General Public License v3. See license.txt
 
 from __future__ import unicode_literals
diff --git a/hr/doctype/appraisal/appraisal.js b/hr/doctype/appraisal/appraisal.js
index f94a288..fd2856c 100644
--- a/hr/doctype/appraisal/appraisal.js
+++ b/hr/doctype/appraisal/appraisal.js
@@ -1,4 +1,4 @@
-// Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+// Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 // License: GNU General Public License v3. See license.txt
 
 cur_frm.add_fetch('employee', 'company', 'company');
@@ -45,7 +45,7 @@
 	var d = locals[cdt][cdn];
 	if (d.score){
 		if (flt(d.score) > 5) {
-			msgprint("Score must be less than or equal to 5");
+			msgprint(wn._("Score must be less than or equal to 5"));
 			d.score = 0;
 			refresh_field('score', d.name, 'appraisal_details');
 		}
diff --git a/hr/doctype/appraisal/appraisal.py b/hr/doctype/appraisal/appraisal.py
index 91d54b6..81c13cb 100644
--- a/hr/doctype/appraisal/appraisal.py
+++ b/hr/doctype/appraisal/appraisal.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 # License: GNU General Public License v3. See license.txt
 
 from __future__ import unicode_literals
diff --git a/hr/doctype/appraisal_goal/appraisal_goal.py b/hr/doctype/appraisal_goal/appraisal_goal.py
index 26d0f76..cb6190f 100644
--- a/hr/doctype/appraisal_goal/appraisal_goal.py
+++ b/hr/doctype/appraisal_goal/appraisal_goal.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 # License: GNU General Public License v3. See license.txt
 
 from __future__ import unicode_literals
diff --git a/hr/doctype/appraisal_template/appraisal_template.py b/hr/doctype/appraisal_template/appraisal_template.py
index ca1bad7..39f8545 100644
--- a/hr/doctype/appraisal_template/appraisal_template.py
+++ b/hr/doctype/appraisal_template/appraisal_template.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 # License: GNU General Public License v3. See license.txt
 
 from __future__ import unicode_literals
diff --git a/hr/doctype/appraisal_template_goal/appraisal_template_goal.py b/hr/doctype/appraisal_template_goal/appraisal_template_goal.py
index 26d0f76..cb6190f 100644
--- a/hr/doctype/appraisal_template_goal/appraisal_template_goal.py
+++ b/hr/doctype/appraisal_template_goal/appraisal_template_goal.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 # License: GNU General Public License v3. See license.txt
 
 from __future__ import unicode_literals
diff --git a/hr/doctype/attendance/attendance.js b/hr/doctype/attendance/attendance.js
index 4f66b07..be2b39d 100644
--- a/hr/doctype/attendance/attendance.js
+++ b/hr/doctype/attendance/attendance.js
@@ -1,4 +1,4 @@
-// Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+// Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 // License: GNU General Public License v3. See license.txt
 
 cur_frm.add_fetch('employee', 'company', 'company');
diff --git a/hr/doctype/attendance/attendance.py b/hr/doctype/attendance/attendance.py
index 7b82bc5..3abc1ae 100644
--- a/hr/doctype/attendance/attendance.py
+++ b/hr/doctype/attendance/attendance.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 # License: GNU General Public License v3. See license.txt
 
 from __future__ import unicode_literals
@@ -7,7 +7,6 @@
 from webnotes.utils import getdate, nowdate
 from webnotes import msgprint, _
 
-sql = webnotes.conn.sql
 
 class DocType:
 	def __init__(self, doc, doclist=[]):
@@ -15,7 +14,7 @@
 		self.doclist = doclist
 	
 	def validate_duplicate_record(self):	 
-		res = sql("""select name from `tabAttendance` where employee = %s and att_date = %s 
+		res = webnotes.conn.sql("""select name from `tabAttendance` where employee = %s and att_date = %s 
 			and name != %s and docstatus = 1""", 
 			(self.doc.employee, self.doc.att_date, self.doc.name))
 		if res:
@@ -24,7 +23,7 @@
 			
 	def check_leave_record(self):
 		if self.doc.status == 'Present':
-			leave = sql("""select name from `tabLeave Application` 
+			leave = webnotes.conn.sql("""select name from `tabLeave Application` 
 				where employee = %s and %s between from_date and to_date and status = 'Approved' 
 				and docstatus = 1""", (self.doc.employee, self.doc.att_date))
 			
@@ -42,7 +41,7 @@
 			msgprint(_("Attendance can not be marked for future dates"), raise_exception=1)
 
 	def validate_employee(self):
-		emp = sql("select name from `tabEmployee` where name = %s and status = 'Active'",
+		emp = webnotes.conn.sql("select name from `tabEmployee` where name = %s and status = 'Active'",
 		 	self.doc.employee)
 		if not emp:
 			msgprint(_("Employee: ") + self.doc.employee + 
diff --git a/hr/doctype/attendance/attendance.txt b/hr/doctype/attendance/attendance.txt
index 163baa0..5186a8d 100644
--- a/hr/doctype/attendance/attendance.txt
+++ b/hr/doctype/attendance/attendance.txt
@@ -2,7 +2,7 @@
  {
   "creation": "2013-01-10 16:34:13", 
   "docstatus": 0, 
-  "modified": "2013-08-08 14:22:10", 
+  "modified": "2013-11-02 14:05:42", 
   "modified_by": "Administrator", 
   "owner": "ashwini@webnotestech.com"
  }, 
@@ -54,7 +54,7 @@
   "doctype": "DocField", 
   "fieldname": "naming_series", 
   "fieldtype": "Select", 
-  "label": "Document Numbering Series", 
+  "label": "Series", 
   "no_copy": 1, 
   "oldfieldname": "naming_series", 
   "oldfieldtype": "Select", 
diff --git a/hr/doctype/branch/branch.py b/hr/doctype/branch/branch.py
index 2f09fd4..87b54f2 100644
--- a/hr/doctype/branch/branch.py
+++ b/hr/doctype/branch/branch.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 # License: GNU General Public License v3. See license.txt
 
 from __future__ import unicode_literals
diff --git a/hr/doctype/branch/test_branch.py b/hr/doctype/branch/test_branch.py
index a51143e..ec84741 100644
--- a/hr/doctype/branch/test_branch.py
+++ b/hr/doctype/branch/test_branch.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 # License: GNU General Public License v3. See license.txt
 
 test_records = [[{"doctype":"Branch", "branch":"_Test Branch"}]]
\ No newline at end of file
diff --git a/hr/doctype/deduction_type/deduction_type.py b/hr/doctype/deduction_type/deduction_type.py
index 26d0f76..cb6190f 100644
--- a/hr/doctype/deduction_type/deduction_type.py
+++ b/hr/doctype/deduction_type/deduction_type.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 # License: GNU General Public License v3. See license.txt
 
 from __future__ import unicode_literals
diff --git a/hr/doctype/deduction_type/test_deduction_type.py b/hr/doctype/deduction_type/test_deduction_type.py
index 57cb0bb..ff3db8c 100644
--- a/hr/doctype/deduction_type/test_deduction_type.py
+++ b/hr/doctype/deduction_type/test_deduction_type.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 # License: GNU General Public License v3. See license.txt
 
 test_records = [
diff --git a/hr/doctype/department/department.py b/hr/doctype/department/department.py
index 8bb44ee..b0215d5 100644
--- a/hr/doctype/department/department.py
+++ b/hr/doctype/department/department.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 # License: GNU General Public License v3. See license.txt
 
 from __future__ import unicode_literals
diff --git a/hr/doctype/department/test_department.py b/hr/doctype/department/test_department.py
index 102bbc8..6fa2dce 100644
--- a/hr/doctype/department/test_department.py
+++ b/hr/doctype/department/test_department.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 # License: GNU General Public License v3. See license.txt
 
 test_ignore = ["Leave Block List"]
diff --git a/hr/doctype/designation/designation.py b/hr/doctype/designation/designation.py
index 2f09fd4..87b54f2 100644
--- a/hr/doctype/designation/designation.py
+++ b/hr/doctype/designation/designation.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 # License: GNU General Public License v3. See license.txt
 
 from __future__ import unicode_literals
diff --git a/hr/doctype/designation/test_designation.py b/hr/doctype/designation/test_designation.py
index 1eb8f50..8b28fa5 100644
--- a/hr/doctype/designation/test_designation.py
+++ b/hr/doctype/designation/test_designation.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 # License: GNU General Public License v3. See license.txt
 
 test_records = [[{"doctype":"Designation", "designation_name":"_Test Designation"}]]
\ No newline at end of file
diff --git a/hr/doctype/earning_type/earning_type.py b/hr/doctype/earning_type/earning_type.py
index 26d0f76..cb6190f 100644
--- a/hr/doctype/earning_type/earning_type.py
+++ b/hr/doctype/earning_type/earning_type.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 # License: GNU General Public License v3. See license.txt
 
 from __future__ import unicode_literals
diff --git a/hr/doctype/earning_type/test_earning_type.py b/hr/doctype/earning_type/test_earning_type.py
index f22279e..5d838a2 100644
--- a/hr/doctype/earning_type/test_earning_type.py
+++ b/hr/doctype/earning_type/test_earning_type.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 # License: GNU General Public License v3. See license.txt
 
 test_records = [
diff --git a/hr/doctype/employee/employee.js b/hr/doctype/employee/employee.js
index 615e276..08cadbd 100644
--- a/hr/doctype/employee/employee.js
+++ b/hr/doctype/employee/employee.js
@@ -1,4 +1,4 @@
-// Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+// Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 // License: GNU General Public License v3. See license.txt
 
 wn.provide("erpnext.hr");
@@ -21,7 +21,7 @@
 		var me = this;
 		erpnext.hide_naming_series();
 		if(!this.frm.doc.__islocal) {			
-			cur_frm.add_custom_button('Make Salary Structure', function() {
+			cur_frm.add_custom_button(wn._('Make Salary Structure'), function() {
 				me.make_salary_structure(this); });
 		}
 	},
diff --git a/hr/doctype/employee/employee.py b/hr/doctype/employee/employee.py
index 78cb905..7129739 100644
--- a/hr/doctype/employee/employee.py
+++ b/hr/doctype/employee/employee.py
@@ -1,14 +1,13 @@
-# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 # License: GNU General Public License v3. See license.txt
 
 from __future__ import unicode_literals
 import webnotes
 
-from webnotes.utils import getdate, validate_email_add, cstr
+from webnotes.utils import getdate, validate_email_add, cstr, cint
 from webnotes.model.doc import make_autoname
 from webnotes import msgprint, _
 
-sql = webnotes.conn.sql
 
 class DocType:
 	def __init__(self,doc,doclist=[]):
@@ -21,12 +20,8 @@
 			webnotes.throw(_("Please setup Employee Naming System in Human Resource > HR Settings"))
 		else:
 			if naming_method=='Naming Series':
-				if not self.doc.naming_series:
-					webnotes.throw(_("Please select Naming Neries"))
 				self.doc.name = make_autoname(self.doc.naming_series + '.####')
 			elif naming_method=='Employee Number':
-				if not self.doc.employee_number:
-					webnotes.throw(_("Please enter Employee Number"))
 				self.doc.name = self.doc.employee_number
 
 		self.doc.employee = self.doc.name
@@ -40,12 +35,12 @@
 		self.validate_email()
 		self.validate_status()
 		self.validate_employee_leave_approver()
+		self.update_dob_event()
 		
 	def on_update(self):
 		if self.doc.user_id:
 			self.update_user_default()
 			self.update_profile()
-		self.update_dob_event()
 				
 	def update_user_default(self):
 		webnotes.conn.set_default("employee", self.doc.name, self.doc.user_id)
@@ -156,10 +151,11 @@
 					raise_exception=InvalidLeaveApproverError)
 
 	def update_dob_event(self):
-		if self.doc.status == "Active" and self.doc.date_of_birth:
+		if self.doc.status == "Active" and self.doc.date_of_birth \
+			and not cint(webnotes.conn.get_value("HR Settings", None, "stop_birthday_reminders")):
 			birthday_event = webnotes.conn.sql("""select name from `tabEvent` where repeat_on='Every Year' 
 				and ref_type='Employee' and ref_name=%s""", self.doc.name)
-
+			
 			starts_on = self.doc.date_of_birth + " 00:00:00"
 			ends_on = self.doc.date_of_birth + " 00:15:00"
 
diff --git a/hr/doctype/employee/employee.txt b/hr/doctype/employee/employee.txt
index bbe87ad..856f26e 100644
--- a/hr/doctype/employee/employee.txt
+++ b/hr/doctype/employee/employee.txt
@@ -2,12 +2,13 @@
  {
   "creation": "2013-03-07 09:04:18", 
   "docstatus": 0, 
-  "modified": "2013-08-08 14:22:11", 
+  "modified": "2013-11-03 11:19:10", 
   "modified_by": "Administrator", 
   "owner": "Administrator"
  }, 
  {
   "allow_attach": 1, 
+  "allow_rename": 1, 
   "autoname": "naming_series:", 
   "doctype": "DocType", 
   "document_type": "Master", 
@@ -72,11 +73,10 @@
   "report_hide": 1
  }, 
  {
-  "description": "<span class=\"sys_manager\">To setup, please go to Setup > Naming Series</span>", 
   "doctype": "DocField", 
   "fieldname": "naming_series", 
   "fieldtype": "Select", 
-  "label": "Document Numbering Series", 
+  "label": "Series", 
   "no_copy": 1, 
   "oldfieldname": "naming_series", 
   "oldfieldtype": "Select", 
@@ -234,7 +234,7 @@
   "fieldname": "scheduled_confirmation_date", 
   "fieldtype": "Date", 
   "in_filter": 1, 
-  "label": "Scheduled Confirmation Date", 
+  "label": "Offer Date", 
   "oldfieldname": "scheduled_confirmation_date", 
   "oldfieldtype": "Date", 
   "search_index": 0
@@ -243,7 +243,7 @@
   "doctype": "DocField", 
   "fieldname": "final_confirmation_date", 
   "fieldtype": "Date", 
-  "label": "Final Confirmation Date", 
+  "label": "Confirmation Date", 
   "oldfieldname": "final_confirmation_date", 
   "oldfieldtype": "Date", 
   "search_index": 0
@@ -329,7 +329,7 @@
   "fieldname": "company_email", 
   "fieldtype": "Data", 
   "in_filter": 1, 
-  "label": "Email (By company)", 
+  "label": "Company Email", 
   "oldfieldname": "company_email", 
   "oldfieldtype": "Data", 
   "reqd": 0
@@ -338,7 +338,7 @@
   "doctype": "DocField", 
   "fieldname": "notice_number_of_days", 
   "fieldtype": "Int", 
-  "label": "Notice - Number of Days", 
+  "label": "Notice (days)", 
   "oldfieldname": "notice_number_of_days", 
   "oldfieldtype": "Int"
  }, 
@@ -457,13 +457,13 @@
   "fieldname": "emergency_contact_details", 
   "fieldtype": "HTML", 
   "label": "Emergency Contact Details", 
-  "options": "<b>Emergency Contact Details</b>"
+  "options": "<h4 class=\"text-muted\">Emergency Contact Details</h4>"
  }, 
  {
   "doctype": "DocField", 
   "fieldname": "person_to_be_contacted", 
   "fieldtype": "Data", 
-  "label": "Person To Be Contacted"
+  "label": "Emergency Contact"
  }, 
  {
   "doctype": "DocField", 
@@ -475,7 +475,7 @@
   "doctype": "DocField", 
   "fieldname": "emergency_phone_number", 
   "fieldtype": "Data", 
-  "label": "Emergency Phone Number"
+  "label": "Emergency Phone"
  }, 
  {
   "doctype": "DocField", 
@@ -487,7 +487,7 @@
   "doctype": "DocField", 
   "fieldname": "permanent_accommodation_type", 
   "fieldtype": "Select", 
-  "label": "Permanent Accommodation Type", 
+  "label": "Permanent Address Is", 
   "options": "\nRented\nOwned"
  }, 
  {
@@ -500,7 +500,7 @@
   "doctype": "DocField", 
   "fieldname": "current_accommodation_type", 
   "fieldtype": "Select", 
-  "label": "Current Accommodation Type", 
+  "label": "Current Address Is", 
   "options": "\nRented\nOwned"
  }, 
  {
diff --git a/hr/doctype/employee/test_employee.py b/hr/doctype/employee/test_employee.py
index 4e85796..cfafb63 100644
--- a/hr/doctype/employee/test_employee.py
+++ b/hr/doctype/employee/test_employee.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 # License: GNU General Public License v3. See license.txt
 
 test_records = [[{
diff --git a/hr/doctype/employee_education/employee_education.py b/hr/doctype/employee_education/employee_education.py
index 26d0f76..cb6190f 100644
--- a/hr/doctype/employee_education/employee_education.py
+++ b/hr/doctype/employee_education/employee_education.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 # License: GNU General Public License v3. See license.txt
 
 from __future__ import unicode_literals
diff --git a/hr/doctype/employee_external_work_history/employee_external_work_history.py b/hr/doctype/employee_external_work_history/employee_external_work_history.py
index 26d0f76..cb6190f 100644
--- a/hr/doctype/employee_external_work_history/employee_external_work_history.py
+++ b/hr/doctype/employee_external_work_history/employee_external_work_history.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 # License: GNU General Public License v3. See license.txt
 
 from __future__ import unicode_literals
diff --git a/hr/doctype/employee_internal_work_history/employee_internal_work_history.py b/hr/doctype/employee_internal_work_history/employee_internal_work_history.py
index 26d0f76..cb6190f 100644
--- a/hr/doctype/employee_internal_work_history/employee_internal_work_history.py
+++ b/hr/doctype/employee_internal_work_history/employee_internal_work_history.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 # License: GNU General Public License v3. See license.txt
 
 from __future__ import unicode_literals
diff --git a/hr/doctype/employee_leave_approver/employee_leave_approver.py b/hr/doctype/employee_leave_approver/employee_leave_approver.py
index 784339d..e5468e5 100644
--- a/hr/doctype/employee_leave_approver/employee_leave_approver.py
+++ b/hr/doctype/employee_leave_approver/employee_leave_approver.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 # License: GNU General Public License v3. See license.txt
 
 # For license information, please see license.txt
diff --git a/hr/doctype/employment_type/employment_type.py b/hr/doctype/employment_type/employment_type.py
index 8bb44ee..b0215d5 100644
--- a/hr/doctype/employment_type/employment_type.py
+++ b/hr/doctype/employment_type/employment_type.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 # License: GNU General Public License v3. See license.txt
 
 from __future__ import unicode_literals
diff --git a/hr/doctype/employment_type/test_employment_type.py b/hr/doctype/employment_type/test_employment_type.py
index 0fefde2..d2624dc 100644
--- a/hr/doctype/employment_type/test_employment_type.py
+++ b/hr/doctype/employment_type/test_employment_type.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 # License: GNU General Public License v3. See license.txt
 
 test_records = [[{"doctype":"Employment Type", 
diff --git a/hr/doctype/expense_claim/expense_claim.js b/hr/doctype/expense_claim/expense_claim.js
index f7895b1..c32df80 100644
--- a/hr/doctype/expense_claim/expense_claim.js
+++ b/hr/doctype/expense_claim/expense_claim.js
@@ -1,4 +1,4 @@
-// Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+// Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 // License: GNU General Public License v3. See license.txt
 
 wn.provide("erpnext.hr");
@@ -86,35 +86,35 @@
 		cur_frm.toggle_enable("exp_approver", (doc.owner==user && doc.approval_status=="Draft"));
 		cur_frm.toggle_enable("approval_status", (doc.exp_approver==user && doc.docstatus==0));
 	
-		if(!doc.__islocal && user!=doc.exp_approver && cur_frm.frm_head.appframe.buttons.Submit) 
-			cur_frm.frm_head.appframe.buttons.Submit.toggle(false);
+		if(!doc.__islocal && user!=doc.exp_approver) 
+			cur_frm.frm_head.appframe.set_title_right("");
 	
 		if(doc.docstatus==0 && doc.exp_approver==user && doc.approval_status=="Approved")
 			 cur_frm.savesubmit();
 		
 		if(doc.docstatus==1 && wn.model.can_create("Journal Voucher"))
-			 cur_frm.add_custom_button("Make Bank Voucher", cur_frm.cscript.make_bank_voucher);
+			 cur_frm.add_custom_button(wn._("Make Bank Voucher"), cur_frm.cscript.make_bank_voucher);
 	}
 }
 
 cur_frm.cscript.set_help = function(doc) {
 	cur_frm.set_intro("");
 	if(doc.__islocal && !in_list(user_roles, "HR User")) {
-		cur_frm.set_intro("Fill the form and save it")
+		cur_frm.set_intro(wn._("Fill the form and save it"))
 	} else {
 		if(doc.docstatus==0 && doc.approval_status=="Draft") {
 			if(user==doc.exp_approver) {
-				cur_frm.set_intro("You are the Expense Approver for this record. \
-					Please Update the 'Status' and Save");
+				cur_frm.set_intro(wn._("You are the Expense Approver for this record. \
+					Please Update the 'Status' and Save"));
 			} else {
-				cur_frm.set_intro("Expense Claim is pending approval. \
-					Only the Expense Approver can update status.");
+				cur_frm.set_intro(wn._("Expense Claim is pending approval. \
+					Only the Expense Approver can update status."));
 			}
 		} else {
 			if(doc.approval_status=="Approved") {
-				cur_frm.set_intro("Expense Claim has been approved.");
+				cur_frm.set_intro(wn._("Expense Claim has been approved."));
 			} else if(doc.approval_status=="Rejected") {
-				cur_frm.set_intro("Expense Claim has been rejected.");
+				cur_frm.set_intro(wn._("Expense Claim has been rejected."));
 			}
 		}
 	}
diff --git a/hr/doctype/expense_claim/expense_claim.py b/hr/doctype/expense_claim/expense_claim.py
index 869fbcc..6b792c8 100644
--- a/hr/doctype/expense_claim/expense_claim.py
+++ b/hr/doctype/expense_claim/expense_claim.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 # License: GNU General Public License v3. See license.txt
 
 from __future__ import unicode_literals
diff --git a/hr/doctype/expense_claim_detail/expense_claim_detail.py b/hr/doctype/expense_claim_detail/expense_claim_detail.py
index 26d0f76..cb6190f 100644
--- a/hr/doctype/expense_claim_detail/expense_claim_detail.py
+++ b/hr/doctype/expense_claim_detail/expense_claim_detail.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 # License: GNU General Public License v3. See license.txt
 
 from __future__ import unicode_literals
diff --git a/hr/doctype/expense_claim_type/expense_claim_type.py b/hr/doctype/expense_claim_type/expense_claim_type.py
index 26d0f76..cb6190f 100644
--- a/hr/doctype/expense_claim_type/expense_claim_type.py
+++ b/hr/doctype/expense_claim_type/expense_claim_type.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 # License: GNU General Public License v3. See license.txt
 
 from __future__ import unicode_literals
diff --git a/hr/doctype/grade/grade.py b/hr/doctype/grade/grade.py
index 2f09fd4..87b54f2 100644
--- a/hr/doctype/grade/grade.py
+++ b/hr/doctype/grade/grade.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 # License: GNU General Public License v3. See license.txt
 
 from __future__ import unicode_literals
diff --git a/hr/doctype/grade/test_grade.py b/hr/doctype/grade/test_grade.py
index 8ee6c89..e3595e0 100644
--- a/hr/doctype/grade/test_grade.py
+++ b/hr/doctype/grade/test_grade.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 # License: GNU General Public License v3. See license.txt
 
 test_records = [[{"doctype":"Grade", "grade_name":"_Test Grade"}]]
\ No newline at end of file
diff --git a/hr/doctype/holiday/holiday.py b/hr/doctype/holiday/holiday.py
index 26d0f76..cb6190f 100644
--- a/hr/doctype/holiday/holiday.py
+++ b/hr/doctype/holiday/holiday.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 # License: GNU General Public License v3. See license.txt
 
 from __future__ import unicode_literals
diff --git a/hr/doctype/holiday_list/holiday_list.py b/hr/doctype/holiday_list/holiday_list.py
index 81d18f3..441f1dc 100644
--- a/hr/doctype/holiday_list/holiday_list.py
+++ b/hr/doctype/holiday_list/holiday_list.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 # License: GNU General Public License v3. See license.txt
 
 from __future__ import unicode_literals
@@ -10,7 +10,6 @@
 from webnotes.model.bean import copy_doclist
 from webnotes import msgprint
 
-sql = webnotes.conn.sql
 
 import datetime
 
diff --git a/hr/doctype/holiday_list/test_holiday_list.py b/hr/doctype/holiday_list/test_holiday_list.py
index c61127b..4acd339 100644
--- a/hr/doctype/holiday_list/test_holiday_list.py
+++ b/hr/doctype/holiday_list/test_holiday_list.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 # License: GNU General Public License v3. See license.txt
 
 test_records = [[{
diff --git a/hr/doctype/hr_settings/hr_settings.py b/hr/doctype/hr_settings/hr_settings.py
index 784339d..2abd7c6 100644
--- a/hr/doctype/hr_settings/hr_settings.py
+++ b/hr/doctype/hr_settings/hr_settings.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 # License: GNU General Public License v3. See license.txt
 
 # For license information, please see license.txt
@@ -6,6 +6,30 @@
 from __future__ import unicode_literals
 import webnotes
 
+from webnotes.utils import cint
+
 class DocType:
 	def __init__(self, d, dl):
-		self.doc, self.doclist = d, dl
\ No newline at end of file
+		self.doc, self.doclist = d, dl
+		
+	def validate(self):
+		self.update_birthday_reminders()
+
+		from setup.doctype.naming_series.naming_series import set_by_naming_series
+		set_by_naming_series("Employee", "employee_number", 
+			self.doc.get("emp_created_by")=="Naming Series", hide_name_field=True)
+			
+	def update_birthday_reminders(self):
+		original_stop_birthday_reminders = cint(webnotes.conn.get_value("HR Settings", 
+			None, "stop_birthday_reminders"))
+
+		# reset birthday reminders
+		if cint(self.doc.stop_birthday_reminders) != original_stop_birthday_reminders:
+			webnotes.conn.sql("""delete from `tabEvent` where repeat_on='Every Year' and ref_type='Employee'""")
+		
+			if not self.doc.stop_birthday_reminders:
+				for employee in webnotes.conn.sql_list("""select name from `tabEmployee` where status='Active' and 
+					ifnull(date_of_birth, '')!=''"""):
+					webnotes.get_obj("Employee", employee).update_dob_event()
+					
+			webnotes.msgprint(webnotes._("Updated Birthday Reminders"))
\ No newline at end of file
diff --git a/hr/doctype/hr_settings/hr_settings.txt b/hr/doctype/hr_settings/hr_settings.txt
index e3694d0..bf4b011 100644
--- a/hr/doctype/hr_settings/hr_settings.txt
+++ b/hr/doctype/hr_settings/hr_settings.txt
@@ -2,7 +2,7 @@
  {
   "creation": "2013-08-02 13:45:23", 
   "docstatus": 0, 
-  "modified": "2013-08-02 14:22:26", 
+  "modified": "2013-10-02 15:44:38", 
   "modified_by": "Administrator", 
   "owner": "Administrator"
  }, 
@@ -39,6 +39,12 @@
   "name": "HR Settings"
  }, 
  {
+  "doctype": "DocField", 
+  "fieldname": "employee_settings", 
+  "fieldtype": "Section Break", 
+  "label": "Employee Settings"
+ }, 
+ {
   "description": "Employee record is created using selected field. ", 
   "doctype": "DocField", 
   "fieldname": "emp_created_by", 
@@ -47,6 +53,19 @@
   "options": "Naming Series\nEmployee Number"
  }, 
  {
+  "description": "Don't send Employee Birthday Reminders", 
+  "doctype": "DocField", 
+  "fieldname": "stop_birthday_reminders", 
+  "fieldtype": "Check", 
+  "label": "Stop Birthday Reminders"
+ }, 
+ {
+  "doctype": "DocField", 
+  "fieldname": "payroll_settings", 
+  "fieldtype": "Section Break", 
+  "label": "Payroll Settings"
+ }, 
+ {
   "description": "If checked, Total no. of Working Days will include holidays, and this will reduce the value of Salary Per Day", 
   "doctype": "DocField", 
   "fieldname": "include_holidays_in_total_working_days", 
diff --git a/hr/doctype/job_applicant/get_job_applications.py b/hr/doctype/job_applicant/get_job_applications.py
index 2e01328..213a78a 100644
--- a/hr/doctype/job_applicant/get_job_applications.py
+++ b/hr/doctype/job_applicant/get_job_applications.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 # License: GNU General Public License v3. See license.txt
 
 from __future__ import unicode_literals
@@ -37,7 +37,7 @@
 		mail.save_attachments_in_doc(applicant.doc)
 				
 		make(content=mail.content, sender=mail.from_email, 
-			doctype="Job Applicant", name=applicant.doc.name)
+			doctype="Job Applicant", name=applicant.doc.name, sent_or_received="Received")
 
 def get_job_applications():
 	if cint(webnotes.conn.get_value('Jobs Email Settings', None, 'extract_emails')):
diff --git a/hr/doctype/job_applicant/job_applicant.js b/hr/doctype/job_applicant/job_applicant.js
index f82da11..fbe7714 100644
--- a/hr/doctype/job_applicant/job_applicant.js
+++ b/hr/doctype/job_applicant/job_applicant.js
@@ -1,4 +1,4 @@
-// Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+// Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 // License: GNU General Public License v3. See license.txt
 
 // For license information, please see license.txt
@@ -6,9 +6,8 @@
 cur_frm.cscript = {
 	onload: function(doc, dt, dn) {
 		if(in_list(user_roles,'System Manager')) {
-			cur_frm.footer.help_area.innerHTML = '<hr>\
-				<p><a href="#Form/Jobs Email Settings">Jobs Email Settings</a><br>\
-				<span class="help">Automatically extract Job Applicants from a mail box e.g. "jobs@example.com"</span></p>';
+			cur_frm.footer.help_area.innerHTML = '<p><a href="#Form/Jobs Email Settings">'+wn._("Jobs Email Settings")+'</a><br>\
+				<span class="help">'+wn._('Automatically extract Job Applicants from a mail box ')+'e.g. "jobs@example.com"</span></p>';
 		}
 	},
 	refresh: function(doc) {
diff --git a/hr/doctype/job_applicant/job_applicant.py b/hr/doctype/job_applicant/job_applicant.py
index 9bf1b96..887e789 100644
--- a/hr/doctype/job_applicant/job_applicant.py
+++ b/hr/doctype/job_applicant/job_applicant.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 # License: GNU General Public License v3. See license.txt
 
 # For license information, please see license.txt
@@ -11,14 +11,9 @@
 class DocType(TransactionBase):
 	def __init__(self, d, dl):
 		self.doc, self.doclist = d, dl
-		
+	
 	def get_sender(self, comm):
-		return webnotes.conn.get_value('Jobs Email Settings',None,'email_id')
-		
-	def on_communication(self, comm):
-		if webnotes.conn.get_value("Profile", extract_email_id(comm.sender), "user_type")=="System User":
-			status = "Replied"
-		else:
-			status = "Open"
-			
-		webnotes.conn.set(self.doc, 'status', status)
\ No newline at end of file
+		return webnotes.conn.get_value('Jobs Email Settings',None,'email_id')	
+	
+	def validate(self):
+		self.set_status()	
\ No newline at end of file
diff --git a/hr/doctype/job_opening/job_opening.py b/hr/doctype/job_opening/job_opening.py
index 784339d..e5468e5 100644
--- a/hr/doctype/job_opening/job_opening.py
+++ b/hr/doctype/job_opening/job_opening.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 # License: GNU General Public License v3. See license.txt
 
 # For license information, please see license.txt
diff --git a/hr/doctype/leave_allocation/leave_allocation.js b/hr/doctype/leave_allocation/leave_allocation.js
index 0721328..4bc3c49 100755
--- a/hr/doctype/leave_allocation/leave_allocation.js
+++ b/hr/doctype/leave_allocation/leave_allocation.js
@@ -1,4 +1,4 @@
-// Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+// Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 // License: GNU General Public License v3. See license.txt
 
 // ****************************************** onload ********************************************************
diff --git a/hr/doctype/leave_allocation/leave_allocation.py b/hr/doctype/leave_allocation/leave_allocation.py
index 1c856fa..dede0cf 100755
--- a/hr/doctype/leave_allocation/leave_allocation.py
+++ b/hr/doctype/leave_allocation/leave_allocation.py
@@ -1,11 +1,10 @@
-# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 # License: GNU General Public License v3. See license.txt
 
 from __future__ import unicode_literals
 import webnotes
 from webnotes.utils import cint, flt
 from webnotes import msgprint
-sql = webnotes.conn.sql
 	
 class DocType:
 	def __init__(self, doc, doclist):
@@ -37,7 +36,7 @@
 		
 	def check_existing_leave_allocation(self):
 		"""check whether leave for same type is already allocated or not"""
-		leave_allocation = sql("""select name from `tabLeave Allocation`
+		leave_allocation = webnotes.conn.sql("""select name from `tabLeave Allocation`
 			where employee=%s and leave_type=%s and fiscal_year=%s and docstatus=1""",
 			(self.doc.employee, self.doc.leave_type, self.doc.fiscal_year))
 		if leave_allocation:
@@ -64,14 +63,14 @@
 		return self.get_leaves_allocated(prev_fyear) - self.get_leaves_applied(prev_fyear)
 		
 	def get_leaves_applied(self, fiscal_year):
-		leaves_applied = sql("""select SUM(ifnull(total_leave_days, 0))
+		leaves_applied = webnotes.conn.sql("""select SUM(ifnull(total_leave_days, 0))
 			from `tabLeave Application` where employee=%s and leave_type=%s
 			and fiscal_year=%s and docstatus=1""", 
 			(self.doc.employee, self.doc.leave_type, fiscal_year))
 		return leaves_applied and flt(leaves_applied[0][0]) or 0
 
 	def get_leaves_allocated(self, fiscal_year):
-		leaves_allocated = sql("""select SUM(ifnull(total_leaves_allocated, 0))
+		leaves_allocated = webnotes.conn.sql("""select SUM(ifnull(total_leaves_allocated, 0))
 			from `tabLeave Allocation` where employee=%s and leave_type=%s
 			and fiscal_year=%s and docstatus=1 and name!=%s""",
 			(self.doc.employee, self.doc.leave_type, fiscal_year, self.doc.name))
@@ -79,7 +78,7 @@
 	
 	def allow_carry_forward(self):
 		"""check whether carry forward is allowed or not for this leave type"""
-		cf = sql("""select is_carry_forward from `tabLeave Type` where name = %s""",
+		cf = webnotes.conn.sql("""select is_carry_forward from `tabLeave Type` where name = %s""",
 			self.doc.leave_type)
 		cf = cf and cint(cf[0][0]) or 0
 		if not cf:
@@ -110,7 +109,7 @@
 		webnotes.conn.set(self.doc,'total_leaves_allocated',flt(leave_det['total_leaves_allocated']))
 
 	def check_for_leave_application(self):
-		exists = sql("""select name from `tabLeave Application`
+		exists = webnotes.conn.sql("""select name from `tabLeave Application`
 			where employee=%s and leave_type=%s and fiscal_year=%s and docstatus=1""",
 			(self.doc.employee, self.doc.leave_type, self.doc.fiscal_year))
 		if exists:
diff --git a/hr/doctype/leave_application/leave_application.js b/hr/doctype/leave_application/leave_application.js
index 5969f4d..a3b62ca 100755
--- a/hr/doctype/leave_application/leave_application.js
+++ b/hr/doctype/leave_application/leave_application.js
@@ -1,4 +1,4 @@
-// Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+// Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 // License: GNU General Public License v3. See license.txt
 
 cur_frm.add_fetch('employee','employee_name','employee_name');
@@ -31,28 +31,27 @@
 	}
 	cur_frm.set_intro("");
 	if(doc.__islocal && !in_list(user_roles, "HR User")) {
-		cur_frm.set_intro("Fill the form and save it")
+		cur_frm.set_intro(wn._("Fill the form and save it"))
 	} else {
 		if(doc.docstatus==0 && doc.status=="Open") {
 			if(user==doc.leave_approver) {
-				cur_frm.set_intro("You are the Leave Approver for this record. Please Update the 'Status' and Save");
+				cur_frm.set_intro(wn._("You are the Leave Approver for this record. Please Update the 'Status' and Save"));
 				cur_frm.toggle_enable("status", true);
 			} else {
-				cur_frm.set_intro("This Leave Application is pending approval. Only the Leave Apporver can update status.")
+				cur_frm.set_intro(wn._("This Leave Application is pending approval. Only the Leave Apporver can update status."))
 				cur_frm.toggle_enable("status", false);
 				if(!doc.__islocal) {
-					if(cur_frm.frm_head.appframe.buttons.Submit)
-						cur_frm.frm_head.appframe.buttons.Submit.remove();
+						cur_frm.frm_head.appframe.set_title_right("");
 				}
 			}
 		} else {
  			if(doc.status=="Approved") {
-				cur_frm.set_intro("Leave application has been approved.");
+				cur_frm.set_intro(wn._("Leave application has been approved."));
 				if(cur_frm.doc.docstatus==0) {
-					cur_frm.set_intro("Please submit to update Leave Balance.");
+					cur_frm.set_intro(wn._("Please submit to update Leave Balance."));
 				}
 			} else if(doc.status=="Rejected") {
-				cur_frm.set_intro("Leave application has been rejected.");
+				cur_frm.set_intro(wn._("Leave application has been rejected."));
 			}
 		}
 	}	
@@ -86,7 +85,7 @@
 
 cur_frm.cscript.to_date = function(doc, dt, dn) {
 	if(cint(doc.half_day) == 1 && cstr(doc.from_date) && doc.from_date != doc.to_date){
-		msgprint("To Date should be same as From Date for Half Day leave");
+		msgprint(wn._("To Date should be same as From Date for Half Day leave"));
 		set_multiple(dt,dn,{to_date:doc.from_date});		
 	}
 	cur_frm.cscript.calculate_total_days(doc, dt, dn);
diff --git a/hr/doctype/leave_application/leave_application.py b/hr/doctype/leave_application/leave_application.py
index 8a2df1e..aeeb640 100755
--- a/hr/doctype/leave_application/leave_application.py
+++ b/hr/doctype/leave_application/leave_application.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 # License: GNU General Public License v3. See license.txt
 
 from __future__ import unicode_literals
diff --git a/hr/doctype/leave_application/leave_application_calendar.js b/hr/doctype/leave_application/leave_application_calendar.js
index f9da0e5..a258c8f 100644
--- a/hr/doctype/leave_application/leave_application_calendar.js
+++ b/hr/doctype/leave_application/leave_application_calendar.js
@@ -1,4 +1,4 @@
-// Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+// Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 // License: GNU General Public License v3. See license.txt
 
 wn.views.calendar["Leave Application"] = {
diff --git a/hr/doctype/leave_application/test_leave_application.py b/hr/doctype/leave_application/test_leave_application.py
index c89f7c4..9f8a8e1 100644
--- a/hr/doctype/leave_application/test_leave_application.py
+++ b/hr/doctype/leave_application/test_leave_application.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 # License: GNU General Public License v3. See license.txt
 
 import webnotes
@@ -7,6 +7,9 @@
 from hr.doctype.leave_application.leave_application import LeaveDayBlockedError, OverlapError
 
 class TestLeaveApplication(unittest.TestCase):
+	def tearDown(self):
+		webnotes.set_user("Administrator")
+		
 	def _clear_roles(self):
 		webnotes.conn.sql("""delete from `tabUserRole` where parent in 
 			("test@example.com", "test1@example.com", "test2@example.com")""")
@@ -15,7 +18,8 @@
 		webnotes.conn.sql("""delete from `tabLeave Application`""")
 		
 	def _add_employee_leave_approver(self, employee, leave_approver):
-		webnotes.session.user = "Administrator"
+		temp_session_user = webnotes.session.user
+		webnotes.set_user("Administrator")
 		employee = webnotes.bean("Employee", employee)
 		employee.doclist.append({
 			"doctype": "Employee Leave Approver",
@@ -23,6 +27,7 @@
 			"leave_approver": leave_approver
 		})
 		employee.save()
+		webnotes.set_user(temp_session_user)
 	
 	def get_application(self, doclist):
 		application = webnotes.bean(copy=doclist)
@@ -31,7 +36,6 @@
 		return application
 
 	def test_block_list(self):
-		webnotes.session.user = "Administrator"
 		self._clear_roles()
 		
 		from webnotes.profile import add_role
@@ -45,7 +49,7 @@
 		application.doc.status = "Approved"
 		self.assertRaises(LeaveDayBlockedError, application.submit)
 		
-		webnotes.session.user = "test1@example.com"
+		webnotes.set_user("test1@example.com")
 
 		# clear other applications
 		webnotes.conn.sql("delete from `tabLeave Application`")
@@ -54,7 +58,6 @@
 		self.assertTrue(application.insert())
 		
 	def test_overlap(self):
-		webnotes.session.user = "Administrator"
 		self._clear_roles()
 		self._clear_applications()
 		
@@ -62,7 +65,7 @@
 		add_role("test@example.com", "Employee")
 		add_role("test2@example.com", "Leave Approver")
 		
-		webnotes.session.user = "test@example.com"
+		webnotes.set_user("test@example.com")
 		application = self.get_application(test_records[1])
 		application.doc.leave_approver = "test2@example.com"
 		application.insert()
@@ -72,7 +75,6 @@
 		self.assertRaises(OverlapError, application.insert)
 		
 	def test_global_block_list(self):
-		webnotes.session.user = "Administrator"
 		self._clear_roles()
 
 		from webnotes.profile import add_role
@@ -87,10 +89,10 @@
 		webnotes.conn.set_value("Employee", "_T-Employee-0002", "department", 
 			"_Test Department")
 		
-		webnotes.session.user = "test1@example.com"
+		webnotes.set_user("test1@example.com")
 		application.insert()
 		
-		webnotes.session.user = "test@example.com"
+		webnotes.set_user("test@example.com")
 		application.doc.status = "Approved"
 		self.assertRaises(LeaveDayBlockedError, application.submit)
 		
@@ -98,7 +100,6 @@
 			"applies_to_all_departments", 0)
 		
 	def test_leave_approval(self):
-		webnotes.session.user = "Administrator"
 		self._clear_roles()
 		
 		from webnotes.profile import add_role
@@ -115,13 +116,13 @@
 		self._clear_applications()
 		
 		# create leave application as Employee
-		webnotes.session.user = "test@example.com"
+		webnotes.set_user("test@example.com")
 		application = self.get_application(test_records[1])
 		application.doc.leave_approver = "test1@example.com"
 		application.insert()
 		
 		# submit leave application by Leave Approver
-		webnotes.session.user = "test1@example.com"
+		webnotes.set_user("test1@example.com")
 		application.doc.status = "Approved"
 		application.submit()
 		self.assertEqual(webnotes.conn.get_value("Leave Application", application.doc.name,
@@ -138,7 +139,7 @@
 		
 		# TODO - add test2@example.com leave approver in employee's leave approvers list
 		application = self.get_application(test_records[1])
-		webnotes.session.user = "test@example.com"
+		webnotes.set_user("test@example.com")
 		
 		application.doc.leave_approver = "test1@example.com"
 		self.assertRaises(InvalidLeaveApproverError, application.insert)
@@ -152,11 +153,11 @@
 		
 		# create leave application as employee
 		# but submit as invalid leave approver - should raise exception
-		webnotes.session.user = "test@example.com"
+		webnotes.set_user("test@example.com")
 		application = self.get_application(test_records[1])
 		application.doc.leave_approver = "test2@example.com"
 		application.insert()
-		webnotes.session.user = "test1@example.com"
+		webnotes.set_user("test1@example.com")
 		application.doc.status = "Approved"
 		
 		from webnotes.model.bean import BeanPermissionError
@@ -172,13 +173,13 @@
 		original_department = webnotes.conn.get_value("Employee", "_T-Employee-0001", "department")
 		webnotes.conn.set_value("Employee", "_T-Employee-0001", "department", None)
 		
-		webnotes.session.user = "test@example.com"
+		webnotes.set_user("test@example.com")
 		application = self.get_application(test_records[1])
 		application.doc.leave_approver = "test2@example.com"
 		application.insert()
 
 		# change to valid leave approver and try to submit leave application
-		webnotes.session.user = "test2@example.com"
+		webnotes.set_user("test2@example.com")
 		application.doc.status = "Approved"
 		application.submit()
 		self.assertEqual(webnotes.conn.get_value("Leave Application", application.doc.name,
diff --git a/hr/doctype/leave_block_list/leave_block_list.py b/hr/doctype/leave_block_list/leave_block_list.py
index 2f37a3f..973436e 100644
--- a/hr/doctype/leave_block_list/leave_block_list.py
+++ b/hr/doctype/leave_block_list/leave_block_list.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 # License: GNU General Public License v3. See license.txt
 
 # For license information, please see license.txt
diff --git a/hr/doctype/leave_block_list/test_leave_block_list.py b/hr/doctype/leave_block_list/test_leave_block_list.py
index e266cd8..0f0da65 100644
--- a/hr/doctype/leave_block_list/test_leave_block_list.py
+++ b/hr/doctype/leave_block_list/test_leave_block_list.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 # License: GNU General Public License v3. See license.txt
 
 import webnotes
@@ -7,6 +7,9 @@
 from hr.doctype.leave_block_list.leave_block_list import get_applicable_block_dates
 
 class TestLeaveBlockList(unittest.TestCase):
+	def tearDown(self):
+		webnotes.session.user = "Administrator"
+		
 	def test_get_applicable_block_dates(self):
 		webnotes.session.user = "test@example.com"
 		webnotes.conn.set_value("Department", "_Test Department", "leave_block_list", 
diff --git a/hr/doctype/leave_block_list_allow/leave_block_list_allow.py b/hr/doctype/leave_block_list_allow/leave_block_list_allow.py
index 784339d..e5468e5 100644
--- a/hr/doctype/leave_block_list_allow/leave_block_list_allow.py
+++ b/hr/doctype/leave_block_list_allow/leave_block_list_allow.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 # License: GNU General Public License v3. See license.txt
 
 # For license information, please see license.txt
diff --git a/hr/doctype/leave_block_list_date/leave_block_list_date.py b/hr/doctype/leave_block_list_date/leave_block_list_date.py
index 784339d..e5468e5 100644
--- a/hr/doctype/leave_block_list_date/leave_block_list_date.py
+++ b/hr/doctype/leave_block_list_date/leave_block_list_date.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 # License: GNU General Public License v3. See license.txt
 
 # For license information, please see license.txt
diff --git a/hr/doctype/leave_control_panel/leave_control_panel.js b/hr/doctype/leave_control_panel/leave_control_panel.js
index a53f031..649c35d 100644
--- a/hr/doctype/leave_control_panel/leave_control_panel.js
+++ b/hr/doctype/leave_control_panel/leave_control_panel.js
@@ -1,4 +1,4 @@
-// Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+// Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 // License: GNU General Public License v3. See license.txt
 
 cur_frm.cscript.onload = function(doc,dt,dn){
@@ -15,7 +15,7 @@
     function(r, rt) {
     var doc = locals[cdt][cdn];
     if (r.message) {
-      alert("To date cannot be before from date");
+      alert(wn._("To date cannot be before from date"));
       doc.to_date = '';
       refresh_field('to_date');
     }
diff --git a/hr/doctype/leave_control_panel/leave_control_panel.py b/hr/doctype/leave_control_panel/leave_control_panel.py
index 30b52ba..e3a0ebe 100644
--- a/hr/doctype/leave_control_panel/leave_control_panel.py
+++ b/hr/doctype/leave_control_panel/leave_control_panel.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 # License: GNU General Public License v3. See license.txt
 
 from __future__ import unicode_literals
@@ -9,7 +9,6 @@
 from webnotes.model.code import get_obj
 from webnotes import msgprint
 
-sql = webnotes.conn.sql
 	
 
 
@@ -34,7 +33,7 @@
     emp_query = "select name from `tabEmployee` "
     if flag == 1:
       emp_query += condition 
-    e = sql(emp_query)
+    e = webnotes.conn.sql(emp_query)
     return e
 
   # ----------------
diff --git a/hr/doctype/leave_type/leave_type.py b/hr/doctype/leave_type/leave_type.py
index 8bb44ee..b0215d5 100644
--- a/hr/doctype/leave_type/leave_type.py
+++ b/hr/doctype/leave_type/leave_type.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 # License: GNU General Public License v3. See license.txt
 
 from __future__ import unicode_literals
diff --git a/hr/doctype/leave_type/test_leave_type.py b/hr/doctype/leave_type/test_leave_type.py
index ad3f158..50c3e79 100644
--- a/hr/doctype/leave_type/test_leave_type.py
+++ b/hr/doctype/leave_type/test_leave_type.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 # License: GNU General Public License v3. See license.txt
 
 test_records = [
diff --git a/hr/doctype/salary_manager/salary_manager.js b/hr/doctype/salary_manager/salary_manager.js
index 178ab3e..498d596 100644
--- a/hr/doctype/salary_manager/salary_manager.js
+++ b/hr/doctype/salary_manager/salary_manager.js
@@ -1,11 +1,11 @@
-// Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+// Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 // License: GNU General Public License v3. See license.txt
 
 var display_activity_log = function(msg) {
 	if(!pscript.ss_html)
 		pscript.ss_html = $a(cur_frm.fields_dict['activity_log'].wrapper,'div');
 	pscript.ss_html.innerHTML = 
-		'<div class="panel"><div class="panel-heading">Activity Log:</div>'+msg+'</div>';
+		'<div class="panel"><div class="panel-heading">'+wn._("Activity Log:")+'</div>'+msg+'</div>';
 }
 
 //Create salary slip
@@ -23,7 +23,7 @@
 //Submit salary slip
 //-----------------------
 cur_frm.cscript.submit_salary_slip = function(doc, cdt, cdn) {
-	var check = confirm("Do you really want to Submit all Salary Slip for month : " + doc.month+" and fiscal year : "+doc.fiscal_year);
+	var check = confirm(wn._("Do you really want to Submit all Salary Slip for month : ") + doc.month+ wn._(" and fiscal year : ")+doc.fiscal_year);
 	if(check){
 		var callback = function(r, rt){
 			if (r.message)
@@ -49,7 +49,7 @@
 		var jv = wn.model.make_new_doc_and_get_name('Journal Voucher');
 		jv = locals['Journal Voucher'][jv];
 		jv.voucher_type = 'Bank Voucher';
-		jv.user_remark = 'Payment of salary for the month: ' + doc.month + 'and fiscal year: ' + doc.fiscal_year;
+		jv.user_remark = wn._('Payment of salary for the month: ') + doc.month + wn._('and fiscal year: ') + doc.fiscal_year;
 		jv.fiscal_year = doc.fiscal_year;
 		jv.company = doc.company;
 		jv.posting_date = dateutil.obj_to_str(new Date());
diff --git a/hr/doctype/salary_manager/salary_manager.py b/hr/doctype/salary_manager/salary_manager.py
index 0eadca1..35576f3 100644
--- a/hr/doctype/salary_manager/salary_manager.py
+++ b/hr/doctype/salary_manager/salary_manager.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 # License: GNU General Public License v3. See license.txt
 
 from __future__ import unicode_literals
@@ -11,7 +11,6 @@
 from webnotes.model.code import get_obj
 from webnotes import msgprint
 
-sql = webnotes.conn.sql
 	
 
 
@@ -30,7 +29,7 @@
 		cond = self.get_filter_condition()
 		cond += self.get_joining_releiving_condition()
 		
-		emp_list = sql("""
+		emp_list = webnotes.conn.sql("""
 			select t1.name
 			from `tabEmployee` t1, `tabSalary Structure` t2 
 			where t1.docstatus!=2 and t2.docstatus != 2 
@@ -68,7 +67,7 @@
 		
 	
 	def get_month_details(self, year, month):
-		ysd = sql("select year_start_date from `tabFiscal Year` where name ='%s'"%year)[0][0]
+		ysd = webnotes.conn.sql("select year_start_date from `tabFiscal Year` where name ='%s'"%year)[0][0]
 		if ysd:
 			from dateutil.relativedelta import relativedelta
 			import calendar, datetime
@@ -96,7 +95,7 @@
 		emp_list = self.get_emp_list()
 		ss_list = []
 		for emp in emp_list:
-			if not sql("""select name from `tabSalary Slip` 
+			if not webnotes.conn.sql("""select name from `tabSalary Slip` 
 					where docstatus!= 2 and employee = %s and month = %s and fiscal_year = %s and company = %s
 					""", (emp[0], self.doc.month, self.doc.fiscal_year, self.doc.company)):
 				ss = webnotes.bean({
@@ -127,7 +126,7 @@
 			which are not submitted
 		"""
 		cond = self.get_filter_condition()
-		ss_list = sql("""
+		ss_list = webnotes.conn.sql("""
 			select t1.name from `tabSalary Slip` t1 
 			where t1.docstatus = 0 and month = '%s' and fiscal_year = '%s' %s
 		""" % (self.doc.month, self.doc.fiscal_year, cond))
@@ -189,7 +188,7 @@
 			Get total salary amount from submitted salary slip based on selected criteria
 		"""
 		cond = self.get_filter_condition()
-		tot = sql("""
+		tot = webnotes.conn.sql("""
 			select sum(rounded_total) from `tabSalary Slip` t1 
 			where t1.docstatus = 1 and month = '%s' and fiscal_year = '%s' %s
 		""" % (self.doc.month, self.doc.fiscal_year, cond))
@@ -202,7 +201,7 @@
 			get default bank account,default salary acount from company
 		"""
 		amt = self.get_total_salary()
-		com = sql("select default_bank_account from `tabCompany` where name = '%s'" % self.doc.company)
+		com = webnotes.conn.sql("select default_bank_account from `tabCompany` where name = '%s'" % self.doc.company)
 		
 		if not com[0][0] or not com[0][1]:
 			msgprint("You can set Default Bank Account in Company master.")
diff --git a/hr/doctype/salary_manager/test_salary_manager.py b/hr/doctype/salary_manager/test_salary_manager.py
index 04000f0..2800d53 100644
--- a/hr/doctype/salary_manager/test_salary_manager.py
+++ b/hr/doctype/salary_manager/test_salary_manager.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 # License: GNU General Public License v3. See license.txt
 
 from __future__ import unicode_literals
@@ -9,7 +9,7 @@
 
 # from webnotes.model.doc import Document
 # from webnotes.model.code import get_obj
-# sql = webnotes.conn.sql
+# webnotes.conn.sql = webnotes.conn.sql
 # 
 # class TestSalaryManager(unittest.TestCase):
 # 	def setUp(self):
@@ -20,15 +20,15 @@
 # 		ss1[0].employee = emp1.name
 # 		for s in ss1: s.save(1)
 # 		for s in ss1[1:]:
-# 			sql("update `tabSalary Structure Earning` set parent = '%s' where name = '%s'" % (ss1[0].name, s.name))
-# 			sql("update `tabSalary Structure Deduction` set parent = '%s' where name = '%s'" % (ss1[0].name, s.name))
+# 			webnotes.conn.sql("update `tabSalary Structure Earning` set parent = '%s' where name = '%s'" % (ss1[0].name, s.name))
+# 			webnotes.conn.sql("update `tabSalary Structure Deduction` set parent = '%s' where name = '%s'" % (ss1[0].name, s.name))
 # 			
 # 		
 # 		ss2[0].employee = emp2.name
 # 		for s in ss2: s.save(1)		
 # 		for s in ss2[1:]:
-# 			sql("update `tabSalary Structure Earning` set parent = '%s' where name = '%s'" % (ss2[0].name, s.name))
-# 			sql("update `tabSalary Structure Deduction` set parent = '%s' where name = '%s'" % (ss2[0].name, s.name))
+# 			webnotes.conn.sql("update `tabSalary Structure Earning` set parent = '%s' where name = '%s'" % (ss2[0].name, s.name))
+# 			webnotes.conn.sql("update `tabSalary Structure Deduction` set parent = '%s' where name = '%s'" % (ss2[0].name, s.name))
 # 			
 # 		sman.save()
 # 		self.sm = get_obj('Salary Manager')	
@@ -36,7 +36,7 @@
 # 		self.sm.create_sal_slip()
 # 		
 # 	def test_creation(self):
-# 		ssid = sql("""
+# 		ssid = webnotes.conn.sql("""
 # 			select name, department 
 # 			from `tabSalary Slip` 
 # 			where month = '08' and fiscal_year='2011-2012'""")
@@ -46,7 +46,7 @@
 # 		
 # 		
 # 	def test_lwp_calc(self):
-# 		ss = sql("""
+# 		ss = webnotes.conn.sql("""
 # 			select payment_days
 # 			from `tabSalary Slip` 
 # 			where month = '08' and fiscal_year='2011-2012' and employee = '%s'
diff --git a/hr/doctype/salary_slip/salary_slip.js b/hr/doctype/salary_slip/salary_slip.js
index e44e981..3716953 100644
--- a/hr/doctype/salary_slip/salary_slip.js
+++ b/hr/doctype/salary_slip/salary_slip.js
@@ -1,4 +1,4 @@
-// Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+// Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 // License: GNU General Public License v3. See license.txt
 
 cur_frm.add_fetch('employee', 'company', 'company');
diff --git a/hr/doctype/salary_slip/salary_slip.py b/hr/doctype/salary_slip/salary_slip.py
index 36d7ceb..f5eeea1 100644
--- a/hr/doctype/salary_slip/salary_slip.py
+++ b/hr/doctype/salary_slip/salary_slip.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 # License: GNU General Public License v3. See license.txt
 
 from __future__ import unicode_literals
@@ -11,7 +11,6 @@
 from webnotes import msgprint, _
 from setup.utils import get_company_currency
 
-sql = webnotes.conn.sql
 	
 from utilities.transaction_base import TransactionBase
 
@@ -32,7 +31,7 @@
 
 
 	def check_sal_struct(self):
-		struct = sql("select name from `tabSalary Structure` where employee ='%s' and is_active = 'Yes' "%self.doc.employee)
+		struct = webnotes.conn.sql("select name from `tabSalary Structure` where employee ='%s' and is_active = 'Yes' "%self.doc.employee)
 		if not struct:
 			msgprint("Please create Salary Structure for employee '%s'"%self.doc.employee)
 			self.doc.employee = ''
@@ -100,13 +99,13 @@
 		return payment_days
 		
 	def get_holidays_for_employee(self, m):
-		holidays = sql("""select t1.holiday_date 
+		holidays = webnotes.conn.sql("""select t1.holiday_date 
 			from `tabHoliday` t1, tabEmployee t2 
 			where t1.parent = t2.holiday_list and t2.name = %s 
 			and t1.holiday_date between %s and %s""", 
 			(self.doc.employee, m['month_start_date'], m['month_end_date']))
 		if not holidays:
-			holidays = sql("""select t1.holiday_date 
+			holidays = webnotes.conn.sql("""select t1.holiday_date 
 				from `tabHoliday` t1, `tabHoliday List` t2 
 				where t1.parent = t2.name and ifnull(t2.is_default, 0) = 1 
 				and t2.fiscal_year = %s
@@ -120,7 +119,7 @@
 		for d in range(m['month_days']):
 			dt = add_days(cstr(m['month_start_date']), d)
 			if dt not in holidays:
-				leave = sql("""
+				leave = webnotes.conn.sql("""
 					select t1.name, t1.half_day
 					from `tabLeave Application` t1, `tabLeave Type` t2 
 					where t2.name = t1.leave_type 
@@ -134,7 +133,7 @@
 		return lwp
 
 	def check_existing(self):
-		ret_exist = sql("""select name from `tabSalary Slip` 
+		ret_exist = webnotes.conn.sql("""select name from `tabSalary Slip` 
 			where month = %s and fiscal_year = %s and docstatus != 2 
 			and employee = %s and name != %s""", 
 			(self.doc.month, self.doc.fiscal_year, self.doc.employee, self.doc.name))
@@ -201,9 +200,9 @@
 		receiver = webnotes.conn.get_value("Employee", self.doc.employee, "company_email")
 		if receiver:
 			subj = 'Salary Slip - ' + cstr(self.doc.month) +'/'+cstr(self.doc.fiscal_year)
-			earn_ret=sql("""select e_type, e_modified_amount from `tabSalary Slip Earning` 
+			earn_ret=webnotes.conn.sql("""select e_type, e_modified_amount from `tabSalary Slip Earning` 
 				where parent = %s""", self.doc.name)
-			ded_ret=sql("""select d_type, d_modified_amount from `tabSalary Slip Deduction` 
+			ded_ret=webnotes.conn.sql("""select d_type, d_modified_amount from `tabSalary Slip Deduction` 
 				where parent = %s""", self.doc.name)
 		 
 			earn_table = ''
diff --git a/hr/doctype/salary_slip/test_salary_slip.py b/hr/doctype/salary_slip/test_salary_slip.py
index 6bb8c8e..29e9407 100644
--- a/hr/doctype/salary_slip/test_salary_slip.py
+++ b/hr/doctype/salary_slip/test_salary_slip.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 # License: GNU General Public License v3. See license.txt
 
 import webnotes
diff --git a/hr/doctype/salary_slip_deduction/salary_slip_deduction.py b/hr/doctype/salary_slip_deduction/salary_slip_deduction.py
index 26d0f76..cb6190f 100644
--- a/hr/doctype/salary_slip_deduction/salary_slip_deduction.py
+++ b/hr/doctype/salary_slip_deduction/salary_slip_deduction.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 # License: GNU General Public License v3. See license.txt
 
 from __future__ import unicode_literals
diff --git a/hr/doctype/salary_slip_earning/salary_slip_earning.py b/hr/doctype/salary_slip_earning/salary_slip_earning.py
index 26d0f76..cb6190f 100644
--- a/hr/doctype/salary_slip_earning/salary_slip_earning.py
+++ b/hr/doctype/salary_slip_earning/salary_slip_earning.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 # License: GNU General Public License v3. See license.txt
 
 from __future__ import unicode_literals
diff --git a/hr/doctype/salary_structure/salary_structure.js b/hr/doctype/salary_structure/salary_structure.js
index 81cb63d..8e36dbd 100644
--- a/hr/doctype/salary_structure/salary_structure.js
+++ b/hr/doctype/salary_structure/salary_structure.js
@@ -1,4 +1,4 @@
-// Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+// Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 // License: GNU General Public License v3. See license.txt
 
 cur_frm.add_fetch('employee', 'company', 'company');
@@ -12,7 +12,7 @@
 
 cur_frm.cscript.refresh = function(doc, dt, dn){
   if((!doc.__islocal) && (doc.is_active == 'Yes')){
-    cur_frm.add_custom_button('Make Salary Slip', cur_frm.cscript['Make Salary Slip']);  
+    cur_frm.add_custom_button(wn._('Make Salary Slip'), cur_frm.cscript['Make Salary Slip']);  
   }
 
   cur_frm.toggle_enable('employee', doc.__islocal);
diff --git a/hr/doctype/salary_structure/salary_structure.py b/hr/doctype/salary_structure/salary_structure.py
index 50b0160..2dc056d 100644
--- a/hr/doctype/salary_structure/salary_structure.py
+++ b/hr/doctype/salary_structure/salary_structure.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 # License: GNU General Public License v3. See license.txt
 
 from __future__ import unicode_literals
@@ -8,7 +8,6 @@
 from webnotes.model.doc import addchild, make_autoname
 from webnotes import msgprint, _
 
-sql = webnotes.conn.sql
 
 class DocType:
 	def __init__(self,doc,doclist=[]):
@@ -20,7 +19,7 @@
 
 	def get_employee_details(self):
 		ret = {}
-		det = sql("""select employee_name, branch, designation, department, grade 
+		det = webnotes.conn.sql("""select employee_name, branch, designation, department, grade 
 			from `tabEmployee` where name = %s""", self.doc.employee)
 		if det:
 			ret = {
@@ -34,7 +33,7 @@
 		return ret
 
 	def get_ss_values(self,employee):
-		basic_info = sql("""select bank_name, bank_ac_no, esic_card_no, pf_number 
+		basic_info = webnotes.conn.sql("""select bank_name, bank_ac_no, esic_card_no, pf_number 
 			from `tabEmployee` where name =%s""", employee)
 		ret = {'bank_name': basic_info and basic_info[0][0] or '',
 			'bank_ac_no': basic_info and basic_info[0][1] or '',
@@ -43,7 +42,7 @@
 		return ret
 
 	def make_table(self, doct_name, tab_fname, tab_name):
-		list1 = sql("select name from `tab%s` where docstatus != 2" % doct_name)
+		list1 = webnotes.conn.sql("select name from `tab%s` where docstatus != 2" % doct_name)
 		for li in list1:
 			child = addchild(self.doc, tab_fname, tab_name, self.doclist)
 			if(tab_fname == 'earning_details'):
@@ -58,7 +57,7 @@
 		self.make_table('Deduction Type','deduction_details', 'Salary Structure Deduction')
 
 	def check_existing(self):
-		ret = sql("""select name from `tabSalary Structure` where is_active = 'Yes' 
+		ret = webnotes.conn.sql("""select name from `tabSalary Structure` where is_active = 'Yes' 
 			and employee = %s and name!=%s""", (self.doc.employee,self.doc.name))
 		if ret and self.doc.is_active=='Yes':
 			msgprint(_("""Another Salary Structure '%s' is active for employee '%s'. 
diff --git a/hr/doctype/salary_structure_deduction/salary_structure_deduction.py b/hr/doctype/salary_structure_deduction/salary_structure_deduction.py
index 26d0f76..cb6190f 100644
--- a/hr/doctype/salary_structure_deduction/salary_structure_deduction.py
+++ b/hr/doctype/salary_structure_deduction/salary_structure_deduction.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 # License: GNU General Public License v3. See license.txt
 
 from __future__ import unicode_literals
diff --git a/hr/doctype/salary_structure_earning/salary_structure_earning.py b/hr/doctype/salary_structure_earning/salary_structure_earning.py
index 26d0f76..cb6190f 100644
--- a/hr/doctype/salary_structure_earning/salary_structure_earning.py
+++ b/hr/doctype/salary_structure_earning/salary_structure_earning.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 # License: GNU General Public License v3. See license.txt
 
 from __future__ import unicode_literals
diff --git a/hr/doctype/upload_attendance/upload_attendance.js b/hr/doctype/upload_attendance/upload_attendance.js
index 71e2669..9f86dfe 100644
--- a/hr/doctype/upload_attendance/upload_attendance.js
+++ b/hr/doctype/upload_attendance/upload_attendance.js
@@ -1,4 +1,4 @@
-// Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+// Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 // License: GNU General Public License v3. See license.txt
 
 
@@ -17,7 +17,7 @@
 	
 	get_template:function() {
 		if(!this.frm.doc.att_fr_date || !this.frm.doc.att_to_date) {
-			msgprint("Attendance From Date and Attendance To Date is mandatory");
+			msgprint(wn._("Attendance From Date and Attendance To Date is mandatory"));
 			return;
 		}
 		window.location.href = repl(wn.request.url + 
@@ -56,10 +56,10 @@
 						return v;
 					});
 
-					r.messages = ["<h4 style='color:red'>Import Failed!</h4>"]
+					r.messages = ["<h4 style='color:red'>"+wn._("Import Failed!")+"</h4>"]
 						.concat(r.messages)
 				} else {
-					r.messages = ["<h4 style='color:green'>Import Successful!</h4>"].
+					r.messages = ["<h4 style='color:green'>"+wn._("Import Successful!")+"</h4>"].
 						concat(r.message.messages)
 				}
 				
diff --git a/hr/doctype/upload_attendance/upload_attendance.py b/hr/doctype/upload_attendance/upload_attendance.py
index c1344b9..7bd1fd0 100644
--- a/hr/doctype/upload_attendance/upload_attendance.py
+++ b/hr/doctype/upload_attendance/upload_attendance.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 # License: GNU General Public License v3. See license.txt
 
 # For license information, please see license.txt
@@ -9,7 +9,8 @@
 from webnotes import msgprint, _
 from webnotes.utils.datautils import UnicodeWriter
 
-doclist = None
+# doclist = None
+doclist = webnotes.local('uploadattendance_doclist')
 
 class DocType():
 	def __init__(self, doc, doclist=[]):
@@ -21,9 +22,8 @@
 	if not webnotes.has_permission("Attendance", "create"):
 		raise webnotes.PermissionError
 	
-	args = webnotes.form_dict
-	global doclist
-	doclist = webnotes.model.doctype.get("Attendance")
+	args = webnotes.local.form_dict
+	webnotes.local.uploadattendance_doclist = webnotes.model.doctype.get("Attendance")
 
 	w = UnicodeWriter()
 	w = add_header(w)
@@ -144,4 +144,4 @@
 		webnotes.conn.rollback()		
 	else:
 		webnotes.conn.commit()
-	return {"messages": ret, "error": error}
\ No newline at end of file
+	return {"messages": ret, "error": error}
diff --git a/hr/page/hr_home/hr_home.js b/hr/page/hr_home/hr_home.js
index 71ed689..86514ba 100644
--- a/hr/page/hr_home/hr_home.js
+++ b/hr/page/hr_home/hr_home.js
@@ -1,4 +1,4 @@
-// Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+// Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 // License: GNU General Public License v3. See license.txt"
 
 wn.module_page["HR"] = [
diff --git a/hr/report/employee_birthday/employee_birthday.js b/hr/report/employee_birthday/employee_birthday.js
index 3fd8492..b534047 100644
--- a/hr/report/employee_birthday/employee_birthday.js
+++ b/hr/report/employee_birthday/employee_birthday.js
@@ -1,11 +1,11 @@
-// Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+// Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 // License: GNU General Public License v3. See license.txt
 
 wn.query_reports["Employee Birthday"] = {
 	"filters": [
 		{
 			"fieldname":"month",
-			"label": "Month",
+			"label": wn._("Month"),
 			"fieldtype": "Select",
 			"options": "Jan\nFeb\nMar\nApr\nMay\nJun\nJul\nAug\nSep\nOct\nNov\nDec",
 			"default": ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", 
@@ -13,7 +13,7 @@
 		},
 		{
 			"fieldname":"company",
-			"label": "Company",
+			"label": wn._("Company"),
 			"fieldtype": "Link",
 			"options": "Company",
 			"default": wn.defaults.get_user_default("company")
diff --git a/hr/report/employee_birthday/employee_birthday.py b/hr/report/employee_birthday/employee_birthday.py
index d40e7d4..8c5211e 100644
--- a/hr/report/employee_birthday/employee_birthday.py
+++ b/hr/report/employee_birthday/employee_birthday.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 # License: GNU General Public License v3. See license.txt
 
 from __future__ import unicode_literals
diff --git a/hr/report/employee_leave_balance/employee_leave_balance.js b/hr/report/employee_leave_balance/employee_leave_balance.js
index 1bf252d..de8f378 100644
--- a/hr/report/employee_leave_balance/employee_leave_balance.js
+++ b/hr/report/employee_leave_balance/employee_leave_balance.js
@@ -1,18 +1,18 @@
-// Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+// Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 // License: GNU General Public License v3. See license.txt
 
 wn.query_reports["Employee Leave Balance"] = {
 	"filters": [
 		{
 			"fieldname":"fiscal_year",
-			"label": "Fiscal Year",
+			"label": wn._("Fiscal Year"),
 			"fieldtype": "Link",
 			"options": "Fiscal Year",
 			"default": wn.defaults.get_user_default("fiscal_year")
 		},
 		{
 			"fieldname":"company",
-			"label": "Company",
+			"label": wn._("Company"),
 			"fieldtype": "Link",
 			"options": "Company",
 			"default": wn.defaults.get_user_default("company")
diff --git a/hr/report/employee_leave_balance/employee_leave_balance.py b/hr/report/employee_leave_balance/employee_leave_balance.py
index 770df45..6720576 100644
--- a/hr/report/employee_leave_balance/employee_leave_balance.py
+++ b/hr/report/employee_leave_balance/employee_leave_balance.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 # License: GNU General Public License v3. See license.txt
 
 from __future__ import unicode_literals
diff --git a/hr/report/monthly_attendance_sheet/monthly_attendance_sheet.js b/hr/report/monthly_attendance_sheet/monthly_attendance_sheet.js
index 678e7af..44289b7 100644
--- a/hr/report/monthly_attendance_sheet/monthly_attendance_sheet.js
+++ b/hr/report/monthly_attendance_sheet/monthly_attendance_sheet.js
@@ -1,11 +1,11 @@
-// Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+// Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 // License: GNU General Public License v3. See license.txt
 
 wn.query_reports["Monthly Attendance Sheet"] = {
 	"filters": [
 		{
 			"fieldname":"month",
-			"label": "Month",
+			"label": wn._("Month"),
 			"fieldtype": "Select",
 			"options": "Jan\nFeb\nMar\nApr\nMay\nJun\nJul\nAug\nSep\nOct\nNov\nDec",
 			"default": ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", 
@@ -13,20 +13,20 @@
 		},
 		{
 			"fieldname":"fiscal_year",
-			"label": "Fiscal Year",
+			"label": wn._("Fiscal Year"),
 			"fieldtype": "Link",
 			"options": "Fiscal Year",
 			"default": sys_defaults.fiscal_year,
 		},
 		{
 			"fieldname":"employee",
-			"label": "Employee",
+			"label": wn._("Employee"),
 			"fieldtype": "Link",
 			"options": "Employee"
 		},
 		{
 			"fieldname":"company",
-			"label": "Company",
+			"label": wn._("Company"),
 			"fieldtype": "Link",
 			"options": "Company",
 			"default": wn.defaults.get_default("company")
diff --git a/hr/report/monthly_attendance_sheet/monthly_attendance_sheet.py b/hr/report/monthly_attendance_sheet/monthly_attendance_sheet.py
index e321c6f..a25ca36 100644
--- a/hr/report/monthly_attendance_sheet/monthly_attendance_sheet.py
+++ b/hr/report/monthly_attendance_sheet/monthly_attendance_sheet.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 # License: GNU General Public License v3. See license.txt
 
 from __future__ import unicode_literals
diff --git a/hr/report/monthly_salary_register/monthly_salary_register.js b/hr/report/monthly_salary_register/monthly_salary_register.js
index eb33d08..5d3abcc 100644
--- a/hr/report/monthly_salary_register/monthly_salary_register.js
+++ b/hr/report/monthly_salary_register/monthly_salary_register.js
@@ -1,11 +1,11 @@
-// Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+// Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 // License: GNU General Public License v3. See license.txt
 
 wn.query_reports["Monthly Salary Register"] = {
 	"filters": [
 		{
 			"fieldname":"month",
-			"label": "Month",
+			"label": wn._("Month"),
 			"fieldtype": "Select",
 			"options": "Jan\nFeb\nMar\nApr\nMay\nJun\nJul\nAug\nSep\nOct\nNov\nDec",
 			"default": ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", 
@@ -13,20 +13,20 @@
 		},
 		{
 			"fieldname":"fiscal_year",
-			"label": "Fiscal Year",
+			"label": wn._("Fiscal Year"),
 			"fieldtype": "Link",
 			"options": "Fiscal Year",
 			"default": sys_defaults.fiscal_year,
 		},
 		{
 			"fieldname":"employee",
-			"label": "Employee",
+			"label": wn._("Employee"),
 			"fieldtype": "Link",
 			"options": "Employee"
 		},
 		{
 			"fieldname":"company",
-			"label": "Company",
+			"label": wn._("Company"),
 			"fieldtype": "Link",
 			"options": "Company",
 			"default": wn.defaults.get_default("company")
diff --git a/hr/report/monthly_salary_register/monthly_salary_register.py b/hr/report/monthly_salary_register/monthly_salary_register.py
index 38fdd32..8bd8f36 100644
--- a/hr/report/monthly_salary_register/monthly_salary_register.py
+++ b/hr/report/monthly_salary_register/monthly_salary_register.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 # License: GNU General Public License v3. See license.txt
 
 from __future__ import unicode_literals
diff --git a/hr/utils.py b/hr/utils.py
index ddd39e9..f36a066 100644
--- a/hr/utils.py
+++ b/hr/utils.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 # License: GNU General Public License v3. See license.txt
 
 from __future__ import unicode_literals
diff --git a/install_erpnext.py b/install_erpnext.py
index 7f3b8c3..fe17e2f 100644
--- a/install_erpnext.py
+++ b/install_erpnext.py
@@ -1,19 +1,38 @@
-# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 # License: GNU General Public License v3. See license.txt
 
 #!/usr/bin/env python
 from __future__ import unicode_literals
 import os, sys
+import argparse
 
-apache_user = None
 is_redhat = is_debian = None
 root_password = None
 
-def install(install_path=None):
-	install_pre_requisites()
-	
-	if not install_path:
-		install_path = os.getcwd()
+requirements = [
+	"chardet", 
+	"cssmin", 
+	"dropbox", 
+	"google-api-python-client", 
+	"gunicorn", 
+	"httplib2", 
+	"jinja2", 
+	"markdown2", 
+	"markupsafe", 
+	"mysql-python", 
+	"pygeoip", 
+	"python-dateutil", 
+	"python-memcached", 
+	"pytz==2013d", 
+	"requests", 
+	"six", 
+	"slugify", 
+	"termcolor", 
+	"werkzeug"
+]
+
+def install(install_path):
+	setup_folders(install_path)
 	install_erpnext(install_path)
 	
 	post_install(install_path)
@@ -44,13 +63,13 @@
 	# check python version
 	python_version = sys.version.split(" ")[0]
 	print "Python Version =", python_version
-	if not (python_version and int(python_version.split(".")[0])==2 and int(python_version.split(".")[1]) >= 6):
-		raise Exception, "Hey! ERPNext needs Python version to be 2.6+"
+	if not (python_version and int(python_version.split(".")[0])==2 and int(python_version.split(".")[1]) >= 7):
+		raise Exception, "Hey! ERPNext needs Python version to be 2.7+"
 	
 	# check distribution
 	distribution = platform.linux_distribution()[0].lower().replace('"', '')
 	print "Distribution = ", distribution
-	is_redhat = distribution in ("redhat", "centos", "centos linux", "fedora")
+	is_redhat = distribution in ("redhat", "red hat enterprise linux server", "centos", "centos linux", "fedora")
 	is_debian = distribution in ("debian", "ubuntu", "elementary os", "linuxmint")
 	
 	if not (is_redhat or is_debian):
@@ -59,7 +78,7 @@
 	return is_redhat, is_debian
 		
 def install_using_yum():
-	packages = "python python-setuptools gcc python-devel MySQL-python httpd git memcached ntp vim-enhanced screen"
+	packages = "python python-setuptools gcc python-devel MySQL-python git memcached ntp vim-enhanced screen"
 	
 	print "-"*80
 	print "Installing Packages: (This may take some time)"
@@ -92,28 +111,24 @@
 def update_config_for_redhat():
 	import re
 	
-	global apache_user
-	apache_user = "apache"
-	
-	# update memcache user
-	with open("/etc/sysconfig/memcached", "r") as original:
-		memcached_conf = original.read()
-	with open("/etc/sysconfig/memcached", "w") as modified:
-		modified.write(re.sub('USER.*', 'USER="%s"' % apache_user,  memcached_conf))
-	
 	# set to autostart on startup
-	for service in ("mysqld", "httpd", "memcached", "ntpd"):
+	for service in ("mysqld", "memcached", "ntpd"):
 		exec_in_shell("chkconfig --level 2345 %s on" % service)
 		exec_in_shell("service %s restart" % service)
 	
 def install_using_apt():
 	exec_in_shell("apt-get update")
-	packages = "python python-setuptools python-dev build-essential python-pip python-mysqldb apache2 git memcached ntp vim screen htop"
+	packages = "python python-setuptools python-dev build-essential python-pip python-mysqldb git memcached ntp vim screen htop"
 	print "-"*80
 	print "Installing Packages: (This may take some time)"
 	print packages
 	print "-"*80
 	exec_in_shell("apt-get install -y %s" % packages)
+	global root_password
+	if not root_password:
+		root_password = get_root_password()
+	exec_in_shell("echo mysql-server mysql-server/root_password password %s | sudo debconf-set-selections" % root_password)
+	exec_in_shell("echo mysql-server mysql-server/root_password_again password %s | sudo debconf-set-selections" % root_password)
 	
 	if not exec_in_shell("which mysql"):
 		packages = "mysql-server libmysqlclient-dev"
@@ -123,26 +138,12 @@
 	update_config_for_debian()
 	
 def update_config_for_debian():
-	global apache_user
-	apache_user = "www-data"
-
-	# update memcache user
-	with open("/etc/memcached.conf", "r") as original:
-		memcached_conf = original.read()
-	with open("/etc/memcached.conf", "w") as modified:
-		modified.write(memcached_conf.replace("-u memcache", "-u %s" % apache_user))
-	
-	exec_in_shell("a2enmod rewrite")
-	
-	for service in ("mysql", "apache2", "memcached", "ntpd"):
+	for service in ("mysql", "ntpd"):
 		exec_in_shell("service %s restart" % service)
 	
 def install_python_modules():
-	python_modules = "pytz python-dateutil jinja2 markdown2 termcolor python-memcached requests chardet dropbox google-api-python-client pygeoip"
-
 	print "-"*80
 	print "Installing Python Modules: (This may take some time)"
-	print python_modules
 	print "-"*80
 	
 	if not exec_in_shell("which pip"):
@@ -151,7 +152,7 @@
 	exec_in_shell("pip install --upgrade pip")
 	exec_in_shell("pip install --upgrade setuptools")
 	exec_in_shell("pip install --upgrade virtualenv")
-	exec_in_shell("pip install -q %s" % python_modules)
+	exec_in_shell("pip install {}".format(' '.join(requirements)))
 	
 def install_erpnext(install_path):
 	print
@@ -169,20 +170,16 @@
 	if not db_name:
 		raise Exception, "Sorry! You must specify ERPNext Database Name"
 	
-	# install folders and conf
-	setup_folders(install_path)
-	setup_conf(install_path, db_name)
-	
 	# setup paths
-	sys.path.extend([".", "lib", "app"])
+	sys.path = [".", "lib", "app"] + sys.path
+	import wnf
 	
 	# install database, run patches, update schema
-	setup_db(install_path, root_password, db_name)
-	
+	# setup_db(install_path, root_password, db_name)
+	wnf.install(db_name, root_password=root_password)
+
 	setup_cron(install_path)
 	
-	setup_apache_conf(install_path)
-	
 def get_root_password():
 	# ask for root mysql password
 	import getpass
@@ -197,6 +194,7 @@
 		raise Exception("Incorrect MySQL Root user's password")
 		
 def setup_folders(install_path):
+	os.chdir(install_path)
 	app = os.path.join(install_path, "app")
 	if not os.path.exists(app):
 		print "Cloning erpnext"
@@ -238,87 +236,8 @@
 	
 	return db_password
 	
-def setup_db(install_path, root_password, db_name):
-	from webnotes.install_lib.install import Installer
-	inst = Installer("root", root_password)
-	inst.import_from_db(db_name, verbose=1)
-
-	# run patches and sync
-	exec_in_shell("./lib/wnf.py --patch_sync_build")
-	
-def setup_cron(install_path):
-	erpnext_cron_entries = [
-		"*/3 * * * * cd %s && python lib/wnf.py --run_scheduler >> /var/log/erpnext-sch.log 2>&1" % install_path,
-		"0 */6 * * * cd %s && python lib/wnf.py --backup >> /var/log/erpnext-backup.log 2>&1" % install_path
-		]
-	
-	for row in erpnext_cron_entries:
-		try:
-			existing_cron = exec_in_shell("crontab -l")
-			if row not in existing_cron:
-				exec_in_shell('{ crontab -l; echo "%s"; } | crontab' % row)
-		except:
-			exec_in_shell('echo "%s" | crontab' % row)
-	
-def setup_apache_conf(install_path):
-	apache_conf_content = """Listen 8080
-NameVirtualHost *:8080
-<VirtualHost *:8080>
-	ServerName localhost
-	DocumentRoot %s/public/
-	
-	AddHandler cgi-script .cgi .xml .py
-	AddType application/vnd.ms-fontobject .eot
-	AddType font/ttf .ttf
-	AddType font/otf .otf
-	AddType application/x-font-woff .woff
-
-	<Directory %s/public/>
-		# directory specific options
-		Options -Indexes +FollowSymLinks +ExecCGI
-	
-		# directory's index file
-		DirectoryIndex web.py
-		
-		AllowOverride all
-		Order Allow,Deny
-		Allow from all
-
-		# rewrite rule
-		RewriteEngine on
-		RewriteCond %%{REQUEST_FILENAME} !-f
-		RewriteCond %%{REQUEST_FILENAME} !-d
-		RewriteCond %%{REQUEST_FILENAME} !-l
-		RewriteRule ^([^/]+)$ /web.py?page=$1 [QSA,L]
-	</Directory>
-</VirtualHost>""" % (install_path, install_path)
-	
-	new_apache_conf_path = os.path.join(install_path, os.path.basename(install_path)+".conf")
-	with open(new_apache_conf_path, "w") as apache_conf_file:
-		apache_conf_file.write(apache_conf_content)
-
 def post_install(install_path):
-	global apache_user
-	exec_in_shell("chown -R %s %s" % (apache_user, install_path))
-	
-	apache_conf_filename = os.path.basename(install_path)+".conf"
-	if is_redhat:
-		os.symlink(os.path.join(install_path, apache_conf_filename), 
-			os.path.join("/etc/httpd/conf.d", apache_conf_filename))
-		exec_in_shell("service httpd restart")
-		
-	elif is_debian:
-		os.symlink(os.path.join(install_path, apache_conf_filename), 
-			os.path.join("/etc/apache2/sites-enabled", apache_conf_filename))
-		exec_in_shell("service apache2 restart")
-	
-	print
-	print "-"*80
-	print "To change url domain, run: lib/wnf.py --domain example.com"
-	print "-"*80
-	print "Installation complete"
-	print "Open your browser and go to http://localhost:8080"
-	print "Login using username = Administrator and password = admin"
+	pass
 
 def exec_in_shell(cmd):
 	# using Popen instead of os.system - as recommended by python docs
@@ -346,5 +265,65 @@
 
 	return out
 
+def parse_args():
+	parser = argparse.ArgumentParser()
+	parser.add_argument('--create_user', default=False, action='store_true')
+	parser.add_argument('--username', default='erpnext')
+	parser.add_argument('--password', default='erpnext')
+	parser.add_argument('--no_install_prerequisites', default=False, action='store_true')
+	return parser.parse_args()
+
+def create_user(username, password):
+	import subprocess, pwd
+	p = subprocess.Popen("useradd -m -d /home/{username} -s {shell} {username}".format(username=username, shell=os.environ.get('SHELL')).split())
+	p.wait()
+	p = subprocess.Popen("passwd {username}".format(username=username).split(), stdin=subprocess.PIPE)
+	p.communicate('{password}\n{password}\n'.format(password=password))
+	p.wait()
+	return pwd.getpwnam(username).pw_uid
+
+def setup_cron(install_path):
+	erpnext_cron_entries = [
+		"*/3 * * * * cd %s && python2.7 lib/wnf.py --run_scheduler >> erpnext-sch.log 2>&1" % install_path,
+		"0 */6 * * * cd %s && python2.7 lib/wnf.py --backup >> erpnext-backup.log 2>&1" % install_path
+		]
+	for row in erpnext_cron_entries:
+		try:
+			existing_cron = exec_in_shell("crontab -l")
+			if row not in existing_cron:
+				exec_in_shell('{ crontab -l; echo "%s"; } | crontab' % row)
+		except:
+			exec_in_shell('echo "%s" | crontab' % row)
+
 if __name__ == "__main__":
-	install()
+	args = parse_args()
+	install_path = os.getcwd()
+	if os.getuid() != 0 and args.create_user and not args.no_install_prequisites:
+		raise Exception, "Please run this script as root"
+
+	if args.create_user:
+		uid = create_user(args.username, args.password)
+		install_path = '/home/{username}/erpnext'.format(username=args.username)
+
+	if not args.no_install_prerequisites:
+		install_pre_requisites()
+
+	if os.environ.get('SUDO_UID') and not args.create_user:
+		os.setuid(int(os.environ.get('SUDO_UID')))
+	
+	if os.getuid() == 0 and args.create_user:
+		os.setuid(uid)
+		if install_path:
+			os.mkdir(install_path)
+	
+	install(install_path=install_path)
+	print
+	print "-"*80
+	print "Installation complete"
+	print "To start the development server,"
+	print "Login as {username} with password {password}".format(username=args.username, password=args.password)
+	print "cd {}".format(install_path)
+	print "./lib/wnf.py --serve"
+	print "-"*80
+	print "Open your browser and go to http://localhost:8000"
+	print "Login using username = Administrator and password = admin"
diff --git a/manufacturing/doctype/bom/bom.js b/manufacturing/doctype/bom/bom.js
index badb108..64298a9 100644
--- a/manufacturing/doctype/bom/bom.js
+++ b/manufacturing/doctype/bom/bom.js
@@ -1,4 +1,4 @@
-// Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+// Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 // License: GNU General Public License v3. See license.txt
 
 // On REFRESH
@@ -6,7 +6,7 @@
 	cur_frm.toggle_enable("item", doc.__islocal);
 	
 	if (!doc.__islocal && doc.docstatus<2) {
-		cur_frm.add_custom_button("Update Cost", cur_frm.cscript.update_cost);
+		cur_frm.add_custom_button(wn._("Update Cost"), cur_frm.cscript.update_cost);
 	}
 	
 	cur_frm.cscript.with_operations(doc);
@@ -123,7 +123,7 @@
 cur_frm.cscript.rate = function(doc, cdt, cdn) {
 	var d = locals[cdt][cdn];
 	if (d.bom_no) {
-		msgprint("You can not change rate if BOM mentioned agianst any item");
+		msgprint(wn._("You can not change rate if BOM mentioned agianst any item"));
 		get_bom_material_detail(doc, cdt, cdn);
 	} else {
 		calculate_rm_cost(doc);
diff --git a/manufacturing/doctype/bom/bom.py b/manufacturing/doctype/bom/bom.py
index c3dd724..7b647a7 100644
--- a/manufacturing/doctype/bom/bom.py
+++ b/manufacturing/doctype/bom/bom.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 # License: GNU General Public License v3. See license.txt
 
 from __future__ import unicode_literals
@@ -9,7 +9,6 @@
 from webnotes.model.code import get_obj
 from webnotes import msgprint, _
 
-sql = webnotes.conn.sql
 
 
 class DocType:
@@ -18,7 +17,7 @@
 		self.doclist = doclist
 
 	def autoname(self):
-		last_name = sql("""select max(name) from `tabBOM` 
+		last_name = webnotes.conn.sql("""select max(name) from `tabBOM` 
 			where name like "BOM/%s/%%" """ % cstr(self.doc.item).replace('"', '\\"'))
 		if last_name:
 			idx = cint(cstr(last_name[0][0]).split('/')[-1].split('-')[0]) + 1
@@ -144,7 +143,7 @@
 			webnotes.bean(self.doclist).update_after_submit()
 
 	def get_bom_unitcost(self, bom_no):
-		bom = sql("""select name, total_cost/quantity as unit_cost from `tabBOM`
+		bom = webnotes.conn.sql("""select name, total_cost/quantity as unit_cost from `tabBOM`
 			where is_active = 1 and name = %s""", bom_no, as_dict=1)
 		return bom and bom[0]['unit_cost'] or 0
 
@@ -156,7 +155,7 @@
 		from stock.utils import get_incoming_rate
 		dt = self.doc.costing_date or nowdate()
 		time = self.doc.costing_date == nowdate() and now().split()[1] or '23:59'
-		warehouse = sql("select warehouse from `tabBin` where item_code = %s", args['item_code'])
+		warehouse = webnotes.conn.sql("select warehouse from `tabBin` where item_code = %s", args['item_code'])
 		rate = []
 		for wh in warehouse:
 			r = get_incoming_rate({
@@ -184,7 +183,7 @@
 			if not self.doc.is_active:
 				webnotes.conn.set(self.doc, "is_default", 0)
 			
-			sql("update `tabItem` set default_bom = null where name = %s and default_bom = %s", 
+			webnotes.conn.sql("update `tabItem` set default_bom = null where name = %s and default_bom = %s", 
 				 (self.doc.item, self.doc.name))
 
 	def clear_operations(self):
@@ -250,7 +249,7 @@
 
 	def validate_bom_no(self, item, bom_no, idx):
 		"""Validate BOM No of sub-contracted items"""
-		bom = sql("""select name from `tabBOM` where name = %s and item = %s 
+		bom = webnotes.conn.sql("""select name from `tabBOM` where name = %s and item = %s 
 			and is_active=1 and docstatus=1""", 
 			(bom_no, item), as_dict =1)
 		if not bom:
@@ -272,7 +271,7 @@
 		for d in check_list:
 			bom_list, count = [self.doc.name], 0
 			while (len(bom_list) > count ):
-				boms = sql(" select %s from `tabBOM Item` where %s = '%s' " % 
+				boms = webnotes.conn.sql(" select %s from `tabBOM Item` where %s = '%s' " % 
 					(d[0], d[1], cstr(bom_list[count])))
 				count = count + 1
 				for b in boms:
@@ -333,6 +332,7 @@
 			d.amount = flt(d.rate) * flt(d.qty)
 			d.qty_consumed_per_unit = flt(d.qty) / flt(self.doc.quantity)
 			total_rm_cost += d.amount
+			
 		self.doc.raw_material_cost = total_rm_cost
 
 	def update_exploded_items(self):
@@ -364,7 +364,7 @@
 	def get_child_exploded_items(self, bom_no, qty):
 		""" Add all items from Flat BOM of child BOM"""
 		
-		child_fb_items = sql("""select item_code, description, stock_uom, qty, rate, 
+		child_fb_items = webnotes.conn.sql("""select item_code, description, stock_uom, qty, rate, 
 			qty_consumed_per_unit from `tabBOM Explosion Item` 
 			where parent = %s and docstatus = 1""", bom_no, as_dict = 1)
 			
@@ -390,12 +390,12 @@
 			ch.save(1)
 
 	def get_parent_bom_list(self, bom_no):
-		p_bom = sql("select parent from `tabBOM Item` where bom_no = '%s'" % bom_no)
+		p_bom = webnotes.conn.sql("select parent from `tabBOM Item` where bom_no = '%s'" % bom_no)
 		return p_bom and [i[0] for i in p_bom] or []
 
 	def validate_bom_links(self):
 		if not self.doc.is_active:
-			act_pbom = sql("""select distinct bom_item.parent from `tabBOM Item` bom_item
+			act_pbom = webnotes.conn.sql("""select distinct bom_item.parent from `tabBOM Item` bom_item
 				where bom_item.bom_no = %s and bom_item.docstatus = 1
 				and exists (select * from `tabBOM` where name = bom_item.parent
 					and docstatus = 1 and is_active = 1)""", self.doc.name)
@@ -403,4 +403,56 @@
 			if act_pbom and act_pbom[0][0]:
 				action = self.doc.docstatus < 2 and _("deactivate") or _("cancel")
 				msgprint(_("Cannot ") + action + _(": It is linked to other active BOM(s)"),
-					raise_exception=1)
\ No newline at end of file
+					raise_exception=1)
+
+def get_bom_items_as_dict(bom, qty=1, fetch_exploded=1):
+	item_dict = {}
+		
+	query = """select 
+				bom_item.item_code,
+				item.item_name,
+				ifnull(sum(bom_item.qty_consumed_per_unit),0) * %(qty)s as qty, 
+				item.description, 
+				item.stock_uom,
+				item.default_warehouse,
+				item.purchase_account as expense_account,
+				item.cost_center
+			from 
+				`tab%(table)s` bom_item, `tabItem` item 
+			where 
+				bom_item.docstatus < 2 
+				and bom_item.parent = "%(bom)s"
+				and item.name = bom_item.item_code 
+				%(conditions)s
+				group by item_code, stock_uom"""
+	
+	if fetch_exploded:
+		items = webnotes.conn.sql(query % {
+			"qty": qty,
+			"table": "BOM Explosion Item",
+			"bom": bom,
+			"conditions": """and ifnull(item.is_pro_applicable, 'No') = 'No'
+					and ifnull(item.is_sub_contracted_item, 'No') = 'No' """
+		}, as_dict=True)
+	else:
+		items = webnotes.conn.sql(query % {
+			"qty": qty,
+			"table": "BOM Item",
+			"bom": bom,
+			"conditions": ""
+		}, as_dict=True)
+
+	# make unique
+	for item in items:
+		if item_dict.has_key(item.item_code):
+			item_dict[item.item_code]["qty"] += flt(item.qty)
+		else:
+			item_dict[item.item_code] = item
+		
+	return item_dict
+
+@webnotes.whitelist()
+def get_bom_items(bom, qty=1, fetch_exploded=1):
+	items = get_bom_items_as_dict(bom, qty, fetch_exploded).values()
+	items.sort(lambda a, b: a.item_code > b.item_code and 1 or -1)
+	return items
diff --git a/manufacturing/doctype/bom/bom.txt b/manufacturing/doctype/bom/bom.txt
index 425e9ac..9f69cb0 100644
--- a/manufacturing/doctype/bom/bom.txt
+++ b/manufacturing/doctype/bom/bom.txt
@@ -2,7 +2,7 @@
  {
   "creation": "2013-01-22 15:11:38", 
   "docstatus": 0, 
-  "modified": "2013-08-09 14:47:25", 
+  "modified": "2013-11-02 14:23:28", 
   "modified_by": "Administrator", 
   "owner": "Administrator"
  }, 
@@ -113,7 +113,6 @@
  }, 
  {
   "depends_on": "eval:doc.rm_cost_as_per===\"Price List\"", 
-  "description": "Price List for Costing", 
   "doctype": "DocField", 
   "fieldname": "buying_price_list", 
   "fieldtype": "Link", 
diff --git a/manufacturing/doctype/bom/test_bom.py b/manufacturing/doctype/bom/test_bom.py
index d0b394a..7917ab3 100644
--- a/manufacturing/doctype/bom/test_bom.py
+++ b/manufacturing/doctype/bom/test_bom.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 # License: GNU General Public License v3. See license.txt
 
 
@@ -10,6 +10,35 @@
 	[
 		{
 			"doctype": "BOM", 
+			"item": "_Test Item Home Desktop Manufactured", 
+			"quantity": 1.0,
+			"is_active": 1,
+			"is_default": 1,
+			"docstatus": 1
+		}, 
+		{
+			"doctype": "BOM Item", 
+			"item_code": "_Test Serialized Item With Series", 
+			"parentfield": "bom_materials", 
+			"qty": 1.0, 
+			"rate": 5000.0, 
+			"amount": 5000.0, 
+			"stock_uom": "_Test UOM"
+		}, 
+		{
+			"doctype": "BOM Item", 
+			"item_code": "_Test Item 2", 
+			"parentfield": "bom_materials", 
+			"qty": 2.0, 
+			"rate": 1000.0,
+			"amount": 2000.0,
+			"stock_uom": "_Test UOM"
+		}
+	],
+
+	[
+		{
+			"doctype": "BOM", 
 			"item": "_Test FG Item", 
 			"quantity": 1.0,
 			"is_active": 1,
@@ -34,5 +63,57 @@
 			"amount": 2000.0,
 			"stock_uom": "_Test UOM"
 		}
-	]
-]
\ No newline at end of file
+	],
+	
+	[
+		{
+			"doctype": "BOM", 
+			"item": "_Test FG Item 2", 
+			"quantity": 1.0,
+			"is_active": 1,
+			"is_default": 1,
+			"docstatus": 1
+		}, 
+		{
+			"doctype": "BOM Item", 
+			"item_code": "_Test Item", 
+			"parentfield": "bom_materials", 
+			"qty": 1.0, 
+			"rate": 5000.0, 
+			"amount": 5000.0, 
+			"stock_uom": "_Test UOM"
+		}, 
+		{
+			"doctype": "BOM Item", 
+			"item_code": "_Test Item Home Desktop Manufactured", 
+			"bom_no": "BOM/_Test Item Home Desktop Manufactured/001",
+			"parentfield": "bom_materials", 
+			"qty": 2.0, 
+			"rate": 1000.0,
+			"amount": 2000.0,
+			"stock_uom": "_Test UOM"
+		}
+	],
+]
+
+class TestBOM(unittest.TestCase):
+	def test_get_items(self):
+		from manufacturing.doctype.bom.bom import get_bom_items_as_dict
+		items_dict = get_bom_items_as_dict(bom="BOM/_Test FG Item 2/001", qty=1, fetch_exploded=0)
+		self.assertTrue(test_records[2][1]["item_code"] in items_dict)
+		self.assertTrue(test_records[2][2]["item_code"] in items_dict)
+		self.assertEquals(len(items_dict.values()), 2)
+		
+	def test_get_items_exploded(self):
+		from manufacturing.doctype.bom.bom import get_bom_items_as_dict
+		items_dict = get_bom_items_as_dict(bom="BOM/_Test FG Item 2/001", qty=1, fetch_exploded=1)
+		self.assertTrue(test_records[2][1]["item_code"] in items_dict)
+		self.assertFalse(test_records[2][2]["item_code"] in items_dict)
+		self.assertTrue(test_records[0][1]["item_code"] in items_dict)
+		self.assertTrue(test_records[0][2]["item_code"] in items_dict)
+		self.assertEquals(len(items_dict.values()), 3)
+		
+	def test_get_items_list(self):
+		from manufacturing.doctype.bom.bom import get_bom_items
+		self.assertEquals(len(get_bom_items(bom="BOM/_Test FG Item 2/001", qty=1, fetch_exploded=1)), 3)
+
diff --git a/manufacturing/doctype/bom_explosion_item/bom_explosion_item.py b/manufacturing/doctype/bom_explosion_item/bom_explosion_item.py
index 26d0f76..cb6190f 100644
--- a/manufacturing/doctype/bom_explosion_item/bom_explosion_item.py
+++ b/manufacturing/doctype/bom_explosion_item/bom_explosion_item.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 # License: GNU General Public License v3. See license.txt
 
 from __future__ import unicode_literals
diff --git a/manufacturing/doctype/bom_item/bom_item.py b/manufacturing/doctype/bom_item/bom_item.py
index 26d0f76..cb6190f 100644
--- a/manufacturing/doctype/bom_item/bom_item.py
+++ b/manufacturing/doctype/bom_item/bom_item.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 # License: GNU General Public License v3. See license.txt
 
 from __future__ import unicode_literals
diff --git a/manufacturing/doctype/bom_operation/bom_operation.py b/manufacturing/doctype/bom_operation/bom_operation.py
index 26d0f76..cb6190f 100644
--- a/manufacturing/doctype/bom_operation/bom_operation.py
+++ b/manufacturing/doctype/bom_operation/bom_operation.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 # License: GNU General Public License v3. See license.txt
 
 from __future__ import unicode_literals
diff --git a/manufacturing/doctype/bom_replace_tool/bom_replace_tool.js b/manufacturing/doctype/bom_replace_tool/bom_replace_tool.js
index 8b37f32..3bf31f9 100644
--- a/manufacturing/doctype/bom_replace_tool/bom_replace_tool.js
+++ b/manufacturing/doctype/bom_replace_tool/bom_replace_tool.js
@@ -1,4 +1,4 @@
-// Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+// Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 // License: GNU General Public License v3. See license.txt
 
 
diff --git a/manufacturing/doctype/bom_replace_tool/bom_replace_tool.py b/manufacturing/doctype/bom_replace_tool/bom_replace_tool.py
index dae4dea..b3d1ae4 100644
--- a/manufacturing/doctype/bom_replace_tool/bom_replace_tool.py
+++ b/manufacturing/doctype/bom_replace_tool/bom_replace_tool.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 # License: GNU General Public License v3. See license.txt
 
 from __future__ import unicode_literals
diff --git a/manufacturing/doctype/production_order/production_order.js b/manufacturing/doctype/production_order/production_order.js
index f680776..2277262 100644
--- a/manufacturing/doctype/production_order/production_order.js
+++ b/manufacturing/doctype/production_order/production_order.js
@@ -1,4 +1,4 @@
-// Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+// Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 // License: GNU General Public License v3. See license.txt
 
 cur_frm.cscript.onload = function(doc, dt, dn) {
@@ -13,7 +13,7 @@
 	cfn_set_fields(doc, dt, dn);
 
 	if(doc.docstatus===0 && !doc.__islocal) {
-		cur_frm.set_intro("Submit this Production Order for further processing.");
+		cur_frm.set_intro(wn._("Submit this Production Order for further processing."));
 	} else if(doc.docstatus===1) {
 		var percent = flt(doc.produced_qty) / flt(doc.qty) * 100;
 		cur_frm.dashboard.add_progress(cint(percent) + "% " + wn._("Complete"), percent);
@@ -27,13 +27,13 @@
 var cfn_set_fields = function(doc, dt, dn) {
 	if (doc.docstatus == 1) {
 		if (doc.status != 'Stopped' && doc.status != 'Completed')
-		cur_frm.add_custom_button('Stop!', cur_frm.cscript['Stop Production Order']);
+		cur_frm.add_custom_button(wn._('Stop!'), cur_frm.cscript['Stop Production Order'], "icon-exclamation");
 		else if (doc.status == 'Stopped')
-			cur_frm.add_custom_button('Unstop', cur_frm.cscript['Unstop Production Order']);
+			cur_frm.add_custom_button(wn._('Unstop'), cur_frm.cscript['Unstop Production Order'], "icon-check");
 
 		if (doc.status == 'Submitted' || doc.status == 'Material Transferred' || doc.status == 'In Process'){
-			cur_frm.add_custom_button('Transfer Raw Materials', cur_frm.cscript['Transfer Raw Materials']);
-			cur_frm.add_custom_button('Update Finished Goods', cur_frm.cscript['Update Finished Goods']);
+			cur_frm.add_custom_button(wn._('Transfer Raw Materials'), cur_frm.cscript['Transfer Raw Materials']);
+			cur_frm.add_custom_button(wn._('Update Finished Goods'), cur_frm.cscript['Update Finished Goods']);
 		} 
 	}
 }
@@ -47,7 +47,7 @@
 
 cur_frm.cscript['Stop Production Order'] = function() {
 	var doc = cur_frm.doc;
-	var check = confirm("Do you really want to stop production order: " + doc.name);
+	var check = confirm(wn._("Do you really want to stop production order: " + doc.name));
 	if (check) {
 		return $c_obj(make_doclist(doc.doctype, doc.name), 'stop_unstop', 'Stopped', function(r, rt) {cur_frm.refresh();});
 	}
@@ -55,7 +55,7 @@
 
 cur_frm.cscript['Unstop Production Order'] = function() {
 	var doc = cur_frm.doc;
-	var check = confirm("Do really want to unstop production order: " + doc.name);
+	var check = confirm(wn._("Do really want to unstop production order: " + doc.name));
 	if (check)
 			return $c_obj(make_doclist(doc.doctype, doc.name), 'stop_unstop', 'Unstopped', function(r, rt) {cur_frm.refresh();});
 }
@@ -105,5 +105,5 @@
 			query:"controllers.queries.bom",
 			filters: {item: cstr(doc.production_item)}
 		}
-	} else msgprint(" Please enter Production Item first");
+	} else msgprint(wn._("Please enter Production Item first"));
 });
\ No newline at end of file
diff --git a/manufacturing/doctype/production_order/production_order.py b/manufacturing/doctype/production_order/production_order.py
index dd21782..c5b2b04 100644
--- a/manufacturing/doctype/production_order/production_order.py
+++ b/manufacturing/doctype/production_order/production_order.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 # License: GNU General Public License v3. See license.txt
 
 from __future__ import unicode_literals
@@ -8,7 +8,6 @@
 from webnotes.model.code import get_obj
 from webnotes import msgprint, _
 
-sql = webnotes.conn.sql
 
 class OverProductionError(webnotes.ValidationError): pass
 
@@ -34,7 +33,7 @@
 		
 	def validate_bom_no(self):
 		if self.doc.bom_no:
-			bom = sql("""select name from `tabBOM` where name=%s and docstatus=1 
+			bom = webnotes.conn.sql("""select name from `tabBOM` where name=%s and docstatus=1 
 				and is_active=1 and item=%s"""
 				, (self.doc.bom_no, self.doc.production_item), as_dict =1)
 			if not bom:
@@ -70,7 +69,7 @@
 			where parent = %s and item_code = %s""", 
 			(self.doc.sales_order, self.doc.production_item))[0][0]
 		# get qty from Packing Item table
-		dnpi_qty = webnotes.conn.sql("""select sum(qty) from `tabDelivery Note Packing Item` 
+		dnpi_qty = webnotes.conn.sql("""select sum(qty) from `tabPacked Item` 
 			where parent = %s and parenttype = 'Sales Order' and item_code = %s""", 
 			(self.doc.sales_order, self.doc.production_item))[0][0]
 		# total qty in SO
@@ -112,7 +111,7 @@
 
 	def on_cancel(self):
 		# Check whether any stock entry exists against this Production Order
-		stock_entry = sql("""select name from `tabStock Entry` 
+		stock_entry = webnotes.conn.sql("""select name from `tabStock Entry` 
 			where production_order = %s and docstatus = 1""", self.doc.name)
 		if stock_entry:
 			msgprint("""Submitted Stock Entry %s exists against this production order. 
@@ -168,4 +167,4 @@
 		stock_entry.doc.to_warehouse = production_order.doc.fg_warehouse
 		
 	stock_entry.run_method("get_items")
-	return [d.fields for d in stock_entry.doclist]
\ No newline at end of file
+	return [d.fields for d in stock_entry.doclist]
diff --git a/manufacturing/doctype/production_order/production_order.txt b/manufacturing/doctype/production_order/production_order.txt
index 782c99f..85c7c83 100644
--- a/manufacturing/doctype/production_order/production_order.txt
+++ b/manufacturing/doctype/production_order/production_order.txt
@@ -2,11 +2,12 @@
  {
   "creation": "2013-01-10 16:34:16", 
   "docstatus": 0, 
-  "modified": "2013-08-08 14:22:12", 
+  "modified": "2013-11-02 14:05:44", 
   "modified_by": "Administrator", 
   "owner": "Administrator"
  }, 
  {
+  "allow_import": 1, 
   "autoname": "naming_series:", 
   "doctype": "DocType", 
   "icon": "icon-cogs", 
@@ -55,7 +56,7 @@
   "doctype": "DocField", 
   "fieldname": "naming_series", 
   "fieldtype": "Select", 
-  "label": "Document Numbering Series", 
+  "label": "Series", 
   "options": "\nPRO", 
   "reqd": 1
  }, 
diff --git a/manufacturing/doctype/production_order/test_production_order.py b/manufacturing/doctype/production_order/test_production_order.py
index 9a75762..5269729 100644
--- a/manufacturing/doctype/production_order/test_production_order.py
+++ b/manufacturing/doctype/production_order/test_production_order.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 # License: GNU General Public License v3. See license.txt
 
 
diff --git a/manufacturing/doctype/production_plan_item/production_plan_item.py b/manufacturing/doctype/production_plan_item/production_plan_item.py
index 26d0f76..cb6190f 100644
--- a/manufacturing/doctype/production_plan_item/production_plan_item.py
+++ b/manufacturing/doctype/production_plan_item/production_plan_item.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 # License: GNU General Public License v3. See license.txt
 
 from __future__ import unicode_literals
diff --git a/manufacturing/doctype/production_plan_sales_order/production_plan_sales_order.py b/manufacturing/doctype/production_plan_sales_order/production_plan_sales_order.py
index 26d0f76..cb6190f 100644
--- a/manufacturing/doctype/production_plan_sales_order/production_plan_sales_order.py
+++ b/manufacturing/doctype/production_plan_sales_order/production_plan_sales_order.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 # License: GNU General Public License v3. See license.txt
 
 from __future__ import unicode_literals
diff --git a/manufacturing/doctype/production_planning_tool/production_planning_tool.js b/manufacturing/doctype/production_planning_tool/production_planning_tool.js
index daa7013..870f01f 100644
--- a/manufacturing/doctype/production_planning_tool/production_planning_tool.js
+++ b/manufacturing/doctype/production_planning_tool/production_planning_tool.js
@@ -1,4 +1,4 @@
-// Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+// Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 // License: GNU General Public License v3. See license.txt
 
 cur_frm.cscript.onload = function(doc, cdt, cdn) {
@@ -44,7 +44,7 @@
 			query:"controllers.queries.bom",
 			filters:{'item': cstr(d.item_code)}
 		}
-	} else msgprint(" Please enter Item first");
+	} else msgprint(wn._("Please enter Item first"));
 }
 
 cur_frm.fields_dict.customer.get_query = function(doc,cdt,cdn) {
diff --git a/manufacturing/doctype/production_planning_tool/production_planning_tool.py b/manufacturing/doctype/production_planning_tool/production_planning_tool.py
index 766f2ac..f3626a3 100644
--- a/manufacturing/doctype/production_planning_tool/production_planning_tool.py
+++ b/manufacturing/doctype/production_planning_tool/production_planning_tool.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 # License: GNU General Public License v3. See license.txt
 
 from __future__ import unicode_literals
@@ -9,7 +9,6 @@
 from webnotes.model.code import get_obj
 from webnotes import msgprint, _
 
-sql = webnotes.conn.sql
 
 class DocType:
 	def __init__(self, doc, doclist=[]):
@@ -19,7 +18,7 @@
 
 	def get_so_details(self, so):
 		"""Pull other details from so"""
-		so = sql("""select transaction_date, customer, grand_total 
+		so = webnotes.conn.sql("""select transaction_date, customer, grand_total 
 			from `tabSales Order` where name = %s""", so, as_dict = 1)
 		ret = {
 			'sales_order_date': so and so[0]['transaction_date'] or '',
@@ -31,7 +30,7 @@
 	def get_item_details(self, item_code):
 		""" Pull other item details from item master"""
 
-		item = sql("""select description, stock_uom, default_bom 
+		item = webnotes.conn.sql("""select description, stock_uom, default_bom 
 			from `tabItem` where name = %s""", item_code, as_dict =1)
 		ret = {
 			'description'	: item and item[0]['description'],
@@ -63,7 +62,7 @@
 		if self.doc.fg_item:
 			item_filter += ' and item.name = "' + self.doc.fg_item + '"'
 		
-		open_so = sql("""
+		open_so = webnotes.conn.sql("""
 			select distinct so.name, so.transaction_date, so.customer, so.grand_total
 			from `tabSales Order` so, `tabSales Order Item` so_item
 			where so_item.parent = so.name
@@ -73,7 +72,7 @@
 				and (exists (select name from `tabItem` item where item.name=so_item.item_code
 					and (ifnull(item.is_pro_applicable, 'No') = 'Yes' 
 						or ifnull(item.is_sub_contracted_item, 'No') = 'Yes') %s)
-					or exists (select name from `tabDelivery Note Packing Item` dnpi
+					or exists (select name from `tabPacked Item` dnpi
 						where dnpi.parent = so.name and dnpi.parent_item = so_item.item_code
 							and exists (select name from `tabItem` item where item.name=dnpi.item_code
 								and (ifnull(item.is_pro_applicable, 'No') = 'Yes' 
@@ -108,7 +107,7 @@
 			msgprint("Please enter sales order in the above table")
 			return []
 			
-		items = sql("""select distinct parent, item_code, reserved_warehouse,
+		items = webnotes.conn.sql("""select distinct parent, item_code, reserved_warehouse,
 			(qty - ifnull(delivered_qty, 0)) as pending_qty
 			from `tabSales Order Item` so_item
 			where parent in (%s) and docstatus = 1 and ifnull(qty, 0) > ifnull(delivered_qty, 0)
@@ -117,10 +116,10 @@
 					or ifnull(item.is_sub_contracted_item, 'No') = 'Yes'))""" % \
 			(", ".join(["%s"] * len(so_list))), tuple(so_list), as_dict=1)
 		
-		dnpi_items = sql("""select distinct dnpi.parent, dnpi.item_code, dnpi.warehouse as reserved_warhouse,
+		dnpi_items = webnotes.conn.sql("""select distinct dnpi.parent, dnpi.item_code, dnpi.warehouse as reserved_warhouse,
 			(((so_item.qty - ifnull(so_item.delivered_qty, 0)) * dnpi.qty) / so_item.qty) 
 				as pending_qty
-			from `tabSales Order Item` so_item, `tabDelivery Note Packing Item` dnpi
+			from `tabSales Order Item` so_item, `tabPacked Item` dnpi
 			where so_item.parent = dnpi.parent and so_item.docstatus = 1 
 			and dnpi.parent_item = so_item.item_code
 			and so_item.parent in (%s) and ifnull(so_item.qty, 0) > ifnull(so_item.delivered_qty, 0)
@@ -136,7 +135,7 @@
 		self.clear_item_table()
 
 		for p in items:
-			item_details = sql("""select description, stock_uom, default_bom 
+			item_details = webnotes.conn.sql("""select description, stock_uom, default_bom 
 				from tabItem where name=%s""", p['item_code'])
 			pi = addchild(self.doc, 'pp_details', 'Production Plan Item', self.doclist)
 			pi.sales_order				= p['parent']
@@ -162,7 +161,7 @@
 			msgprint("Please enter bom no for item: %s at row no: %s" % 
 				(d.item_code, d.idx), raise_exception=1)
 		else:
-			bom = sql("""select name from `tabBOM` where name = %s and item = %s 
+			bom = webnotes.conn.sql("""select name from `tabBOM` where name = %s and item = %s 
 				and docstatus = 1 and is_active = 1""", 
 				(d.bom_no, d.item_code), as_dict = 1)
 			if not bom:
@@ -216,14 +215,14 @@
 			pro = webnotes.new_bean("Production Order")
 			pro.doc.fields.update(items[key])
 			
-			webnotes.mute_messages = True
+			webnotes.flags.mute_messages = True
 			try:
 				pro.insert()
 				pro_list.append(pro.doc.name)
 			except OverProductionError, e:
 				pass
 				
-			webnotes.mute_messages = False
+			webnotes.flags.mute_messages = False
 			
 		return pro_list
 
@@ -243,7 +242,7 @@
 		for bom in bom_dict:
 			if self.doc.use_multi_level_bom:
 				# get all raw materials with sub assembly childs					
-				fl_bom_items = sql("""select fb.item_code, 
+				fl_bom_items = webnotes.conn.sql("""select fb.item_code, 
 					ifnull(sum(fb.qty_consumed_per_unit), 0)*%s as qty, 
 					fb.description, fb.stock_uom, it.min_order_qty 
 					from `tabBOM Explosion Item` fb,`tabItem` it 
@@ -254,7 +253,7 @@
 			else:
 				# Get all raw materials considering SA items as raw materials, 
 				# so no childs of SA items
-				fl_bom_items = sql("""select bom_item.item_code, 
+				fl_bom_items = webnotes.conn.sql("""select bom_item.item_code, 
 						ifnull(sum(bom_item.qty_consumed_per_unit), 0) * %s, 
 						bom_item.description, bom_item.stock_uom, item.min_order_qty
 					from `tabBOM Item` bom_item, tabItem item
@@ -274,7 +273,7 @@
 		 	'Quantity Requested for Purchase', 'Ordered Qty', 'Actual Qty']]
 		for d in self.item_dict:
 			item_list.append([d, self.item_dict[d][1], self.item_dict[d][2], self.item_dict[d][0]])
-			item_qty= sql("""select warehouse, indented_qty, ordered_qty, actual_qty 
+			item_qty= webnotes.conn.sql("""select warehouse, indented_qty, ordered_qty, actual_qty 
 				from `tabBin` where item_code = %s""", d)
 			i_qty, o_qty, a_qty = 0, 0, 0
 			for w in item_qty:
@@ -341,7 +340,6 @@
 						"company": self.doc.company,
 						"fiscal_year": fiscal_year,
 						"requested_by": webnotes.session.user,
-						"remark": "Automatically raised from Production Planning Tool",
 						"material_request_type": "Purchase"
 					},
 					{
diff --git a/manufacturing/doctype/workstation/workstation.js b/manufacturing/doctype/workstation/workstation.js
index e8c3c69..6271a16 100644
--- a/manufacturing/doctype/workstation/workstation.js
+++ b/manufacturing/doctype/workstation/workstation.js
@@ -1,4 +1,4 @@
-// Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+// Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 // License: GNU General Public License v3. See license.txt
 
  
diff --git a/manufacturing/doctype/workstation/workstation.py b/manufacturing/doctype/workstation/workstation.py
index 35e2c1f..fce16a5 100644
--- a/manufacturing/doctype/workstation/workstation.py
+++ b/manufacturing/doctype/workstation/workstation.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 # License: GNU General Public License v3. See license.txt
 
 from __future__ import unicode_literals
@@ -8,7 +8,6 @@
 from webnotes.model import db_exists
 from webnotes.model.bean import copy_doclist
 
-sql = webnotes.conn.sql
 	
 
 
@@ -18,9 +17,9 @@
     self.doclist = doclist
 
   def update_bom_operation(self):
-      bom_list = sql(" select DISTINCT parent from `tabBOM Operation` where workstation = '%s'" % self.doc.name)
+      bom_list = webnotes.conn.sql(" select DISTINCT parent from `tabBOM Operation` where workstation = '%s'" % self.doc.name)
       for bom_no in bom_list:
-        sql("update `tabBOM Operation` set hour_rate = '%s' where parent = '%s' and workstation = '%s'"%( self.doc.hour_rate, bom_no[0], self.doc.name))
+        webnotes.conn.sql("update `tabBOM Operation` set hour_rate = '%s' where parent = '%s' and workstation = '%s'"%( self.doc.hour_rate, bom_no[0], self.doc.name))
   
   def on_update(self):
     webnotes.conn.set(self.doc, 'overhead', flt(self.doc.hour_rate_electricity) + flt(self.doc.hour_rate_consumable) + flt(self.doc.hour_rate_rent))
diff --git a/manufacturing/doctype/workstation/workstation.txt b/manufacturing/doctype/workstation/workstation.txt
index 038e2c9..c9114ff 100644
--- a/manufacturing/doctype/workstation/workstation.txt
+++ b/manufacturing/doctype/workstation/workstation.txt
@@ -2,7 +2,7 @@
  {
   "creation": "2013-01-10 16:34:17", 
   "docstatus": 0, 
-  "modified": "2013-07-05 15:04:25", 
+  "modified": "2013-10-28 15:42:38", 
   "modified_by": "Administrator", 
   "owner": "Administrator"
  }, 
@@ -44,15 +44,6 @@
  }, 
  {
   "doctype": "DocField", 
-  "fieldname": "trash_reason", 
-  "fieldtype": "Small Text", 
-  "label": "Trash Reason", 
-  "oldfieldname": "trash_reason", 
-  "oldfieldtype": "Small Text", 
-  "read_only": 1
- }, 
- {
-  "doctype": "DocField", 
   "fieldname": "workstation_name", 
   "fieldtype": "Data", 
   "label": "Workstation Name", 
@@ -113,30 +104,33 @@
   "doctype": "DocField", 
   "fieldname": "over_heads", 
   "fieldtype": "Section Break", 
-  "label": "Over Heads", 
+  "label": "Overheads", 
   "oldfieldtype": "Section Break"
  }, 
  {
+  "description": "Electricity cost per hour", 
   "doctype": "DocField", 
   "fieldname": "hour_rate_electricity", 
   "fieldtype": "Float", 
-  "label": "Hour Rate Electricity", 
+  "label": "Electricity Cost", 
   "oldfieldname": "hour_rate_electricity", 
   "oldfieldtype": "Currency"
  }, 
  {
+  "description": "Consumable cost per hour", 
   "doctype": "DocField", 
   "fieldname": "hour_rate_consumable", 
   "fieldtype": "Float", 
-  "label": "Hour Rate Consumable", 
+  "label": "Consumable Cost", 
   "oldfieldname": "hour_rate_consumable", 
   "oldfieldtype": "Currency"
  }, 
  {
+  "description": "Rent per hour", 
   "doctype": "DocField", 
   "fieldname": "hour_rate_rent", 
   "fieldtype": "Float", 
-  "label": "Hour Rate Rent", 
+  "label": "Rent Cost", 
   "oldfieldname": "hour_rate_rent", 
   "oldfieldtype": "Currency"
  }, 
diff --git a/manufacturing/page/manufacturing_home/manufacturing_home.js b/manufacturing/page/manufacturing_home/manufacturing_home.js
index a2a4eaa..847f8e8 100644
--- a/manufacturing/page/manufacturing_home/manufacturing_home.js
+++ b/manufacturing/page/manufacturing_home/manufacturing_home.js
@@ -1,4 +1,4 @@
-// Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+// Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 // License: GNU General Public License v3. See license.txt"
 
 wn.module_page["Manufacturing"] = [
diff --git a/patches/november_2013/__init__.py b/patches/1311/__init__.py
similarity index 100%
rename from patches/november_2013/__init__.py
rename to patches/1311/__init__.py
diff --git a/patches/1311/p01_cleanup.py b/patches/1311/p01_cleanup.py
new file mode 100644
index 0000000..04d8f6a
--- /dev/null
+++ b/patches/1311/p01_cleanup.py
@@ -0,0 +1,24 @@
+# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
+# License: GNU General Public License v3. See license.txt
+
+from __future__ import unicode_literals
+import webnotes
+
+def execute():
+	webnotes.reload_doc("stock", "doctype", "material_request")
+	webnotes.reload_doc("buying", "doctype", "purchase_order")
+	webnotes.reload_doc("selling", "doctype", "lead")
+
+	from core.doctype.custom_field.custom_field import create_custom_field_if_values_exist
+	
+	create_custom_field_if_values_exist("Material Request", 
+		{"fieldtype":"Text", "fieldname":"remark", "label":"Remarks","insert_after":"Fiscal Year"})
+	create_custom_field_if_values_exist("Purchase Order", 
+		{"fieldtype":"Text", "fieldname":"instructions", "label":"Instructions","insert_after":"% Billed"})		
+	create_custom_field_if_values_exist("Purchase Order", 
+		{"fieldtype":"Text", "fieldname":"remarks", "label":"Remarks","insert_after":"% Billed"})
+	create_custom_field_if_values_exist("Purchase Order", 
+		{"fieldtype":"Text", "fieldname":"payment_terms", "label":"Payment Terms","insert_after":"Print Heading"})		
+	create_custom_field_if_values_exist("Lead", 
+		{"fieldtype":"Text", "fieldname":"remark", "label":"Remark","insert_after":"Territory"})
+		
\ No newline at end of file
diff --git a/patches/november_2013/p01_make_gl_entries_for_si.py b/patches/1311/p01_make_gl_entries_for_si.py
similarity index 78%
rename from patches/november_2013/p01_make_gl_entries_for_si.py
rename to patches/1311/p01_make_gl_entries_for_si.py
index 84e0712..acd52cd 100644
--- a/patches/november_2013/p01_make_gl_entries_for_si.py
+++ b/patches/1311/p01_make_gl_entries_for_si.py
@@ -1,6 +1,7 @@
-# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 # License: GNU General Public License v3. See license.txt
 
+from __future__ import unicode_literals
 import webnotes
 
 def execute():
diff --git a/patches/1311/p02_index_singles.py b/patches/1311/p02_index_singles.py
new file mode 100644
index 0000000..ea67ad6
--- /dev/null
+++ b/patches/1311/p02_index_singles.py
@@ -0,0 +1,11 @@
+# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
+# License: GNU General Public License v3. See license.txt
+from __future__ import unicode_literals
+
+def execute():
+	import webnotes
+	if not webnotes.conn.sql("""show index from `tabSingles` 
+		where Key_name="singles_doctype_field_index" """):
+		webnotes.conn.commit()
+		webnotes.conn.sql("""alter table `tabSingles` 
+			add index singles_doctype_field_index(`doctype`, `field`)""")
\ No newline at end of file
diff --git a/patches/1311/p03_update_reqd_report_fields.py b/patches/1311/p03_update_reqd_report_fields.py
new file mode 100644
index 0000000..a2207cc
--- /dev/null
+++ b/patches/1311/p03_update_reqd_report_fields.py
@@ -0,0 +1,17 @@
+# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
+# License: GNU General Public License v3. See license.txt
+
+from __future__ import unicode_literals
+
+def execute():
+    import webnotes
+    
+    # report_name
+    webnotes.conn.sql("""update `tabReport` set report_name=name where ifnull(report_name, '')=''""")
+    
+    # report_type
+    webnotes.conn.sql("""update `tabReport` set report_type='Report Builder' 
+        where ifnull(report_type, '')='' and ifnull(json, '')!=''""")
+    
+    # is_standard
+    webnotes.conn.sql("""update `tabReport` set is_standard='No' where ifnull(is_standard, '')=''""")
\ No newline at end of file
diff --git a/patches/april_2013/p01_update_serial_no_valuation_rate.py b/patches/april_2013/p01_update_serial_no_valuation_rate.py
index bebb956..18fe9b5 100644
--- a/patches/april_2013/p01_update_serial_no_valuation_rate.py
+++ b/patches/april_2013/p01_update_serial_no_valuation_rate.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 # License: GNU General Public License v3. See license.txt
 
 import webnotes
diff --git a/patches/april_2013/p02_add_country_and_currency.py b/patches/april_2013/p02_add_country_and_currency.py
index 41a1e33..8a48837 100644
--- a/patches/april_2013/p02_add_country_and_currency.py
+++ b/patches/april_2013/p02_add_country_and_currency.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 # License: GNU General Public License v3. See license.txt
 
 import webnotes
diff --git a/patches/april_2013/p03_fixes_for_lead_in_quotation.py b/patches/april_2013/p03_fixes_for_lead_in_quotation.py
index 6213454..5c6aa0a 100644
--- a/patches/april_2013/p03_fixes_for_lead_in_quotation.py
+++ b/patches/april_2013/p03_fixes_for_lead_in_quotation.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 # License: GNU General Public License v3. See license.txt
 
 import webnotes
diff --git a/patches/april_2013/p04_reverse_modules_list.py b/patches/april_2013/p04_reverse_modules_list.py
index 4652fba..33333d1 100644
--- a/patches/april_2013/p04_reverse_modules_list.py
+++ b/patches/april_2013/p04_reverse_modules_list.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 # License: GNU General Public License v3. See license.txt
 
 import webnotes, json
diff --git a/patches/april_2013/p04_update_role_in_pages.py b/patches/april_2013/p04_update_role_in_pages.py
index 1f89d81..7e4374c 100644
--- a/patches/april_2013/p04_update_role_in_pages.py
+++ b/patches/april_2013/p04_update_role_in_pages.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 # License: GNU General Public License v3. See license.txt
 
 import webnotes
diff --git a/patches/april_2013/p05_fixes_in_reverse_modules.py b/patches/april_2013/p05_fixes_in_reverse_modules.py
index c5a6974..b300a4d 100644
--- a/patches/april_2013/p05_fixes_in_reverse_modules.py
+++ b/patches/april_2013/p05_fixes_in_reverse_modules.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 # License: GNU General Public License v3. See license.txt
 
 import webnotes, json
diff --git a/patches/april_2013/p05_update_file_data.py b/patches/april_2013/p05_update_file_data.py
index e03abc6..b41019d 100644
--- a/patches/april_2013/p05_update_file_data.py
+++ b/patches/april_2013/p05_update_file_data.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 # License: GNU General Public License v3. See license.txt
 
 import webnotes, webnotes.utils, os
@@ -37,7 +37,7 @@
 		except Exception, e:
 			print webnotes.getTraceback()
 			if (e.args and e.args[0]!=1054) or not e.args:
-				raise e
+				raise
 
 def update_for_doc(doctype, doc):
 	for filedata in doc.file_list.split("\n"):
@@ -52,7 +52,7 @@
 		
 		exists = True
 		if not (filename.startswith("http://") or filename.startswith("https://")):
-			if not os.path.exists(webnotes.utils.get_path("public", "files", filename)):
+			if not os.path.exists(webnotes.utils.get_site_path(webnotes.conf.files_path, filename)):
 				exists = False
 
 		if exists:
diff --git a/patches/april_2013/p06_default_cost_center.py b/patches/april_2013/p06_default_cost_center.py
index 1449034..9d45e1e 100644
--- a/patches/april_2013/p06_default_cost_center.py
+++ b/patches/april_2013/p06_default_cost_center.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 # License: GNU General Public License v3. See license.txt
 
 import webnotes
diff --git a/patches/april_2013/p06_update_file_size.py b/patches/april_2013/p06_update_file_size.py
index 6879625..4305489 100644
--- a/patches/april_2013/p06_update_file_size.py
+++ b/patches/april_2013/p06_update_file_size.py
@@ -1,10 +1,10 @@
-# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 # License: GNU General Public License v3. See license.txt
 
 import webnotes, os, webnotes.utils
 
 def execute():
-	files_path = webnotes.utils.get_path("public", "files")
+	files_path = webnotes.utils.get_site_path(webnotes.conf.files_path)
 	webnotes.conn.auto_commit_on_many_writes = 1
 
 	for f in webnotes.conn.sql("""select name, file_name from 
@@ -14,4 +14,4 @@
 			if os.path.exists(filepath):
 				webnotes.conn.set_value("File Data", f.name, "file_size", os.stat(filepath).st_size)
 				
-	webnotes.conn.auto_commit_on_many_writes = 0
\ No newline at end of file
+	webnotes.conn.auto_commit_on_many_writes = 0
diff --git a/patches/april_2013/p07_rename_cost_center_other_charges.py b/patches/april_2013/p07_rename_cost_center_other_charges.py
index ea5168f..3c91ee3 100644
--- a/patches/april_2013/p07_rename_cost_center_other_charges.py
+++ b/patches/april_2013/p07_rename_cost_center_other_charges.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 # License: GNU General Public License v3. See license.txt
 
 import webnotes
diff --git a/patches/april_2013/p07_update_file_data_2.py b/patches/april_2013/p07_update_file_data_2.py
index fad612e..b75161b 100644
--- a/patches/april_2013/p07_update_file_data_2.py
+++ b/patches/april_2013/p07_update_file_data_2.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 # License: GNU General Public License v3. See license.txt
 
 import webnotes
diff --git a/patches/april_2013/rebuild_sales_browser.py b/patches/april_2013/rebuild_sales_browser.py
index 867ac35..6de6101 100644
--- a/patches/april_2013/rebuild_sales_browser.py
+++ b/patches/april_2013/rebuild_sales_browser.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 # License: GNU General Public License v3. See license.txt
 
 import webnotes
diff --git a/patches/august_2013/p01_hr_settings.py b/patches/august_2013/p01_hr_settings.py
index d34ef52..2c5b615 100644
--- a/patches/august_2013/p01_hr_settings.py
+++ b/patches/august_2013/p01_hr_settings.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 # License: GNU General Public License v3. See license.txt
 
 from __future__ import unicode_literals
diff --git a/patches/august_2013/p02_rename_price_list.py b/patches/august_2013/p02_rename_price_list.py
index dbe268f..dd25254 100644
--- a/patches/august_2013/p02_rename_price_list.py
+++ b/patches/august_2013/p02_rename_price_list.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 # License: GNU General Public License v3. See license.txt
 
 from __future__ import unicode_literals
diff --git a/patches/august_2013/p03_pos_setting_replace_customer_account.py b/patches/august_2013/p03_pos_setting_replace_customer_account.py
index c3a21e4..f401b3d 100644
--- a/patches/august_2013/p03_pos_setting_replace_customer_account.py
+++ b/patches/august_2013/p03_pos_setting_replace_customer_account.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 # License: GNU General Public License v3. See license.txt
 
 from __future__ import unicode_literals
diff --git a/patches/august_2013/p05_employee_birthdays.py b/patches/august_2013/p05_employee_birthdays.py
index 0dc15cb..d090d31 100644
--- a/patches/august_2013/p05_employee_birthdays.py
+++ b/patches/august_2013/p05_employee_birthdays.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 # License: GNU General Public License v3. See license.txt
 
 from __future__ import unicode_literals
diff --git a/patches/august_2013/p06_fix_sle_against_stock_entry.py b/patches/august_2013/p06_fix_sle_against_stock_entry.py
index 02588be..2e6c383 100644
--- a/patches/august_2013/p06_fix_sle_against_stock_entry.py
+++ b/patches/august_2013/p06_fix_sle_against_stock_entry.py
@@ -1,10 +1,9 @@
 import webnotes
 
-cancelled = []
-uncancelled = []
-
 def execute():
-	global cancelled, uncancelled
+	cancelled = []
+	uncancelled = []
+
 	stock_entries = webnotes.conn.sql("""select * from `tabStock Entry` 
 		where docstatus >= 1 and date(modified) >= "2013-08-16" 
 		and ifnull(production_order, '') != '' and ifnull(bom_no, '') != '' 
@@ -17,14 +16,12 @@
 					where voucher_type='Stock Entry' and voucher_no=%s
 					and is_cancelled='No'""", entry.name, as_dict=True)
 				if res:
-					make_stock_entry_detail(entry, res)
+					make_stock_entry_detail(entry, res, cancelled, uncancelled)
 				
 	if cancelled or uncancelled:
-		send_email()
+		send_email(cancelled, uncancelled)
 			
-def make_stock_entry_detail(entry, res):
-	global cancelled, uncancelled
-	
+def make_stock_entry_detail(entry, res, cancelled, uncancelled):
 	fg_item = webnotes.conn.get_value("Production Order", entry.production_order,
 		"production_item")
 	voucher_detail_entries_map = {}
@@ -87,9 +84,8 @@
 
 		uncancelled.append(se.doc.name)
 		
-def send_email():
+def send_email(cancelled, uncancelled):
 	from webnotes.utils.email_lib import sendmail_to_system_managers
-	global cancelled, uncancelled
 	uncancelled = "we have undone the cancellation of the following Stock Entries through a patch:\n" + \
 		"\n".join(uncancelled) if uncancelled else ""
 	cancelled = "and cancelled the following Stock Entries:\n" + "\n".join(cancelled) \
diff --git a/patches/december_2012/address_title.py b/patches/december_2012/address_title.py
index 13dd74d..849f619 100644
--- a/patches/december_2012/address_title.py
+++ b/patches/december_2012/address_title.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 # License: GNU General Public License v3. See license.txt
 
 import webnotes
diff --git a/patches/december_2012/delete_form16_print_format.py b/patches/december_2012/delete_form16_print_format.py
index e917112..bc65b6e 100644
--- a/patches/december_2012/delete_form16_print_format.py
+++ b/patches/december_2012/delete_form16_print_format.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 # License: GNU General Public License v3. See license.txt
 
 import webnotes
diff --git a/patches/december_2012/deleted_contact_address_patch.py b/patches/december_2012/deleted_contact_address_patch.py
index 4143062..a9f2ff7 100644
--- a/patches/december_2012/deleted_contact_address_patch.py
+++ b/patches/december_2012/deleted_contact_address_patch.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 # License: GNU General Public License v3. See license.txt
 
 import webnotes
diff --git a/patches/december_2012/deprecate_tds.py b/patches/december_2012/deprecate_tds.py
index 70ccf6d..e43fbfc 100644
--- a/patches/december_2012/deprecate_tds.py
+++ b/patches/december_2012/deprecate_tds.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 # License: GNU General Public License v3. See license.txt
 
 def execute():
diff --git a/patches/december_2012/expense_leave_reload.py b/patches/december_2012/expense_leave_reload.py
index 3a97be7..9e2b8df 100644
--- a/patches/december_2012/expense_leave_reload.py
+++ b/patches/december_2012/expense_leave_reload.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 # License: GNU General Public License v3. See license.txt
 
 import webnotes
diff --git a/patches/december_2012/file_list_rename.py b/patches/december_2012/file_list_rename.py
index ce4ae76..d8a845c 100644
--- a/patches/december_2012/file_list_rename.py
+++ b/patches/december_2012/file_list_rename.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 # License: GNU General Public License v3. See license.txt
 
 import webnotes
@@ -10,4 +10,4 @@
 			webnotes.conn.sql("""update `tab%s` set file_list = 
 				replace(file_list, "-", "")""" % dt[0])
 		except Exception, e:
-			if e.args[0]!=1146: raise e
\ No newline at end of file
+			if e.args[0]!=1146: raise
\ No newline at end of file
diff --git a/patches/december_2012/fix_default_print_format.py b/patches/december_2012/fix_default_print_format.py
index df245e2..f6c4738 100644
--- a/patches/december_2012/fix_default_print_format.py
+++ b/patches/december_2012/fix_default_print_format.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 # License: GNU General Public License v3. See license.txt
 
 import webnotes
diff --git a/patches/december_2012/move_recent_to_memcache.py b/patches/december_2012/move_recent_to_memcache.py
index f720ad2..fe39116 100644
--- a/patches/december_2012/move_recent_to_memcache.py
+++ b/patches/december_2012/move_recent_to_memcache.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 # License: GNU General Public License v3. See license.txt
 
 from __future__ import unicode_literals
diff --git a/patches/december_2012/production_cleanup.py b/patches/december_2012/production_cleanup.py
index 53cce62..9065666 100644
--- a/patches/december_2012/production_cleanup.py
+++ b/patches/december_2012/production_cleanup.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 # License: GNU General Public License v3. See license.txt
 
 import webnotes
diff --git a/patches/december_2012/production_order_naming_series.py b/patches/december_2012/production_order_naming_series.py
index a175367..cd06222 100644
--- a/patches/december_2012/production_order_naming_series.py
+++ b/patches/december_2012/production_order_naming_series.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 # License: GNU General Public License v3. See license.txt
 
 import webnotes
diff --git a/patches/december_2012/rebuild_item_group_tree.py b/patches/december_2012/rebuild_item_group_tree.py
index 1fd2801..1345dba 100644
--- a/patches/december_2012/rebuild_item_group_tree.py
+++ b/patches/december_2012/rebuild_item_group_tree.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 # License: GNU General Public License v3. See license.txt
 
 import webnotes
diff --git a/patches/december_2012/remove_quotation_next_contact.py b/patches/december_2012/remove_quotation_next_contact.py
index da20449..06d96ea 100644
--- a/patches/december_2012/remove_quotation_next_contact.py
+++ b/patches/december_2012/remove_quotation_next_contact.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 # License: GNU General Public License v3. See license.txt
 
 from __future__ import unicode_literals
diff --git a/patches/december_2012/replace_createlocal.py b/patches/december_2012/replace_createlocal.py
index 0054e59..559af01 100644
--- a/patches/december_2012/replace_createlocal.py
+++ b/patches/december_2012/replace_createlocal.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 # License: GNU General Public License v3. See license.txt
 
 def execute():
diff --git a/patches/december_2012/repost_ordered_qty.py b/patches/december_2012/repost_ordered_qty.py
index 4c1d11d..05cbb64 100644
--- a/patches/december_2012/repost_ordered_qty.py
+++ b/patches/december_2012/repost_ordered_qty.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 # License: GNU General Public License v3. See license.txt
 
 def execute():
diff --git a/patches/december_2012/repost_projected_qty.py b/patches/december_2012/repost_projected_qty.py
index d4cf475..3adf1c0 100644
--- a/patches/december_2012/repost_projected_qty.py
+++ b/patches/december_2012/repost_projected_qty.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 # License: GNU General Public License v3. See license.txt
 
 def execute():
diff --git a/patches/december_2012/stock_entry_cleanup.py b/patches/december_2012/stock_entry_cleanup.py
index bd8beb3..ab25c55 100644
--- a/patches/december_2012/stock_entry_cleanup.py
+++ b/patches/december_2012/stock_entry_cleanup.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 # License: GNU General Public License v3. See license.txt
 
 import webnotes
diff --git a/patches/december_2012/update_print_width.py b/patches/december_2012/update_print_width.py
index f5a05e4..ee2b46a 100644
--- a/patches/december_2012/update_print_width.py
+++ b/patches/december_2012/update_print_width.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 # License: GNU General Public License v3. See license.txt
 
 import webnotes
diff --git a/patches/december_2012/website_cache_refactor.py b/patches/december_2012/website_cache_refactor.py
index 33f10e1..cab2af3 100644
--- a/patches/december_2012/website_cache_refactor.py
+++ b/patches/december_2012/website_cache_refactor.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 # License: GNU General Public License v3. See license.txt
 
 from __future__ import unicode_literals
diff --git a/patches/february_2013/account_negative_balance.py b/patches/february_2013/account_negative_balance.py
index 58ca862..cbb9032 100644
--- a/patches/february_2013/account_negative_balance.py
+++ b/patches/february_2013/account_negative_balance.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 # License: GNU General Public License v3. See license.txt
 
 def execute():
diff --git a/patches/february_2013/fix_outstanding.py b/patches/february_2013/fix_outstanding.py
index d3f6390..24ebc4e 100644
--- a/patches/february_2013/fix_outstanding.py
+++ b/patches/february_2013/fix_outstanding.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 # License: GNU General Public License v3. See license.txt
 
 def execute():
diff --git a/patches/february_2013/gle_floating_point_issue_revisited.py b/patches/february_2013/gle_floating_point_issue_revisited.py
index 6d026eb..078b06a 100644
--- a/patches/february_2013/gle_floating_point_issue_revisited.py
+++ b/patches/february_2013/gle_floating_point_issue_revisited.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 # License: GNU General Public License v3. See license.txt
 
 def execute():
diff --git a/patches/february_2013/p01_event.py b/patches/february_2013/p01_event.py
index 2b26e7a..73f08ac 100644
--- a/patches/february_2013/p01_event.py
+++ b/patches/february_2013/p01_event.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 # License: GNU General Public License v3. See license.txt
 
 import webnotes
diff --git a/patches/february_2013/p02_email_digest.py b/patches/february_2013/p02_email_digest.py
index 271804c..f1ebc33 100644
--- a/patches/february_2013/p02_email_digest.py
+++ b/patches/february_2013/p02_email_digest.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 # License: GNU General Public License v3. See license.txt
 
 import webnotes
diff --git a/patches/february_2013/p03_material_request.py b/patches/february_2013/p03_material_request.py
index 0b6f303..255de10 100644
--- a/patches/february_2013/p03_material_request.py
+++ b/patches/february_2013/p03_material_request.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 # License: GNU General Public License v3. See license.txt
 
 import webnotes, os, sys
diff --git a/patches/february_2013/p04_remove_old_doctypes.py b/patches/february_2013/p04_remove_old_doctypes.py
index 3b0d0ad..d584044 100644
--- a/patches/february_2013/p04_remove_old_doctypes.py
+++ b/patches/february_2013/p04_remove_old_doctypes.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 # License: GNU General Public License v3. See license.txt
 
 import webnotes, os
diff --git a/patches/february_2013/p05_leave_application.py b/patches/february_2013/p05_leave_application.py
index 0de510a..809df96 100644
--- a/patches/february_2013/p05_leave_application.py
+++ b/patches/february_2013/p05_leave_application.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 # License: GNU General Public License v3. See license.txt
 
 import webnotes
diff --git a/patches/february_2013/p08_todo_query_report.py b/patches/february_2013/p08_todo_query_report.py
index 7437c54..bfb04ce 100644
--- a/patches/february_2013/p08_todo_query_report.py
+++ b/patches/february_2013/p08_todo_query_report.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 # License: GNU General Public License v3. See license.txt
 
 import webnotes
diff --git a/patches/february_2013/p09_remove_cancelled_warehouses.py b/patches/february_2013/p09_remove_cancelled_warehouses.py
index e034c65..62660b9 100644
--- a/patches/february_2013/p09_remove_cancelled_warehouses.py
+++ b/patches/february_2013/p09_remove_cancelled_warehouses.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 # License: GNU General Public License v3. See license.txt
 
 import webnotes
diff --git a/patches/february_2013/p09_timesheets.py b/patches/february_2013/p09_timesheets.py
index ac6d44c..639cf1e 100644
--- a/patches/february_2013/p09_timesheets.py
+++ b/patches/february_2013/p09_timesheets.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 # License: GNU General Public License v3. See license.txt
 
 import webnotes
diff --git a/patches/february_2013/payment_reconciliation_reset_values.py b/patches/february_2013/payment_reconciliation_reset_values.py
index f792390..e45953b 100644
--- a/patches/february_2013/payment_reconciliation_reset_values.py
+++ b/patches/february_2013/payment_reconciliation_reset_values.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 # License: GNU General Public License v3. See license.txt
 
 def execute():
diff --git a/patches/february_2013/reload_bom_replace_tool_permission.py b/patches/february_2013/reload_bom_replace_tool_permission.py
index 82fea95..70a0d6f 100644
--- a/patches/february_2013/reload_bom_replace_tool_permission.py
+++ b/patches/february_2013/reload_bom_replace_tool_permission.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 # License: GNU General Public License v3. See license.txt
 
 def execute():
diff --git a/patches/february_2013/remove_account_utils_folder.py b/patches/february_2013/remove_account_utils_folder.py
index 4f40ae9..c7dfeb3 100644
--- a/patches/february_2013/remove_account_utils_folder.py
+++ b/patches/february_2013/remove_account_utils_folder.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 # License: GNU General Public License v3. See license.txt
 
 def execute():
diff --git a/patches/february_2013/remove_gl_mapper.py b/patches/february_2013/remove_gl_mapper.py
index 05e2ed5..1b50a4b 100644
--- a/patches/february_2013/remove_gl_mapper.py
+++ b/patches/february_2013/remove_gl_mapper.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 # License: GNU General Public License v3. See license.txt
 
 def execute():
diff --git a/patches/february_2013/repost_reserved_qty.py b/patches/february_2013/repost_reserved_qty.py
index 5c41266..442a81b 100644
--- a/patches/february_2013/repost_reserved_qty.py
+++ b/patches/february_2013/repost_reserved_qty.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 # License: GNU General Public License v3. See license.txt
 
 import webnotes
diff --git a/patches/february_2013/update_company_in_leave_application.py b/patches/february_2013/update_company_in_leave_application.py
index 96f3bb7..dfdb82f 100644
--- a/patches/february_2013/update_company_in_leave_application.py
+++ b/patches/february_2013/update_company_in_leave_application.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 # License: GNU General Public License v3. See license.txt
 
 def execute():
diff --git a/patches/january_2013/change_patch_structure.py b/patches/january_2013/change_patch_structure.py
index 112d694..57b685d 100644
--- a/patches/january_2013/change_patch_structure.py
+++ b/patches/january_2013/change_patch_structure.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 # License: GNU General Public License v3. See license.txt
 
 import webnotes
diff --git a/patches/january_2013/enable_currencies.py b/patches/january_2013/enable_currencies.py
index 9dfe6b4..f8fcac7 100644
--- a/patches/january_2013/enable_currencies.py
+++ b/patches/january_2013/enable_currencies.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 # License: GNU General Public License v3. See license.txt
 
 import webnotes
diff --git a/patches/january_2013/file_list_rename_returns.py b/patches/january_2013/file_list_rename_returns.py
index 2325da5..1295724 100644
--- a/patches/january_2013/file_list_rename_returns.py
+++ b/patches/january_2013/file_list_rename_returns.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 # License: GNU General Public License v3. See license.txt
 
 import webnotes
@@ -37,7 +37,7 @@
 				except Exception, e:
 					# if duplicate entry, then dont update
 					if e[0]!=1062:
-						raise e
+						raise
 		
 		
 		changed_keys = change_map.keys()
@@ -62,5 +62,5 @@
 				
 			except Exception, e:
 				if e[0]!=1146:
-					raise e
+					raise
 	
\ No newline at end of file
diff --git a/patches/january_2013/give_report_permission_on_read.py b/patches/january_2013/give_report_permission_on_read.py
index 2e67a77..f493e32 100644
--- a/patches/january_2013/give_report_permission_on_read.py
+++ b/patches/january_2013/give_report_permission_on_read.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 # License: GNU General Public License v3. See license.txt
 
 import webnotes
diff --git a/patches/january_2013/holiday_list_patch.py b/patches/january_2013/holiday_list_patch.py
index f7f6360..5258329 100644
--- a/patches/january_2013/holiday_list_patch.py
+++ b/patches/january_2013/holiday_list_patch.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 # License: GNU General Public License v3. See license.txt
 
 import webnotes
diff --git a/patches/january_2013/rebuild_tree.py b/patches/january_2013/rebuild_tree.py
index 4cc3118..48e5d87 100644
--- a/patches/january_2013/rebuild_tree.py
+++ b/patches/january_2013/rebuild_tree.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 # License: GNU General Public License v3. See license.txt
 
 from __future__ import unicode_literals
diff --git a/patches/january_2013/reload_print_format.py b/patches/january_2013/reload_print_format.py
index c468b48..381602d 100644
--- a/patches/january_2013/reload_print_format.py
+++ b/patches/january_2013/reload_print_format.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 # License: GNU General Public License v3. See license.txt
 
 def execute():
diff --git a/patches/january_2013/remove_bad_permissions.py b/patches/january_2013/remove_bad_permissions.py
index 01de101..98d780b 100644
--- a/patches/january_2013/remove_bad_permissions.py
+++ b/patches/january_2013/remove_bad_permissions.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 # License: GNU General Public License v3. See license.txt
 
 import webnotes
diff --git a/patches/january_2013/remove_landed_cost_master.py b/patches/january_2013/remove_landed_cost_master.py
index d4bff86..be023d8 100644
--- a/patches/january_2013/remove_landed_cost_master.py
+++ b/patches/january_2013/remove_landed_cost_master.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 # License: GNU General Public License v3. See license.txt
 
 def execute():
diff --git a/patches/january_2013/remove_tds_entry_from_gl_mapper.py b/patches/january_2013/remove_tds_entry_from_gl_mapper.py
index f058ebc..4e395fb 100644
--- a/patches/january_2013/remove_tds_entry_from_gl_mapper.py
+++ b/patches/january_2013/remove_tds_entry_from_gl_mapper.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 # License: GNU General Public License v3. See license.txt
 
 def execute():
diff --git a/patches/january_2013/remove_unwanted_permission.py b/patches/january_2013/remove_unwanted_permission.py
index 48b1bab..4ff0424 100644
--- a/patches/january_2013/remove_unwanted_permission.py
+++ b/patches/january_2013/remove_unwanted_permission.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 # License: GNU General Public License v3. See license.txt
 
 def execute():
diff --git a/patches/january_2013/report_permission.py b/patches/january_2013/report_permission.py
index 9b3bdd2..15c1269 100644
--- a/patches/january_2013/report_permission.py
+++ b/patches/january_2013/report_permission.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 # License: GNU General Public License v3. See license.txt
 
 import webnotes
diff --git a/patches/january_2013/stock_reconciliation_patch.py b/patches/january_2013/stock_reconciliation_patch.py
index 8ffbc4f..fc37aa6 100644
--- a/patches/january_2013/stock_reconciliation_patch.py
+++ b/patches/january_2013/stock_reconciliation_patch.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 # License: GNU General Public License v3. See license.txt
 
 import webnotes
diff --git a/patches/january_2013/tabsessions_to_myisam.py b/patches/january_2013/tabsessions_to_myisam.py
index 8d303ff..71d8495 100644
--- a/patches/january_2013/tabsessions_to_myisam.py
+++ b/patches/january_2013/tabsessions_to_myisam.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 # License: GNU General Public License v3. See license.txt
 
 def execute():
diff --git a/patches/january_2013/update_closed_on.py b/patches/january_2013/update_closed_on.py
index 94122d7..c929b3a 100644
--- a/patches/january_2013/update_closed_on.py
+++ b/patches/january_2013/update_closed_on.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 # License: GNU General Public License v3. See license.txt
 
 import webnotes
diff --git a/patches/january_2013/update_country_info.py b/patches/january_2013/update_country_info.py
index 398887b..6e26869 100644
--- a/patches/january_2013/update_country_info.py
+++ b/patches/january_2013/update_country_info.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 # License: GNU General Public License v3. See license.txt
 
 from __future__ import unicode_literals
diff --git a/patches/january_2013/update_fraction_for_usd.py b/patches/january_2013/update_fraction_for_usd.py
index 0780ce9..62b3047 100644
--- a/patches/january_2013/update_fraction_for_usd.py
+++ b/patches/january_2013/update_fraction_for_usd.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 # License: GNU General Public License v3. See license.txt
 
 def execute():
diff --git a/patches/january_2013/update_number_format.py b/patches/january_2013/update_number_format.py
index e4e0ad6..b4a6f96 100644
--- a/patches/january_2013/update_number_format.py
+++ b/patches/january_2013/update_number_format.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 # License: GNU General Public License v3. See license.txt
 
 from __future__ import unicode_literals
diff --git a/patches/july_2013/p01_remove_doctype_mappers.py b/patches/july_2013/p01_remove_doctype_mappers.py
index b914b1b..1f9db3f 100644
--- a/patches/july_2013/p01_remove_doctype_mappers.py
+++ b/patches/july_2013/p01_remove_doctype_mappers.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 # License: GNU General Public License v3. See license.txt
 
 import webnotes
diff --git a/patches/july_2013/p01_same_sales_rate_patch.py b/patches/july_2013/p01_same_sales_rate_patch.py
index ce5b1f8..ff3120a 100644
--- a/patches/july_2013/p01_same_sales_rate_patch.py
+++ b/patches/july_2013/p01_same_sales_rate_patch.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 # License: GNU General Public License v3. See license.txt
 
 def execute():
diff --git a/patches/july_2013/p02_copy_shipping_address.py b/patches/july_2013/p02_copy_shipping_address.py
index 2fa195f..91bf150 100644
--- a/patches/july_2013/p02_copy_shipping_address.py
+++ b/patches/july_2013/p02_copy_shipping_address.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 # License: GNU General Public License v3. See license.txt
 
 def execute():
diff --git a/patches/july_2013/p03_cost_center_company.py b/patches/july_2013/p03_cost_center_company.py
index 5cd44b7..f5e47c5 100644
--- a/patches/july_2013/p03_cost_center_company.py
+++ b/patches/july_2013/p03_cost_center_company.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 # License: GNU General Public License v3. See license.txt
 
 import webnotes
diff --git a/patches/july_2013/p04_merge_duplicate_leads.py b/patches/july_2013/p04_merge_duplicate_leads.py
index de37548..3c34d77 100644
--- a/patches/july_2013/p04_merge_duplicate_leads.py
+++ b/patches/july_2013/p04_merge_duplicate_leads.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 # License: GNU General Public License v3. See license.txt
 
 import webnotes
diff --git a/patches/july_2013/p05_custom_doctypes_in_list_view.py b/patches/july_2013/p05_custom_doctypes_in_list_view.py
index 34dec1d..6587700 100644
--- a/patches/july_2013/p05_custom_doctypes_in_list_view.py
+++ b/patches/july_2013/p05_custom_doctypes_in_list_view.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 # License: GNU General Public License v3. See license.txt
 
 import webnotes
diff --git a/patches/july_2013/p06_same_sales_rate.py b/patches/july_2013/p06_same_sales_rate.py
index f481c66..7030cae 100644
--- a/patches/july_2013/p06_same_sales_rate.py
+++ b/patches/july_2013/p06_same_sales_rate.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 # License: GNU General Public License v3. See license.txt
 
 def execute():
diff --git a/patches/july_2013/p07_repost_billed_amt_in_sales_cycle.py b/patches/july_2013/p07_repost_billed_amt_in_sales_cycle.py
index 272e455..6419315 100644
--- a/patches/july_2013/p07_repost_billed_amt_in_sales_cycle.py
+++ b/patches/july_2013/p07_repost_billed_amt_in_sales_cycle.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 # License: GNU General Public License v3. See license.txt
 
 from __future__ import unicode_literals
diff --git a/patches/july_2013/p08_custom_print_format_net_total_export.py b/patches/july_2013/p08_custom_print_format_net_total_export.py
index 3d4ae98..646bd2f 100644
--- a/patches/july_2013/p08_custom_print_format_net_total_export.py
+++ b/patches/july_2013/p08_custom_print_format_net_total_export.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 # License: GNU General Public License v3. See license.txt
 
 from __future__ import unicode_literals
diff --git a/patches/july_2013/p09_remove_website_pyc.py b/patches/july_2013/p09_remove_website_pyc.py
index afff4bb..20befc0 100644
--- a/patches/july_2013/p09_remove_website_pyc.py
+++ b/patches/july_2013/p09_remove_website_pyc.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 # License: GNU General Public License v3. See license.txt
 
 import webnotes
diff --git a/patches/july_2013/p10_change_partner_user_to_website_user.py b/patches/july_2013/p10_change_partner_user_to_website_user.py
index 5578345..b9230ca 100644
--- a/patches/july_2013/p10_change_partner_user_to_website_user.py
+++ b/patches/july_2013/p10_change_partner_user_to_website_user.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 # License: GNU General Public License v3. See license.txt
 
 import webnotes
diff --git a/patches/july_2013/p11_update_price_list_currency.py b/patches/july_2013/p11_update_price_list_currency.py
index 8b70b79..ac259df 100644
--- a/patches/july_2013/p11_update_price_list_currency.py
+++ b/patches/july_2013/p11_update_price_list_currency.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 # License: GNU General Public License v3. See license.txt
 
 import webnotes
diff --git a/patches/july_2013/restore_tree_roots.py b/patches/july_2013/restore_tree_roots.py
index 0998393..b6a988f 100644
--- a/patches/july_2013/restore_tree_roots.py
+++ b/patches/july_2013/restore_tree_roots.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 # License: GNU General Public License v3. See license.txt
 
 def execute():
diff --git a/patches/june_2013/p01_update_bom_exploded_items.py b/patches/june_2013/p01_update_bom_exploded_items.py
index fe0b4ad..d4027a1 100644
--- a/patches/june_2013/p01_update_bom_exploded_items.py
+++ b/patches/june_2013/p01_update_bom_exploded_items.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 # License: GNU General Public License v3. See license.txt
 
 from __future__ import unicode_literals
diff --git a/patches/june_2013/p02_update_project_completed.py b/patches/june_2013/p02_update_project_completed.py
index d11c690..a868b20 100644
--- a/patches/june_2013/p02_update_project_completed.py
+++ b/patches/june_2013/p02_update_project_completed.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 # License: GNU General Public License v3. See license.txt
 
 import webnotes
diff --git a/patches/june_2013/p03_buying_selling_for_price_list.py b/patches/june_2013/p03_buying_selling_for_price_list.py
index 61cddd0..2f92fe6 100644
--- a/patches/june_2013/p03_buying_selling_for_price_list.py
+++ b/patches/june_2013/p03_buying_selling_for_price_list.py
@@ -1,10 +1,9 @@
-# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 # License: GNU General Public License v3. See license.txt
 
 from __future__ import unicode_literals
 import webnotes
 from webnotes.utils import cint
-import MySQLdb
 
 def execute():
 	webnotes.reload_doc("stock", "doctype", "price_list")
@@ -20,9 +19,9 @@
 		
 			buying_or_selling = "Selling" if selling else "Buying"
 			webnotes.conn.set_value("Price List", price_list, "buying_or_selling", buying_or_selling)
-	except MySQLdb.OperationalError, e:
+	except webnotes.SQLError, e:
 		if e.args[0] == 1054:
 			webnotes.conn.sql("""update `tabPrice List` set buying_or_selling='Selling' 
 				where ifnull(buying_or_selling, '')='' """)
 		else:
-			raise e
\ No newline at end of file
+			raise
\ No newline at end of file
diff --git a/patches/june_2013/p04_fix_event_for_lead_oppty_project.py b/patches/june_2013/p04_fix_event_for_lead_oppty_project.py
index af50724..735a28a 100644
--- a/patches/june_2013/p04_fix_event_for_lead_oppty_project.py
+++ b/patches/june_2013/p04_fix_event_for_lead_oppty_project.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 # License: GNU General Public License v3. See license.txt
 
 import webnotes
diff --git a/patches/june_2013/p05_remove_search_criteria_reports.py b/patches/june_2013/p05_remove_search_criteria_reports.py
index 188960c..291f6bc 100644
--- a/patches/june_2013/p05_remove_search_criteria_reports.py
+++ b/patches/june_2013/p05_remove_search_criteria_reports.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 # License: GNU General Public License v3. See license.txt
 
 from __future__ import unicode_literals
diff --git a/patches/june_2013/p05_remove_unused_doctypes.py b/patches/june_2013/p05_remove_unused_doctypes.py
index d75a66a..d3905c3 100644
--- a/patches/june_2013/p05_remove_unused_doctypes.py
+++ b/patches/june_2013/p05_remove_unused_doctypes.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 # License: GNU General Public License v3. See license.txt
 
 import webnotes
diff --git a/patches/june_2013/p06_drop_unused_tables.py b/patches/june_2013/p06_drop_unused_tables.py
index 18a2061..ecb40ea 100644
--- a/patches/june_2013/p06_drop_unused_tables.py
+++ b/patches/june_2013/p06_drop_unused_tables.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 # License: GNU General Public License v3. See license.txt
 
 import webnotes
diff --git a/patches/june_2013/p07_taxes_price_list_for_territory.py b/patches/june_2013/p07_taxes_price_list_for_territory.py
index f6663bf..1cdb783 100644
--- a/patches/june_2013/p07_taxes_price_list_for_territory.py
+++ b/patches/june_2013/p07_taxes_price_list_for_territory.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 # License: GNU General Public License v3. See license.txt
 
 import webnotes
diff --git a/patches/june_2013/p08_shopping_cart_settings.py b/patches/june_2013/p08_shopping_cart_settings.py
index 479a696..6af7eb8 100644
--- a/patches/june_2013/p08_shopping_cart_settings.py
+++ b/patches/june_2013/p08_shopping_cart_settings.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 # License: GNU General Public License v3. See license.txt
 
 import webnotes
@@ -7,7 +7,7 @@
 	webnotes.reload_doc("selling", "doctype", "shopping_cart_settings")
 	
 	# create two default territories, one for home country and one named Rest of the World
-	from setup.doctype.setup_control.setup_control import create_territories
+	from setup.page.setup_wizard.setup_wizard import create_territories
 	create_territories()
 	
 	webnotes.conn.set_value("Shopping Cart Settings", None, "default_territory", "Rest of the World")
diff --git a/patches/june_2013/p09_update_global_defaults.py b/patches/june_2013/p09_update_global_defaults.py
index 0fe9247..09bc8eb 100644
--- a/patches/june_2013/p09_update_global_defaults.py
+++ b/patches/june_2013/p09_update_global_defaults.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 # License: GNU General Public License v3. See license.txt
 
 import webnotes
diff --git a/patches/june_2013/p10_lead_address.py b/patches/june_2013/p10_lead_address.py
index fc1cbbf..0be3390 100644
--- a/patches/june_2013/p10_lead_address.py
+++ b/patches/june_2013/p10_lead_address.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 # License: GNU General Public License v3. See license.txt
 
 import webnotes
diff --git a/patches/march_2013/p01_c_form.py b/patches/march_2013/p01_c_form.py
index 54fb802..9621257 100644
--- a/patches/march_2013/p01_c_form.py
+++ b/patches/march_2013/p01_c_form.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 # License: GNU General Public License v3. See license.txt
 
 import webnotes
diff --git a/patches/march_2013/p02_get_global_default.py b/patches/march_2013/p02_get_global_default.py
index d36d5fa..cd96ece 100644
--- a/patches/march_2013/p02_get_global_default.py
+++ b/patches/march_2013/p02_get_global_default.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 # License: GNU General Public License v3. See license.txt
 
 import webnotes
diff --git a/patches/march_2013/p03_rename_blog_to_blog_post.py b/patches/march_2013/p03_rename_blog_to_blog_post.py
index 8078c84..85ae6ad 100644
--- a/patches/march_2013/p03_rename_blog_to_blog_post.py
+++ b/patches/march_2013/p03_rename_blog_to_blog_post.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 # License: GNU General Public License v3. See license.txt
 
 import webnotes
diff --git a/patches/march_2013/p04_pos_update_stock_check.py b/patches/march_2013/p04_pos_update_stock_check.py
index f857031..9faac0b 100644
--- a/patches/march_2013/p04_pos_update_stock_check.py
+++ b/patches/march_2013/p04_pos_update_stock_check.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 # License: GNU General Public License v3. See license.txt
 
 import webnotes
diff --git a/patches/march_2013/p05_payment_reconciliation.py b/patches/march_2013/p05_payment_reconciliation.py
index ed818dc..c8639e6 100644
--- a/patches/march_2013/p05_payment_reconciliation.py
+++ b/patches/march_2013/p05_payment_reconciliation.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 # License: GNU General Public License v3. See license.txt
 
 import webnotes
diff --git a/patches/march_2013/p06_remove_sales_purchase_return_tool.py b/patches/march_2013/p06_remove_sales_purchase_return_tool.py
index ac11ecc..ab40c89 100644
--- a/patches/march_2013/p06_remove_sales_purchase_return_tool.py
+++ b/patches/march_2013/p06_remove_sales_purchase_return_tool.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 # License: GNU General Public License v3. See license.txt
 
 import webnotes
diff --git a/patches/march_2013/p07_update_project_in_stock_ledger.py b/patches/march_2013/p07_update_project_in_stock_ledger.py
index 66c86fb..3e95d4fe 100644
--- a/patches/march_2013/p07_update_project_in_stock_ledger.py
+++ b/patches/march_2013/p07_update_project_in_stock_ledger.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 # License: GNU General Public License v3. See license.txt
 
 import webnotes
diff --git a/patches/march_2013/p07_update_valuation_rate.py b/patches/march_2013/p07_update_valuation_rate.py
index 87a2517..0928061 100644
--- a/patches/march_2013/p07_update_valuation_rate.py
+++ b/patches/march_2013/p07_update_valuation_rate.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 # License: GNU General Public License v3. See license.txt
 
 import webnotes
diff --git a/patches/march_2013/p08_create_aii_accounts.py b/patches/march_2013/p08_create_aii_accounts.py
index c02b5a2e..78c245f 100644
--- a/patches/march_2013/p08_create_aii_accounts.py
+++ b/patches/march_2013/p08_create_aii_accounts.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 # License: GNU General Public License v3. See license.txt
 
 import webnotes
diff --git a/patches/march_2013/p10_set_fiscal_year_for_stock.py b/patches/march_2013/p10_set_fiscal_year_for_stock.py
index 608f188..1f5adf6 100644
--- a/patches/march_2013/p10_set_fiscal_year_for_stock.py
+++ b/patches/march_2013/p10_set_fiscal_year_for_stock.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 # License: GNU General Public License v3. See license.txt
 
 import webnotes
diff --git a/patches/march_2013/p10_update_against_expense_account.py b/patches/march_2013/p10_update_against_expense_account.py
index 8939514..4814953 100644
--- a/patches/march_2013/p10_update_against_expense_account.py
+++ b/patches/march_2013/p10_update_against_expense_account.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 # License: GNU General Public License v3. See license.txt
 
 def execute():
diff --git a/patches/march_2013/p11_update_attach_files.py b/patches/march_2013/p11_update_attach_files.py
index 5be659d..f7b0a53 100644
--- a/patches/march_2013/p11_update_attach_files.py
+++ b/patches/march_2013/p11_update_attach_files.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 # License: GNU General Public License v3. See license.txt
 
 import webnotes
diff --git a/patches/march_2013/p12_set_item_tax_rate_in_json.py b/patches/march_2013/p12_set_item_tax_rate_in_json.py
index 27fd7e8..85ddafc 100644
--- a/patches/march_2013/p12_set_item_tax_rate_in_json.py
+++ b/patches/march_2013/p12_set_item_tax_rate_in_json.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 # License: GNU General Public License v3. See license.txt
 
 import webnotes
diff --git a/patches/march_2013/update_po_prevdoc_doctype.py b/patches/march_2013/update_po_prevdoc_doctype.py
index 745420e..ab7c932 100644
--- a/patches/march_2013/update_po_prevdoc_doctype.py
+++ b/patches/march_2013/update_po_prevdoc_doctype.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 # License: GNU General Public License v3. See license.txt
 
 import webnotes
diff --git a/patches/may_2013/p01_selling_net_total_export.py b/patches/may_2013/p01_selling_net_total_export.py
index a942f4d..0a3cf5b 100644
--- a/patches/may_2013/p01_selling_net_total_export.py
+++ b/patches/may_2013/p01_selling_net_total_export.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 # License: GNU General Public License v3. See license.txt
 
 from __future__ import unicode_literals
diff --git a/patches/may_2013/p02_update_valuation_rate.py b/patches/may_2013/p02_update_valuation_rate.py
index c8226c8..b521734 100644
--- a/patches/may_2013/p02_update_valuation_rate.py
+++ b/patches/may_2013/p02_update_valuation_rate.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 # License: GNU General Public License v3. See license.txt
 
 from __future__ import unicode_literals
diff --git a/patches/may_2013/p03_update_support_ticket.py b/patches/may_2013/p03_update_support_ticket.py
index d8e37236..954bcf8 100644
--- a/patches/may_2013/p03_update_support_ticket.py
+++ b/patches/may_2013/p03_update_support_ticket.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 # License: GNU General Public License v3. See license.txt
 
 from __future__ import unicode_literals
diff --git a/patches/may_2013/p04_reorder_level.py b/patches/may_2013/p04_reorder_level.py
index 8462ff9..351e799 100644
--- a/patches/may_2013/p04_reorder_level.py
+++ b/patches/may_2013/p04_reorder_level.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 # License: GNU General Public License v3. See license.txt
 
 from __future__ import unicode_literals
diff --git a/patches/may_2013/p05_update_cancelled_gl_entries.py b/patches/may_2013/p05_update_cancelled_gl_entries.py
index 18cefc8..bea2832 100644
--- a/patches/may_2013/p05_update_cancelled_gl_entries.py
+++ b/patches/may_2013/p05_update_cancelled_gl_entries.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 # License: GNU General Public License v3. See license.txt
 
 from __future__ import unicode_literals
diff --git a/patches/may_2013/p06_make_notes.py b/patches/may_2013/p06_make_notes.py
index 29bfe25..adb3dfd 100644
--- a/patches/may_2013/p06_make_notes.py
+++ b/patches/may_2013/p06_make_notes.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 # License: GNU General Public License v3. See license.txt
 
 import webnotes, markdown2
@@ -33,7 +33,7 @@
 				pass
 			except Exception, e:
 				if e.args[0] != 1062:
-					raise e
+					raise
 
 	webnotes.delete_doc("DocType", "Question")
 	webnotes.delete_doc("DocType", "Answer")
diff --git a/patches/may_2013/p06_update_billed_amt_po_pr.py b/patches/may_2013/p06_update_billed_amt_po_pr.py
index 3f66c03..9acbe91 100644
--- a/patches/may_2013/p06_update_billed_amt_po_pr.py
+++ b/patches/may_2013/p06_update_billed_amt_po_pr.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 # License: GNU General Public License v3. See license.txt
 
 from __future__ import unicode_literals
diff --git a/patches/may_2013/p07_move_update_stock_to_pos.py b/patches/may_2013/p07_move_update_stock_to_pos.py
index c4dfdc0..13c5f77 100644
--- a/patches/may_2013/p07_move_update_stock_to_pos.py
+++ b/patches/may_2013/p07_move_update_stock_to_pos.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 # License: GNU General Public License v3. See license.txt
 
 import webnotes, webnotes.defaults
diff --git a/patches/may_2013/p08_change_item_wise_tax.py b/patches/may_2013/p08_change_item_wise_tax.py
index bf84910..a5aa6bf 100644
--- a/patches/may_2013/p08_change_item_wise_tax.py
+++ b/patches/may_2013/p08_change_item_wise_tax.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 # License: GNU General Public License v3. See license.txt
 
 import webnotes
diff --git a/patches/may_2013/repost_stock_for_no_posting_time.py b/patches/may_2013/repost_stock_for_no_posting_time.py
index 057705b..db03992 100644
--- a/patches/may_2013/repost_stock_for_no_posting_time.py
+++ b/patches/may_2013/repost_stock_for_no_posting_time.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 # License: GNU General Public License v3. See license.txt
 
 from __future__ import unicode_literals
diff --git a/patches/november_2012/add_employee_field_in_employee.py b/patches/november_2012/add_employee_field_in_employee.py
index bece53e..d834eb9 100644
--- a/patches/november_2012/add_employee_field_in_employee.py
+++ b/patches/november_2012/add_employee_field_in_employee.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 # License: GNU General Public License v3. See license.txt
 
 import webnotes
diff --git a/patches/november_2012/add_theme_to_profile.py b/patches/november_2012/add_theme_to_profile.py
index 8b4de68..7b912b2 100644
--- a/patches/november_2012/add_theme_to_profile.py
+++ b/patches/november_2012/add_theme_to_profile.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 # License: GNU General Public License v3. See license.txt
 
 import webnotes
diff --git a/patches/november_2012/cancelled_bom_patch.py b/patches/november_2012/cancelled_bom_patch.py
index 150e411..75d867c 100644
--- a/patches/november_2012/cancelled_bom_patch.py
+++ b/patches/november_2012/cancelled_bom_patch.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 # License: GNU General Public License v3. See license.txt
 
 import webnotes
diff --git a/patches/november_2012/communication_sender_and_recipient.py b/patches/november_2012/communication_sender_and_recipient.py
index f18924f..e05a24b 100644
--- a/patches/november_2012/communication_sender_and_recipient.py
+++ b/patches/november_2012/communication_sender_and_recipient.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 # License: GNU General Public License v3. See license.txt
 
 import webnotes
diff --git a/patches/november_2012/custom_field_insert_after.py b/patches/november_2012/custom_field_insert_after.py
index 404df40..e261573 100644
--- a/patches/november_2012/custom_field_insert_after.py
+++ b/patches/november_2012/custom_field_insert_after.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 # License: GNU General Public License v3. See license.txt
 
 import webnotes
diff --git a/patches/november_2012/customer_issue_allocated_to_assigned.py b/patches/november_2012/customer_issue_allocated_to_assigned.py
index d249abe..e1e8cfe 100644
--- a/patches/november_2012/customer_issue_allocated_to_assigned.py
+++ b/patches/november_2012/customer_issue_allocated_to_assigned.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 # License: GNU General Public License v3. See license.txt
 
 from __future__ import unicode_literals
diff --git a/patches/november_2012/disable_cancelled_profiles.py b/patches/november_2012/disable_cancelled_profiles.py
index 663004b..68e8867 100644
--- a/patches/november_2012/disable_cancelled_profiles.py
+++ b/patches/november_2012/disable_cancelled_profiles.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 # License: GNU General Public License v3. See license.txt
 
 import webnotes
diff --git a/patches/november_2012/gle_floating_point_issue.py b/patches/november_2012/gle_floating_point_issue.py
index 7ff3aca..e9fdcf1 100644
--- a/patches/november_2012/gle_floating_point_issue.py
+++ b/patches/november_2012/gle_floating_point_issue.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 # License: GNU General Public License v3. See license.txt
 
 def execute():
diff --git a/patches/november_2012/leave_application_cleanup.py b/patches/november_2012/leave_application_cleanup.py
index 196a9f1..2a566e7 100644
--- a/patches/november_2012/leave_application_cleanup.py
+++ b/patches/november_2012/leave_application_cleanup.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 # License: GNU General Public License v3. See license.txt
 
 import webnotes
diff --git a/patches/november_2012/production_order_patch.py b/patches/november_2012/production_order_patch.py
index 1a4e140..a25c2c8 100644
--- a/patches/november_2012/production_order_patch.py
+++ b/patches/november_2012/production_order_patch.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 # License: GNU General Public License v3. See license.txt
 
 def execute():
diff --git a/patches/november_2012/report_permissions.py b/patches/november_2012/report_permissions.py
index 31c4b74..64b3498 100644
--- a/patches/november_2012/report_permissions.py
+++ b/patches/november_2012/report_permissions.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 # License: GNU General Public License v3. See license.txt
 
 import webnotes
diff --git a/patches/november_2012/reset_appraisal_permissions.py b/patches/november_2012/reset_appraisal_permissions.py
index aa46676..3bb2c01 100644
--- a/patches/november_2012/reset_appraisal_permissions.py
+++ b/patches/november_2012/reset_appraisal_permissions.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 # License: GNU General Public License v3. See license.txt
 
 import webnotes
diff --git a/patches/november_2012/support_ticket_response_to_communication.py b/patches/november_2012/support_ticket_response_to_communication.py
index b4d6068..a4dec94 100644
--- a/patches/november_2012/support_ticket_response_to_communication.py
+++ b/patches/november_2012/support_ticket_response_to_communication.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 # License: GNU General Public License v3. See license.txt
 
 import webnotes
diff --git a/patches/november_2012/update_delivered_billed_percentage_for_pos.py b/patches/november_2012/update_delivered_billed_percentage_for_pos.py
index 0703f94..4f64255 100644
--- a/patches/november_2012/update_delivered_billed_percentage_for_pos.py
+++ b/patches/november_2012/update_delivered_billed_percentage_for_pos.py
@@ -1,12 +1,8 @@
-# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 # License: GNU General Public License v3. See license.txt
 
 def execute():
 	import webnotes
-	from webnotes.model.code import get_obj
-	
-	#sc_obj = get_obj("Sales Common")
-	from selling.doctype.sales_common import sales_common
 	
 	si = webnotes.conn.sql("""select distinct si.name 
 		from `tabSales Invoice` si, `tabSales Invoice Item` si_item
@@ -16,5 +12,4 @@
 		and ifnull(si_item.sales_order, '') != ''
 	""")
 	for d in si:
-		sales_common.StatusUpdater(get_obj("Sales Invoice", d[0], with_children=1), \
-		 	1).update_all_qty()
\ No newline at end of file
+		webnotes.bean("Sales Invoice", d[0]).run_method("update_qty")
\ No newline at end of file
diff --git a/patches/october_2012/company_fiscal_year_docstatus_patch.py b/patches/october_2012/company_fiscal_year_docstatus_patch.py
index 0a3cf27..3e3177e 100644
--- a/patches/october_2012/company_fiscal_year_docstatus_patch.py
+++ b/patches/october_2012/company_fiscal_year_docstatus_patch.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 # License: GNU General Public License v3. See license.txt
 
 import webnotes
diff --git a/patches/october_2012/custom_script_delete_permission.py b/patches/october_2012/custom_script_delete_permission.py
index b87a49c..bc5d46a 100644
--- a/patches/october_2012/custom_script_delete_permission.py
+++ b/patches/october_2012/custom_script_delete_permission.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 # License: GNU General Public License v3. See license.txt
 
 import webnotes
diff --git a/patches/october_2012/fix_cancelled_gl_entries.py b/patches/october_2012/fix_cancelled_gl_entries.py
index 475ea1c..ee6058e 100644
--- a/patches/october_2012/fix_cancelled_gl_entries.py
+++ b/patches/october_2012/fix_cancelled_gl_entries.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 # License: GNU General Public License v3. See license.txt
 
 def execute():
diff --git a/patches/october_2012/fix_wrong_vouchers.py b/patches/october_2012/fix_wrong_vouchers.py
index 85bf2ab..48e996c 100644
--- a/patches/october_2012/fix_wrong_vouchers.py
+++ b/patches/october_2012/fix_wrong_vouchers.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 # License: GNU General Public License v3. See license.txt
 
 def execute():
diff --git a/patches/october_2012/update_account_property.py b/patches/october_2012/update_account_property.py
index cc7d005..0af1bcb 100644
--- a/patches/october_2012/update_account_property.py
+++ b/patches/october_2012/update_account_property.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 # License: GNU General Public License v3. See license.txt
 
 def execute():
diff --git a/patches/october_2012/update_permission.py b/patches/october_2012/update_permission.py
index 04f5d07..dc5e0f5 100644
--- a/patches/october_2012/update_permission.py
+++ b/patches/october_2012/update_permission.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 # License: GNU General Public License v3. See license.txt
 
 from __future__ import unicode_literals
diff --git a/patches/october_2013/fix_is_cancelled_in_sle.py b/patches/october_2013/fix_is_cancelled_in_sle.py
index cb51b5d..cb5bcb9 100644
--- a/patches/october_2013/fix_is_cancelled_in_sle.py
+++ b/patches/october_2013/fix_is_cancelled_in_sle.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 # License: GNU General Public License v3. See license.txt
 
 from __future__ import unicode_literals
diff --git a/patches/october_2013/p01_fix_serial_no_status.py b/patches/october_2013/p01_fix_serial_no_status.py
index e7bf52a..4f00b27 100644
--- a/patches/october_2013/p01_fix_serial_no_status.py
+++ b/patches/october_2013/p01_fix_serial_no_status.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 # License: GNU General Public License v3. See license.txt
 
 from __future__ import unicode_literals
diff --git a/patches/october_2013/p01_update_delivery_note_prevdocs.py b/patches/october_2013/p01_update_delivery_note_prevdocs.py
new file mode 100644
index 0000000..3fb06b0
--- /dev/null
+++ b/patches/october_2013/p01_update_delivery_note_prevdocs.py
@@ -0,0 +1,13 @@
+# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
+# License: GNU General Public License v3. See license.txt
+
+from __future__ import unicode_literals
+import webnotes
+
+def execute():
+	webnotes.reload_doc("stock", "doctype", "delivery_note_item")
+	webnotes.conn.sql("""update `tabDelivery Note Item` set against_sales_order=prevdoc_docname
+		where prevdoc_doctype='Sales Order' """)
+		
+	webnotes.conn.sql("""update `tabDelivery Note Item` set against_sales_invoice=prevdoc_docname
+		where prevdoc_doctype='Sales Invoice' """)
\ No newline at end of file
diff --git a/patches/october_2013/p02_set_communication_status.py b/patches/october_2013/p02_set_communication_status.py
new file mode 100644
index 0000000..e8820ff
--- /dev/null
+++ b/patches/october_2013/p02_set_communication_status.py
@@ -0,0 +1,11 @@
+# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
+# License: GNU General Public License v3. See license.txt
+
+from __future__ import unicode_literals
+import webnotes
+
+def execute():
+	webnotes.reload_doc("core", "doctype", "communication")
+	
+	webnotes.conn.sql("""update tabCommunication 
+		set sent_or_received= if(ifnull(recipients, '')='', "Received", "Sent")""")
\ No newline at end of file
diff --git a/patches/october_2013/p02_update_price_list_and_item_details_in_item_price.py b/patches/october_2013/p02_update_price_list_and_item_details_in_item_price.py
index 4a90b8c..3b4ca83 100644
--- a/patches/october_2013/p02_update_price_list_and_item_details_in_item_price.py
+++ b/patches/october_2013/p02_update_price_list_and_item_details_in_item_price.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 # License: GNU General Public License v3. See license.txt
 
 from __future__ import unicode_literals
diff --git a/patches/october_2013/p03_crm_update_status.py b/patches/october_2013/p03_crm_update_status.py
new file mode 100644
index 0000000..bfc5437
--- /dev/null
+++ b/patches/october_2013/p03_crm_update_status.py
@@ -0,0 +1,47 @@
+# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
+# License: GNU General Public License v3. See license.txt
+
+from __future__ import unicode_literals
+import webnotes
+
+# reason field
+
+def execute():
+	change_map = {
+		"Lead": [
+			["Lead Lost", "Lead"],
+			["Not interested", "Do Not Contact"],
+			["Opportunity Made", "Opportunity"],
+			["Contacted", "Replied"],
+			["Attempted to Contact", "Replied"],
+			["Contact in Future", "Interested"],
+		],
+		"Opportunity": [
+			["Quotation Sent", "Quotation"],
+			["Order Confirmed", "Quotation"],
+			["Opportunity Lost", "Lost"],
+		],
+		"Quotation": [
+			["Order Confirmed", "Ordered"],
+			["Order Lost", "Lost"]
+		],
+		"Support Ticket": [
+			["Waiting for Customer", "Replied"],
+			["To Reply", "Open"],
+		]
+	}
+	
+	for dt, opts in change_map.items():
+		for status in opts:
+			webnotes.conn.sql("""update `tab%s` set status=%s where status=%s""" % \
+				(dt, "%s", "%s"), (status[1], status[0]))
+				
+	for dt in ["Lead", "Opportunity"]:
+		for name in webnotes.conn.sql_list("""select name from `tab%s`""" % dt):
+			bean = webnotes.bean(dt, name)
+			before_status = bean.doc.status
+			bean.get_controller().set_status()
+			
+			if bean.doc.status != before_status:
+				webnotes.conn.sql("""update `tab%s` set status=%s where name=%s""" % (dt, "%s", "%s"),
+					(bean.doc.status, name))
diff --git a/patches/october_2013/p03_remove_sales_and_purchase_return_tool.py b/patches/october_2013/p03_remove_sales_and_purchase_return_tool.py
index e0965ab..a70c73d 100644
--- a/patches/october_2013/p03_remove_sales_and_purchase_return_tool.py
+++ b/patches/october_2013/p03_remove_sales_and_purchase_return_tool.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 # License: GNU General Public License v3. See license.txt
 
 from __future__ import unicode_literals
diff --git a/patches/october_2013/p04_update_report_permission.py b/patches/october_2013/p04_update_report_permission.py
index 1a9f99d..459e57d 100644
--- a/patches/october_2013/p04_update_report_permission.py
+++ b/patches/october_2013/p04_update_report_permission.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 # License: GNU General Public License v3. See license.txt
 
 import webnotes
diff --git a/patches/october_2013/p04_wsgi_migration.py b/patches/october_2013/p04_wsgi_migration.py
new file mode 100644
index 0000000..9031c70
--- /dev/null
+++ b/patches/october_2013/p04_wsgi_migration.py
@@ -0,0 +1,33 @@
+# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
+# License: GNU General Public License v3. See license.txt
+
+from __future__ import unicode_literals
+import webnotes
+import webnotes.utils
+import os
+
+def execute():
+	base_path = webnotes.utils.get_base_path()
+	
+	# Remove symlinks from public folder:
+	# 	- server.py
+	# 	- web.py
+	# 	- unsupported.html
+	# 	- blank.html
+	# 	- rss.xml
+	# 	- sitemap.xml
+	for file in ("server.py", "web.py", "unsupported.html", "blank.html", "rss.xml", "sitemap.xml"):
+		file_path = os.path.join(base_path, "public", file)
+		if os.path.exists(file_path):
+			os.remove(file_path)
+			
+	# Remove wn-web files
+	# 	- js/wn-web.js
+	# 	- css/wn-web.css
+	for file_path in (("js", "wn-web.js"), ("css", "wn-web.css")):
+		file_path = os.path.join(base_path, "public", *file_path)
+		if os.path.exists(file_path):
+			os.remove(file_path)
+			
+	# Remove update app page
+	webnotes.delete_doc("Page", "update-manager")
diff --git a/patches/october_2013/p05_delete_gl_entries_for_cancelled_vouchers.py b/patches/october_2013/p05_delete_gl_entries_for_cancelled_vouchers.py
index 1d8657a..b418f1f 100644
--- a/patches/october_2013/p05_delete_gl_entries_for_cancelled_vouchers.py
+++ b/patches/october_2013/p05_delete_gl_entries_for_cancelled_vouchers.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 # License: GNU General Public License v3. See license.txt
 
 def execute():
diff --git a/patches/october_2013/p05_server_custom_script_to_file.py b/patches/october_2013/p05_server_custom_script_to_file.py
new file mode 100644
index 0000000..76ec56c
--- /dev/null
+++ b/patches/october_2013/p05_server_custom_script_to_file.py
@@ -0,0 +1,40 @@
+# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
+# License: GNU General Public License v3. See license.txt
+
+from __future__ import unicode_literals
+import webnotes
+
+def execute():
+	"""
+		Assuming that some kind of indentation exists:
+		- Find indentation of server custom script
+		- replace indentation with tabs
+		- Add line:
+			class CustomDocType(DocType):
+		- Add tab indented code after this line
+		- Write to file
+		- Delete custom script record
+	"""
+	import os
+	from webnotes.utils import get_site_base_path
+	from core.doctype.custom_script.custom_script import make_custom_server_script_file
+	for name, dt, script in webnotes.conn.sql("""select name, dt, script from `tabCustom Script`
+		where script_type='Server'"""):
+			if script and script.strip():
+				try:
+					script = indent_using_tabs(script)
+					make_custom_server_script_file(dt, script)
+				except IOError, e:
+					if "already exists" not in repr(e):
+						raise
+			
+def indent_using_tabs(script):
+	for line in script.split("\n"):
+		try:
+			indentation_used = line[:line.index("def ")]
+			script = script.replace(indentation_used, "\t")
+			break
+		except ValueError:
+			pass
+	
+	return script
\ No newline at end of file
diff --git a/patches/october_2013/p06_rename_packing_list_doctype.py b/patches/october_2013/p06_rename_packing_list_doctype.py
new file mode 100644
index 0000000..b4af592
--- /dev/null
+++ b/patches/october_2013/p06_rename_packing_list_doctype.py
@@ -0,0 +1,21 @@
+# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
+# License: GNU General Public License v3. See license.txt
+
+from __future__ import unicode_literals
+import webnotes, os
+
+def execute():
+	webnotes.reload_doc("core", "doctype", "doctype")
+	
+	tables = webnotes.conn.sql_list("show tables")
+	
+	if "tabPacked Item" not in tables:
+		webnotes.rename_doc("DocType", "Delivery Note Packing Item", "Packed Item", force=True)
+	
+	webnotes.reload_doc("stock", "doctype", "packed_item")
+	
+	if os.path.exists("app/stock/doctype/delivery_note_packing_item"):
+		os.system("rm -rf app/stock/doctype/delivery_note_packing_item")
+	
+	if webnotes.conn.exists("DocType", "Delivery Note Packing Item"):
+			webnotes.delete_doc("DocType", "Delivery Note Packing Item")
\ No newline at end of file
diff --git a/patches/october_2013/p06_update_control_panel_and_global_defaults.py b/patches/october_2013/p06_update_control_panel_and_global_defaults.py
index 8c12107..cee5a6d 100644
--- a/patches/october_2013/p06_update_control_panel_and_global_defaults.py
+++ b/patches/october_2013/p06_update_control_panel_and_global_defaults.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 # License: GNU General Public License v3. See license.txt
 
 from __future__ import unicode_literals
diff --git a/patches/october_2013/p07_rename_for_territory.py b/patches/october_2013/p07_rename_for_territory.py
index 2ce7ed4..7b10b71 100644
--- a/patches/october_2013/p07_rename_for_territory.py
+++ b/patches/october_2013/p07_rename_for_territory.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 # License: GNU General Public License v3. See license.txt
 
 from __future__ import unicode_literals
@@ -7,7 +7,6 @@
 def execute():
 	from webnotes.utils import get_base_path
 	import shutil
-	
 	webnotes.reload_doc("core", "doctype", "doctype")
 
 	tables = webnotes.conn.sql_list("show tables")
@@ -22,4 +21,4 @@
 		shutil.rmtree(path)
 	
 	if webnotes.conn.exists("DocType", "For Territory"):
-			webnotes.delete_doc("DocType", "For Territory")
\ No newline at end of file
+		webnotes.delete_doc("DocType", "For Territory")
diff --git a/patches/october_2013/p08_cleanup_after_item_price_module_change.py b/patches/october_2013/p08_cleanup_after_item_price_module_change.py
index cbc1c86..783f1e4 100644
--- a/patches/october_2013/p08_cleanup_after_item_price_module_change.py
+++ b/patches/october_2013/p08_cleanup_after_item_price_module_change.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 # License: GNU General Public License v3. See license.txt
 
 from __future__ import unicode_literals
@@ -11,4 +11,4 @@
 	for dt in ("item_price", "price_list"):
 		path = os.path.join(get_base_path(), "app", "setup", "doctype", dt)
 		if os.path.exists(path):
-			shutil.rmtree(path)
\ No newline at end of file
+			shutil.rmtree(path)
diff --git a/patches/october_2013/p09_update_naming_series_settings.py b/patches/october_2013/p09_update_naming_series_settings.py
new file mode 100644
index 0000000..18f44dc
--- /dev/null
+++ b/patches/october_2013/p09_update_naming_series_settings.py
@@ -0,0 +1,10 @@
+# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
+# License: GNU General Public License v3. See license.txt
+
+from __future__ import unicode_literals
+import webnotes
+
+def execute():
+	# reset property setters for series
+	for name in ("Stock Settings", "Selling Settings", "Buying Settings", "HR Settings"):
+		webnotes.bean(name, name).save()
\ No newline at end of file
diff --git a/patches/october_2013/p10_plugins_refactor.py b/patches/october_2013/p10_plugins_refactor.py
new file mode 100644
index 0000000..47d9d09
--- /dev/null
+++ b/patches/october_2013/p10_plugins_refactor.py
@@ -0,0 +1,24 @@
+# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
+# License: GNU General Public License v3. See license.txt
+
+from __future__ import unicode_literals
+import webnotes, os, shutil
+
+def execute():
+	# changed cache key for plugin code files
+	for doctype in webnotes.conn.sql_list("""select name from `tabDocType`"""):
+		webnotes.cache().delete_value("_server_script:"+doctype)
+	
+	# move custom script reports to plugins folder
+	for name in webnotes.conn.sql_list("""select name from `tabReport`
+		where report_type="Script Report" and is_standard="No" """):
+			bean = webnotes.bean("Report", name)
+			bean.save()
+			
+			module = webnotes.conn.get_value("DocType", bean.doc.ref_doctype, "module")
+			path = webnotes.modules.get_doc_path(module, "Report", name)
+			for extn in ["py", "js"]:
+				file_path = os.path.join(path, name + "." + extn)
+				plugins_file_path = webnotes.plugins.get_path(module, "Report", name, extn=extn)
+				if not os.path.exists(plugins_file_path) and os.path.exists(file_path):
+					shutil.copyfile(file_path, plugins_file_path)
\ No newline at end of file
diff --git a/patches/october_2013/perpetual_inventory_stock_transfer_utility.py b/patches/october_2013/perpetual_inventory_stock_transfer_utility.py
index d8cade7..5937422 100644
--- a/patches/october_2013/perpetual_inventory_stock_transfer_utility.py
+++ b/patches/october_2013/perpetual_inventory_stock_transfer_utility.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 # License: GNU General Public License v3. See license.txt
 
 from __future__ import unicode_literals
diff --git a/patches/october_2013/repost_ordered_qty.py b/patches/october_2013/repost_ordered_qty.py
index 5582794..8295e29 100644
--- a/patches/october_2013/repost_ordered_qty.py
+++ b/patches/october_2013/repost_ordered_qty.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 # License: GNU General Public License v3. See license.txt
 
 def execute():
diff --git a/patches/october_2013/repost_planned_qty.py b/patches/october_2013/repost_planned_qty.py
index cfe47ca..6a78d33 100644
--- a/patches/october_2013/repost_planned_qty.py
+++ b/patches/october_2013/repost_planned_qty.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 # License: GNU General Public License v3. See license.txt
 
 def execute():
diff --git a/patches/october_2013/set_stock_value_diff_in_sle.py b/patches/october_2013/set_stock_value_diff_in_sle.py
index 25f95e0..1f29ddc 100644
--- a/patches/october_2013/set_stock_value_diff_in_sle.py
+++ b/patches/october_2013/set_stock_value_diff_in_sle.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 # License: GNU General Public License v3. See license.txt
 
 from __future__ import unicode_literals
diff --git a/patches/patch_list.py b/patches/patch_list.py
index 82eb6e4..f8faa44 100644
--- a/patches/patch_list.py
+++ b/patches/patch_list.py
@@ -1,12 +1,10 @@
-# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 # License: GNU General Public License v3. See license.txt
 
 from __future__ import unicode_literals
 patch_list = [
-	"execute:webnotes.reload_doc('core', 'doctype', 'doctype', force=True) #2013-07-15",
-	"execute:webnotes.reload_doc('core', 'doctype', 'docfield', force=True) #2013-07-15",
-	"execute:webnotes.reload_doc('core', 'doctype', 'doctype', force=True) #2013-07-16",
-	"execute:webnotes.reload_doc('core', 'doctype', 'docfield', force=True) #2013-07-16",
+	"execute:webnotes.reload_doc('core', 'doctype', 'doctype', force=True) #2013-10-15",
+	"execute:webnotes.reload_doc('core', 'doctype', 'docfield', force=True) #2013-10-15",
 	"execute:webnotes.reload_doc('core', 'doctype', 'docperm') #2013-07-16",
 	"execute:webnotes.reload_doc('core', 'doctype', 'page') #2013-07-16",
 	"execute:webnotes.reload_doc('core', 'doctype', 'report') #2013-07-16",
@@ -214,13 +212,21 @@
 	"execute:webnotes.delete_doc('DocType', 'Budget Control')",
 	"patches.september_2013.p03_update_stock_uom_in_sle",
 	"patches.september_2013.p03_move_website_to_framework",
-	"execute:webnotes.bean('Style Settings').save() #2013-09-19",
 	"execute:webnotes.conn.set_value('Accounts Settings', None, 'frozen_accounts_modifier', 'Accounts Manager') # 2013-09-24",
 	"patches.september_2013.p04_unsubmit_serial_nos",
 	"patches.september_2013.p05_fix_customer_in_pos",
 	"patches.october_2013.fix_is_cancelled_in_sle",
+	"patches.october_2013.p01_update_delivery_note_prevdocs",
+	"patches.october_2013.p02_set_communication_status",
+	"patches.october_2013.p03_crm_update_status",
+	"execute:webnotes.delete_doc('DocType', 'Setup Control')",
+	"patches.october_2013.p04_wsgi_migration",
+	"patches.october_2013.p05_server_custom_script_to_file",
 	"patches.october_2013.repost_ordered_qty",
 	"patches.october_2013.repost_planned_qty",
+	"patches.october_2013.p06_rename_packing_list_doctype",
+	"execute:webnotes.delete_doc('DocType', 'Sales Common')",
+	"patches.october_2013.p09_update_naming_series_settings",
 	"patches.october_2013.p02_update_price_list_and_item_details_in_item_price",
 	"execute:webnotes.delete_doc('Report', 'Item-wise Price List')",
 	"patches.october_2013.p03_remove_sales_and_purchase_return_tool",
@@ -230,5 +236,18 @@
 	"patches.october_2013.p07_rename_for_territory",
 	"patches.june_2013.p07_taxes_price_list_for_territory",
 	"patches.october_2013.p08_cleanup_after_item_price_module_change",
-	"patches.november_2013.p01_make_gl_entries_for_si",
+	"patches.october_2013.p10_plugins_refactor",
+	"patches.1311.p01_cleanup",
+	"execute:webnotes.reload_doc('website', 'doctype', 'table_of_contents') #2013-11-13",
+	"execute:webnotes.reload_doc('website', 'doctype', 'web_page') #2013-11-13",
+	"execute:webnotes.reload_doc('home', 'doctype', 'feed') #2013-11-15",
+	"execute:webnotes.reload_doc('core', 'doctype', 'defaultvalue') #2013-11-15",
+	"execute:webnotes.reload_doc('core', 'doctype', 'comment') #2013-11-15",
+	"patches.1311.p02_index_singles",
+	"patches.1311.p01_make_gl_entries_for_si",
+    "patches.1311.p03_update_reqd_report_fields",
+	"execute:webnotes.reload_doc('website', 'doctype', 'website_sitemap_config') #2013-11-20",
+	"execute:webnotes.reload_doc('website', 'doctype', 'website_sitemap') #2013-11-20",
+	"execute:webnotes.bean('Style Settings').save() #2013-11-20",
+    "execute:webnotes.get_module('website.doctype.website_sitemap_config.website_sitemap_config').rebuild_website_sitemap_config()",
 ]
\ No newline at end of file
diff --git a/patches/september_2012/add_stock_ledger_entry_index.py b/patches/september_2012/add_stock_ledger_entry_index.py
index dc3ed96..69e9d54 100644
--- a/patches/september_2012/add_stock_ledger_entry_index.py
+++ b/patches/september_2012/add_stock_ledger_entry_index.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 # License: GNU General Public License v3. See license.txt
 
 from __future__ import unicode_literals
@@ -10,6 +10,6 @@
 		webnotes.conn.sql("""alter table `tabStock Ledger Entry` add index posting_sort_index(posting_date, posting_time, name)""")
 		webnotes.conn.commit()
 	except Exception, e:
-		if e.args[0]!=1061: raise e
+		if e.args[0]!=1061: raise
 	webnotes.conn.begin()
 	
\ No newline at end of file
diff --git a/patches/september_2012/all_permissions_patch.py b/patches/september_2012/all_permissions_patch.py
index bc318ba..d0caa01 100644
--- a/patches/september_2012/all_permissions_patch.py
+++ b/patches/september_2012/all_permissions_patch.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 # License: GNU General Public License v3. See license.txt
 
 from __future__ import unicode_literals
diff --git a/patches/september_2012/communication_delete_permission.py b/patches/september_2012/communication_delete_permission.py
index ef4d02e..06451e9 100644
--- a/patches/september_2012/communication_delete_permission.py
+++ b/patches/september_2012/communication_delete_permission.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 # License: GNU General Public License v3. See license.txt
 
 from __future__ import unicode_literals
diff --git a/patches/september_2012/customer_permission_patch.py b/patches/september_2012/customer_permission_patch.py
index 8334156..a249aec 100644
--- a/patches/september_2012/customer_permission_patch.py
+++ b/patches/september_2012/customer_permission_patch.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 # License: GNU General Public License v3. See license.txt
 
 from __future__ import unicode_literals
diff --git a/patches/september_2012/deprecate_account_balance.py b/patches/september_2012/deprecate_account_balance.py
index c7e5a8c..1f5ce72 100644
--- a/patches/september_2012/deprecate_account_balance.py
+++ b/patches/september_2012/deprecate_account_balance.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 # License: GNU General Public License v3. See license.txt
 
 from __future__ import unicode_literals
diff --git a/patches/september_2012/event_permission.py b/patches/september_2012/event_permission.py
index ad965e5..5dd7c89 100644
--- a/patches/september_2012/event_permission.py
+++ b/patches/september_2012/event_permission.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 # License: GNU General Public License v3. See license.txt
 
 from __future__ import unicode_literals
diff --git a/patches/september_2012/plot_patch.py b/patches/september_2012/plot_patch.py
index e801a99..a3e10e0 100644
--- a/patches/september_2012/plot_patch.py
+++ b/patches/september_2012/plot_patch.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 # License: GNU General Public License v3. See license.txt
 
 from __future__ import unicode_literals
diff --git a/patches/september_2012/profile_delete_permission.py b/patches/september_2012/profile_delete_permission.py
index cf6f8ec..09ff708 100644
--- a/patches/september_2012/profile_delete_permission.py
+++ b/patches/september_2012/profile_delete_permission.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 # License: GNU General Public License v3. See license.txt
 
 from __future__ import unicode_literals
diff --git a/patches/september_2012/rebuild_trees.py b/patches/september_2012/rebuild_trees.py
index 380100b..2d988fd 100644
--- a/patches/september_2012/rebuild_trees.py
+++ b/patches/september_2012/rebuild_trees.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 # License: GNU General Public License v3. See license.txt
 
 from __future__ import unicode_literals
diff --git a/patches/september_2012/repost_stock.py b/patches/september_2012/repost_stock.py
index 28ad703..5df65a2 100644
--- a/patches/september_2012/repost_stock.py
+++ b/patches/september_2012/repost_stock.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 # License: GNU General Public License v3. See license.txt
 
 from __future__ import unicode_literals
diff --git a/patches/september_2012/stock_report_permissions_for_accounts.py b/patches/september_2012/stock_report_permissions_for_accounts.py
index 7dd614c..6be5151 100644
--- a/patches/september_2012/stock_report_permissions_for_accounts.py
+++ b/patches/september_2012/stock_report_permissions_for_accounts.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 # License: GNU General Public License v3. See license.txt
 
 from __future__ import unicode_literals
diff --git a/patches/september_2013/p01_add_user_defaults_from_pos_setting.py b/patches/september_2013/p01_add_user_defaults_from_pos_setting.py
index f3a9344..cb5111a 100644
--- a/patches/september_2013/p01_add_user_defaults_from_pos_setting.py
+++ b/patches/september_2013/p01_add_user_defaults_from_pos_setting.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 # License: GNU General Public License v3. See license.txt
 
 from __future__ import unicode_literals
diff --git a/patches/september_2013/p01_fix_buying_amount_gl_entries.py b/patches/september_2013/p01_fix_buying_amount_gl_entries.py
index 369a291..40b0e2d 100644
--- a/patches/september_2013/p01_fix_buying_amount_gl_entries.py
+++ b/patches/september_2013/p01_fix_buying_amount_gl_entries.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 # License: GNU General Public License v3. See license.txt
 
 from __future__ import unicode_literals
diff --git a/patches/september_2013/p01_update_communication.py b/patches/september_2013/p01_update_communication.py
index 3131738..1cadf8c 100644
--- a/patches/september_2013/p01_update_communication.py
+++ b/patches/september_2013/p01_update_communication.py
@@ -1,9 +1,8 @@
-# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 # License: GNU General Public License v3. See license.txt
 
 from __future__ import unicode_literals
 import webnotes
-import MySQLdb
 
 def execute():
 	webnotes.reload_doc("core", "doctype", "communication")
@@ -17,6 +16,6 @@
 				set parenttype=%s, parentfield='communications', 
 				parent=`%s` 
 				where ifnull(`%s`, '')!=''""" % ("%s", fieldname, fieldname), doctype)
-		except MySQLdb.OperationalError, e:
+		except webnotes.SQLError, e:
 			if e.args[0] != 1054:
-				raise e
+				raise
diff --git a/patches/september_2013/p02_fix_serial_no_status.py b/patches/september_2013/p02_fix_serial_no_status.py
index 58c2957..c1a6f30 100644
--- a/patches/september_2013/p02_fix_serial_no_status.py
+++ b/patches/september_2013/p02_fix_serial_no_status.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 # License: GNU General Public License v3. See license.txt
 
 from __future__ import unicode_literals
diff --git a/patches/september_2013/p03_modify_item_price_include_in_price_list.py b/patches/september_2013/p03_modify_item_price_include_in_price_list.py
index 2400918..63cc695 100644
--- a/patches/september_2013/p03_modify_item_price_include_in_price_list.py
+++ b/patches/september_2013/p03_modify_item_price_include_in_price_list.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 # License: GNU General Public License v3. See license.txt
 
 from __future__ import unicode_literals
diff --git a/patches/september_2013/p03_move_website_to_framework.py b/patches/september_2013/p03_move_website_to_framework.py
index 9c15bcc..98f1683 100644
--- a/patches/september_2013/p03_move_website_to_framework.py
+++ b/patches/september_2013/p03_move_website_to_framework.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 # License: GNU General Public License v3. See license.txt
 
 from __future__ import unicode_literals
diff --git a/patches/september_2013/p03_update_stock_uom_in_sle.py b/patches/september_2013/p03_update_stock_uom_in_sle.py
index ba1ea8a..ae07ab8 100644
--- a/patches/september_2013/p03_update_stock_uom_in_sle.py
+++ b/patches/september_2013/p03_update_stock_uom_in_sle.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 # License: GNU General Public License v3. See license.txt
 
 from __future__ import unicode_literals
diff --git a/patches/september_2013/p04_unsubmit_serial_nos.py b/patches/september_2013/p04_unsubmit_serial_nos.py
index ded4e4d..04be238 100644
--- a/patches/september_2013/p04_unsubmit_serial_nos.py
+++ b/patches/september_2013/p04_unsubmit_serial_nos.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 # License: GNU General Public License v3. See license.txt
 
 from __future__ import unicode_literals
diff --git a/patches/september_2013/p05_fix_customer_in_pos.py b/patches/september_2013/p05_fix_customer_in_pos.py
index 60210da..4df582e 100644
--- a/patches/september_2013/p05_fix_customer_in_pos.py
+++ b/patches/september_2013/p05_fix_customer_in_pos.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 # License: GNU General Public License v3. See license.txt
 
 from __future__ import unicode_literals
diff --git a/portal/templates/includes/cart.js b/portal/templates/includes/cart.js
index bd3f565..232501d 100644
--- a/portal/templates/includes/cart.js
+++ b/portal/templates/includes/cart.js
@@ -1,4 +1,4 @@
-// Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+// Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 // License: GNU General Public License v3. See license.txt
 
 // js inside blog page
@@ -13,11 +13,11 @@
 			$(".progress").remove();
 			if(r.exc) {
 				if(r.exc.indexOf("WebsitePriceListMissingError")!==-1) {
-					erpnext.cart.show_error("Oops!", "Price List not configured.");
+					erpnext.cart.show_error("Oops!", wn._("Price List not configured."));
 				} else if(r["403"]) {
-					erpnext.cart.show_error("Hey!", "You need to be logged in to view your cart.");
+					erpnext.cart.show_error("Hey!", wn._("You need to be logged in to view your cart."));
 				} else {
-					erpnext.cart.show_error("Oops!", "Something went wrong.");
+					erpnext.cart.show_error("Oops!", wn._("Something went wrong."));
 				}
 			} else {
 				erpnext.cart.set_cart_count();
@@ -78,7 +78,7 @@
 		
 		var no_items = $.map(doclist, function(d) { return d.item_code || null;}).length===0;
 		if(no_items) {
-			erpnext.cart.show_error("Empty :-(", "Go ahead and add something to your cart.");
+			erpnext.cart.show_error("Empty :-(", wn._("Go ahead and add something to your cart."));
 			$("#cart-addresses").toggle(false);
 			return;
 		}
@@ -117,7 +117,7 @@
 		});
 		
 		if(!(addresses && addresses.length)) {
-			$cart_shipping_address.html('<div class="well">Hey! Go ahead and add an address</div>');
+			$cart_shipping_address.html('<div class="well">'+wn._("Hey! Go ahead and add an address")+'</div>');
 		} else {
 			erpnext.cart.render_address($cart_shipping_address, addresses, doclist[0].shipping_address_name);
 			erpnext.cart.render_address($cart_billing_address, addresses, doclist[0].customer_address);
@@ -283,7 +283,7 @@
 					
 					$("#cart-error")
 						.empty()
-						.html(msg || "Something went wrong!")
+						.html(msg || wn._("Something went wrong!"))
 						.toggle(true);
 				} else {
 					window.location.href = "order?name=" + encodeURIComponent(r.message);
diff --git a/portal/templates/pages/cart.py b/portal/templates/pages/cart.py
index 24b474a..ee55e5c 100644
--- a/portal/templates/pages/cart.py
+++ b/portal/templates/pages/cart.py
@@ -1,6 +1,7 @@
-# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 # License: GNU General Public License v3. See license.txt
 
 from __future__ import unicode_literals
 
-no_cache = True
\ No newline at end of file
+no_cache = True
+no_sitemap = True
\ No newline at end of file
diff --git a/portal/templates/pages/profile.py b/portal/templates/pages/profile.py
index 8edd830..241f953 100644
--- a/portal/templates/pages/profile.py
+++ b/portal/templates/pages/profile.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 # License: GNU General Public License v3. See license.txt
 
 from __future__ import unicode_literals
@@ -7,6 +7,7 @@
 from webnotes.utils import cstr
 
 no_cache = True
+no_sitemap = True
 
 def get_context():
 	from selling.utils.cart import get_lead_or_customer
@@ -33,7 +34,7 @@
 		return _("Name is required")
 		
 	webnotes.conn.set_value("Profile", webnotes.session.user, "first_name", fullname)
-	webnotes.add_cookies["full_name"] = fullname
+	webnotes._response.set_cookie("full_name", fullname)
 	
 	return _("Updated")
 	
\ No newline at end of file
diff --git a/portal/utils.py b/portal/utils.py
index f72c01f..16fc072 100644
--- a/portal/utils.py
+++ b/portal/utils.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 # License: GNU General Public License v3. See license.txt
 
 from __future__ import unicode_literals
diff --git a/projects/doctype/activity_type/activity_type.py b/projects/doctype/activity_type/activity_type.py
index 26d0f76..cb6190f 100644
--- a/projects/doctype/activity_type/activity_type.py
+++ b/projects/doctype/activity_type/activity_type.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 # License: GNU General Public License v3. See license.txt
 
 from __future__ import unicode_literals
diff --git a/projects/doctype/activity_type/test_activity_type.py b/projects/doctype/activity_type/test_activity_type.py
index b68a458..b893317 100644
--- a/projects/doctype/activity_type/test_activity_type.py
+++ b/projects/doctype/activity_type/test_activity_type.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 # License: GNU General Public License v3. See license.txt
 
 test_records = [
diff --git a/projects/doctype/project/project.js b/projects/doctype/project/project.js
index 74cfa45..30873b5 100644
--- a/projects/doctype/project/project.js
+++ b/projects/doctype/project/project.js
@@ -1,14 +1,14 @@
-// Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+// Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 // License: GNU General Public License v3. See license.txt
 
 // show tasks
 cur_frm.cscript.refresh = function(doc) {
 	if(!doc.__islocal) {
-		cur_frm.add_custom_button("Gantt Chart", function() {
+		cur_frm.appframe.add_button(wn._("Gantt Chart"), function() {
 			wn.route_options = {"project": doc.name}
 			wn.set_route("Gantt", "Task");
 		}, "icon-tasks");
-		cur_frm.add_custom_button("Tasks", function() {
+		cur_frm.add_custom_button(wn._("Tasks"), function() {
 			wn.route_options = {"project": doc.name}
 			wn.set_route("List", "Task");
 		}, "icon-list");
diff --git a/projects/doctype/project/project.py b/projects/doctype/project/project.py
index 067ffef..5b20c5b 100644
--- a/projects/doctype/project/project.py
+++ b/projects/doctype/project/project.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 # License: GNU General Public License v3. See license.txt
 
 from __future__ import unicode_literals
diff --git a/projects/doctype/project/project.txt b/projects/doctype/project/project.txt
index 91dcfa1..9f21dce 100644
--- a/projects/doctype/project/project.txt
+++ b/projects/doctype/project/project.txt
@@ -2,12 +2,13 @@
  {
   "creation": "2013-03-07 11:55:07", 
   "docstatus": 0, 
-  "modified": "2013-07-05 14:51:41", 
+  "modified": "2013-11-06 15:13:55", 
   "modified_by": "Administrator", 
   "owner": "Administrator"
  }, 
  {
   "allow_attach": 1, 
+  "allow_import": 1, 
   "autoname": "field:project_name", 
   "doctype": "DocType", 
   "document_type": "Master", 
@@ -42,6 +43,13 @@
  }, 
  {
   "doctype": "DocField", 
+  "fieldname": "overview", 
+  "fieldtype": "Section Break", 
+  "label": "Overview", 
+  "options": "icon-file"
+ }, 
+ {
+  "doctype": "DocField", 
   "fieldname": "cb_project_status", 
   "fieldtype": "Column Break", 
   "label": "Status"
@@ -142,12 +150,12 @@
   "search_index": 0
  }, 
  {
-  "description": "Important dates and commitments in your project life cycle", 
   "doctype": "DocField", 
   "fieldname": "sb_milestones", 
   "fieldtype": "Section Break", 
   "label": "Milestones", 
-  "oldfieldtype": "Section Break"
+  "oldfieldtype": "Section Break", 
+  "options": "icon-flag"
  }, 
  {
   "description": "Milestones will be added as Events in the Calendar", 
@@ -167,7 +175,7 @@
   "fieldtype": "Section Break", 
   "label": "Project Details", 
   "oldfieldtype": "Section Break", 
-  "options": "Simple"
+  "options": "icon-list"
  }, 
  {
   "doctype": "DocField", 
@@ -200,7 +208,7 @@
   "fieldtype": "Section Break", 
   "label": "Project Costing", 
   "oldfieldtype": "Section Break", 
-  "options": "Simple"
+  "options": "icon-money"
  }, 
  {
   "doctype": "DocField", 
@@ -263,10 +271,10 @@
   "fieldname": "customer_details", 
   "fieldtype": "Section Break", 
   "label": "Customer Details", 
-  "oldfieldtype": "Section Break"
+  "oldfieldtype": "Section Break", 
+  "options": "icon-user"
  }, 
  {
-  "description": "Select name of Customer to whom project belongs", 
   "doctype": "DocField", 
   "fieldname": "customer", 
   "fieldtype": "Link", 
diff --git a/projects/doctype/project/test_project.py b/projects/doctype/project/test_project.py
index 475dc68..b4ea021 100644
--- a/projects/doctype/project/test_project.py
+++ b/projects/doctype/project/test_project.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 # License: GNU General Public License v3. See license.txt
 
 test_records = [[{
diff --git a/projects/doctype/project_milestone/project_milestone.py b/projects/doctype/project_milestone/project_milestone.py
index 26d0f76..cb6190f 100644
--- a/projects/doctype/project_milestone/project_milestone.py
+++ b/projects/doctype/project_milestone/project_milestone.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 # License: GNU General Public License v3. See license.txt
 
 from __future__ import unicode_literals
diff --git a/projects/doctype/task/task.js b/projects/doctype/task/task.js
index c043807..9055003 100644
--- a/projects/doctype/task/task.js
+++ b/projects/doctype/task/task.js
@@ -1,4 +1,4 @@
-// Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+// Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 // License: GNU General Public License v3. See license.txt
 
 wn.provide("erpnext.projects");
diff --git a/projects/doctype/task/task.py b/projects/doctype/task/task.py
index 6cd1ba8..227119e 100644
--- a/projects/doctype/task/task.py
+++ b/projects/doctype/task/task.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 # License: GNU General Public License v3. See license.txt
 
 from __future__ import unicode_literals
@@ -9,7 +9,6 @@
 from webnotes.model.bean import copy_doclist
 from webnotes import msgprint
 
-sql = webnotes.conn.sql
 
 class DocType:
 	def __init__(self,doc,doclist=[]):
@@ -17,13 +16,13 @@
 		self.doclist = doclist
 	
 	def get_project_details(self):
-		cust = sql("select customer, customer_name from `tabProject` where name = %s", self.doc.project)
+		cust = webnotes.conn.sql("select customer, customer_name from `tabProject` where name = %s", self.doc.project)
 		if cust:
 			ret = {'customer': cust and cust[0][0] or '', 'customer_name': cust and cust[0][1] or ''}
 			return ret
 
 	def get_customer_details(self):
-		cust = sql("select customer_name from `tabCustomer` where name=%s", self.doc.customer)
+		cust = webnotes.conn.sql("select customer_name from `tabCustomer` where name=%s", self.doc.customer)
 		if cust:
 			ret = {'customer_name': cust and cust[0][0] or ''}
 			return ret
diff --git a/projects/doctype/task/task.txt b/projects/doctype/task/task.txt
index d890bd6..1c12c8a 100644
--- a/projects/doctype/task/task.txt
+++ b/projects/doctype/task/task.txt
@@ -2,12 +2,13 @@
  {
   "creation": "2013-01-29 19:25:50", 
   "docstatus": 0, 
-  "modified": "2013-07-05 14:57:57", 
+  "modified": "2013-10-02 14:25:00", 
   "modified_by": "Administrator", 
   "owner": "Administrator"
  }, 
  {
   "allow_attach": 1, 
+  "allow_import": 1, 
   "autoname": "TASK.#####", 
   "doctype": "DocType", 
   "document_type": "Master", 
diff --git a/projects/doctype/task/task_calendar.js b/projects/doctype/task/task_calendar.js
index 7772855..62d9757 100644
--- a/projects/doctype/task/task_calendar.js
+++ b/projects/doctype/task/task_calendar.js
@@ -1,4 +1,4 @@
-// Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+// Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 // License: GNU General Public License v3. See license.txt
 
 wn.views.calendar["Task"] = {
@@ -6,7 +6,7 @@
 		"start": "exp_start_date",
 		"end": "exp_end_date",
 		"id": "name",
-		"title": "subject",
+		"title": wn._("subject"),
 		"allDay": "allDay"
 	},
 	gantt: true,
@@ -15,7 +15,7 @@
 			"fieldtype": "Link", 
 			"fieldname": "project", 
 			"options": "Project", 
-			"label": "Project"
+			"label": wn._("Project")
 		}
 	],
 	get_events_method: "projects.doctype.task.task.get_events"
diff --git a/projects/doctype/task/test_task.py b/projects/doctype/task/test_task.py
index d6c8e98..af7ad28 100644
--- a/projects/doctype/task/test_task.py
+++ b/projects/doctype/task/test_task.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 # License: GNU General Public License v3. See license.txt
 
 test_records = [
diff --git a/projects/doctype/time_log/test_time_log.py b/projects/doctype/time_log/test_time_log.py
index ec8c781..c62bee1 100644
--- a/projects/doctype/time_log/test_time_log.py
+++ b/projects/doctype/time_log/test_time_log.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 # License: GNU General Public License v3. See license.txt
 
 import webnotes
diff --git a/projects/doctype/time_log/time_log.js b/projects/doctype/time_log/time_log.js
index ab21a31..d25451c 100644
--- a/projects/doctype/time_log/time_log.js
+++ b/projects/doctype/time_log/time_log.js
@@ -1,4 +1,4 @@
-// Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+// Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 // License: GNU General Public License v3. See license.txt
 
 wn.provide("erpnext.projects");
diff --git a/projects/doctype/time_log/time_log.py b/projects/doctype/time_log/time_log.py
index 57a0b00..bd9f91f 100644
--- a/projects/doctype/time_log/time_log.py
+++ b/projects/doctype/time_log/time_log.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 # License: GNU General Public License v3. See license.txt
 
 # For license information, please see license.txt
diff --git a/projects/doctype/time_log/time_log.txt b/projects/doctype/time_log/time_log.txt
index 89ca453..1c8e00f 100644
--- a/projects/doctype/time_log/time_log.txt
+++ b/projects/doctype/time_log/time_log.txt
@@ -2,7 +2,7 @@
  {
   "creation": "2013-04-03 16:38:41", 
   "docstatus": 0, 
-  "modified": "2013-08-08 14:22:12", 
+  "modified": "2013-11-02 14:05:45", 
   "modified_by": "Administrator", 
   "owner": "Administrator"
  }, 
@@ -46,7 +46,7 @@
   "doctype": "DocField", 
   "fieldname": "naming_series", 
   "fieldtype": "Select", 
-  "label": "Document Numbering Series", 
+  "label": "Series", 
   "options": "TL-", 
   "permlevel": 0, 
   "read_only": 0, 
diff --git a/projects/doctype/time_log/time_log_calendar.js b/projects/doctype/time_log/time_log_calendar.js
index a4f22db..2451de1 100644
--- a/projects/doctype/time_log/time_log_calendar.js
+++ b/projects/doctype/time_log/time_log_calendar.js
@@ -1,4 +1,4 @@
-// Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+// Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 // License: GNU General Public License v3. See license.txt
 
 wn.views.calendar["Time Log"] = {
diff --git a/projects/doctype/time_log/time_log_list.js b/projects/doctype/time_log/time_log_list.js
index 7a35cda..74cfdf5 100644
--- a/projects/doctype/time_log/time_log_list.js
+++ b/projects/doctype/time_log/time_log_list.js
@@ -1,4 +1,4 @@
-// Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+// Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 // License: GNU General Public License v3. See license.txt
 
 // render
diff --git a/projects/doctype/time_log_batch/test_time_log_batch.py b/projects/doctype/time_log_batch/test_time_log_batch.py
index 34a0cc0..8a7e6f5 100644
--- a/projects/doctype/time_log_batch/test_time_log_batch.py
+++ b/projects/doctype/time_log_batch/test_time_log_batch.py
@@ -1,19 +1,35 @@
-# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 # License: GNU General Public License v3. See license.txt
 
 import webnotes, unittest
 
 class TimeLogBatchTest(unittest.TestCase):
 	def test_time_log_status(self):
-		self.assertEquals(webnotes.conn.get_value("Time Log", "_T-Time Log-00001", "status"), "Submitted")
-		tlb = webnotes.bean("Time Log Batch", "_T-Time Log Batch-00001")
+		from projects.doctype.time_log.test_time_log import test_records as time_log_records
+		time_log = webnotes.bean(copy=time_log_records[0])
+		time_log.doc.fields.update({
+			"from_time": "2013-01-02 10:00:00",
+			"to_time": "2013-01-02 11:00:00",
+			"docstatus": 0
+		})
+		time_log.insert()
+		time_log.submit()
+		
+		self.assertEquals(webnotes.conn.get_value("Time Log", time_log.doc.name, "status"), "Submitted")
+		tlb = webnotes.bean(copy=test_records[0])
+		tlb.doclist[1].time_log = time_log.doc.name
+		tlb.insert()
 		tlb.submit()
-		self.assertEquals(webnotes.conn.get_value("Time Log", "_T-Time Log-00001", "status"), "Batched for Billing")
+
+		self.assertEquals(webnotes.conn.get_value("Time Log", time_log.doc.name, "status"), "Batched for Billing")
 		tlb.cancel()
-		self.assertEquals(webnotes.conn.get_value("Time Log", "_T-Time Log-00001", "status"), "Submitted")
+		self.assertEquals(webnotes.conn.get_value("Time Log", time_log.doc.name, "status"), "Submitted")
 
 test_records = [[
-	{"rate": "500"},
+	{
+		"doctype": "Time Log Batch",
+		"rate": "500"
+	},
 	{
 		"doctype": "Time Log Batch Detail",
 		"parenttype": "Time Log Batch",
diff --git a/projects/doctype/time_log_batch/time_log_batch.js b/projects/doctype/time_log_batch/time_log_batch.js
index 96f7c22..1be3927 100644
--- a/projects/doctype/time_log_batch/time_log_batch.js
+++ b/projects/doctype/time_log_batch/time_log_batch.js
@@ -1,4 +1,4 @@
-// Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+// Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 // License: GNU General Public License v3. See license.txt
 
 cur_frm.add_fetch("time_log", "activity_type", "activity_type");
@@ -25,7 +25,7 @@
 		}[doc.status]);
 		
 		if(doc.status=="Submitted") {
-			cur_frm.add_custom_button("Make Sales Invoice", function() { cur_frm.cscript.make_invoice() }, 
+			cur_frm.add_custom_button(wn._("Make Sales Invoice"), function() { cur_frm.cscript.make_invoice() }, 
 				"icon-file-alt");
 		}
 	},
diff --git a/projects/doctype/time_log_batch/time_log_batch.py b/projects/doctype/time_log_batch/time_log_batch.py
index 41c0f6d..ccb0a25 100644
--- a/projects/doctype/time_log_batch/time_log_batch.py
+++ b/projects/doctype/time_log_batch/time_log_batch.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 # License: GNU General Public License v3. See license.txt
 
 # For license information, please see license.txt
diff --git a/projects/doctype/time_log_batch/time_log_batch.txt b/projects/doctype/time_log_batch/time_log_batch.txt
index c12355d..74bcc4d 100644
--- a/projects/doctype/time_log_batch/time_log_batch.txt
+++ b/projects/doctype/time_log_batch/time_log_batch.txt
@@ -2,7 +2,7 @@
  {
   "creation": "2013-02-28 17:57:33", 
   "docstatus": 0, 
-  "modified": "2013-08-08 14:22:12", 
+  "modified": "2013-11-02 14:05:45", 
   "modified_by": "Administrator", 
   "owner": "Administrator"
  }, 
@@ -48,7 +48,7 @@
   "doctype": "DocField", 
   "fieldname": "naming_series", 
   "fieldtype": "Select", 
-  "label": "Document Numbering Series", 
+  "label": "Series", 
   "options": "TLB-", 
   "reqd": 1
  }, 
diff --git a/projects/doctype/time_log_batch_detail/time_log_batch_detail.py b/projects/doctype/time_log_batch_detail/time_log_batch_detail.py
index 784339d..e5468e5 100644
--- a/projects/doctype/time_log_batch_detail/time_log_batch_detail.py
+++ b/projects/doctype/time_log_batch_detail/time_log_batch_detail.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 # License: GNU General Public License v3. See license.txt
 
 # For license information, please see license.txt
diff --git a/projects/page/projects_home/projects_home.js b/projects/page/projects_home/projects_home.js
index 179ac0d..51f14fb 100644
--- a/projects/page/projects_home/projects_home.js
+++ b/projects/page/projects_home/projects_home.js
@@ -1,4 +1,4 @@
-// Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+// Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 // License: GNU General Public License v3. See license.txt"
 
 wn.module_page["Projects"] = [
diff --git a/projects/report/daily_time_log_summary/daily_time_log_summary.js b/projects/report/daily_time_log_summary/daily_time_log_summary.js
index 6bb1117..2615023 100644
--- a/projects/report/daily_time_log_summary/daily_time_log_summary.js
+++ b/projects/report/daily_time_log_summary/daily_time_log_summary.js
@@ -1,17 +1,17 @@
-// Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+// Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 // License: GNU General Public License v3. See license.txt
 
 wn.query_reports["Daily Time Log Summary"] = {
 	"filters": [
 		{
 			"fieldname":"from_date",
-			"label": "From Date",
+			"label": wn._("From Date"),
 			"fieldtype": "Date",
 			"default": wn.datetime.get_today()
 		},
 		{
 			"fieldname":"to_date",
-			"label": "To Date",
+			"label": wn._("To Date"),
 			"fieldtype": "Date",
 			"default": wn.datetime.get_today()
 		},
diff --git a/projects/report/daily_time_log_summary/daily_time_log_summary.py b/projects/report/daily_time_log_summary/daily_time_log_summary.py
index a710c8c..230d21e 100644
--- a/projects/report/daily_time_log_summary/daily_time_log_summary.py
+++ b/projects/report/daily_time_log_summary/daily_time_log_summary.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 # License: GNU General Public License v3. See license.txt
 
 from __future__ import unicode_literals
diff --git a/projects/report/project_wise_stock_tracking/project_wise_stock_tracking.py b/projects/report/project_wise_stock_tracking/project_wise_stock_tracking.py
index 5d126f5..e4b11fc 100644
--- a/projects/report/project_wise_stock_tracking/project_wise_stock_tracking.py
+++ b/projects/report/project_wise_stock_tracking/project_wise_stock_tracking.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 # License: GNU General Public License v3. See license.txt
 
 import webnotes 
diff --git a/projects/utils.py b/projects/utils.py
index 3271e89..7a0c50c 100644
--- a/projects/utils.py
+++ b/projects/utils.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 # License: GNU General Public License v3. See license.txt
 
 # For license information, please see license.txt
diff --git a/public/css/splash.css b/public/css/splash.css
index d4f0493..522c0b1 100644
--- a/public/css/splash.css
+++ b/public/css/splash.css
@@ -45,7 +45,7 @@
 .splash:after {
 	content: "erpnext";
 	font-size: 30px;
-	font-weight: 700;
+	font-weight: 300;
 	font-family: Helvetica, Arial, sans-serif;
 	position: relative;
 	top: -30px;
diff --git a/public/images/splash.svg b/public/images/splash.svg
index 60ed317..34b133d 100644
--- a/public/images/splash.svg
+++ b/public/images/splash.svg
@@ -7,50 +7,14 @@
    xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
    xmlns:svg="http://www.w3.org/2000/svg"
    xmlns="http://www.w3.org/2000/svg"
-   xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
-   xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
    id="svg2"
    version="1.1"
-   inkscape:version="0.48.2 r9819"
-   sodipodi:docname="splash-mono.svg"
-   inkscape:export-xdpi="167.56363"
-   inkscape:export-ydpi="167.56363"
    viewBox="0 0 680 820"
    preserveAspectRatio="xMidyMid meet"
    width="100%"
    height="100%">
   <defs
      id="defs4" />
-  <sodipodi:namedview
-     id="base"
-     pagecolor="#ffffff"
-     bordercolor="#666666"
-     borderopacity="1.0"
-     inkscape:pageopacity="0.0"
-     inkscape:pageshadow="2"
-     inkscape:zoom="0.53740115"
-     inkscape:cx="417.75453"
-     inkscape:cy="501.17067"
-     inkscape:document-units="px"
-     inkscape:current-layer="layer4"
-     showgrid="false"
-     inkscape:snap-bbox="false"
-     showguides="true"
-     inkscape:guide-bbox="true"
-     inkscape:snap-global="true"
-     inkscape:bbox-paths="false"
-     inkscape:bbox-nodes="false"
-     inkscape:snap-page="false"
-     inkscape:snap-grids="true"
-     inkscape:window-width="721"
-     inkscape:window-height="690"
-     inkscape:window-x="293"
-     inkscape:window-y="0"
-     inkscape:window-maximized="0">
-    <inkscape:grid
-       type="xygrid"
-       id="grid3836" />
-  </sodipodi:namedview>
   <metadata
      id="metadata7">
     <rdf:RDF>
@@ -64,8 +28,6 @@
     </rdf:RDF>
   </metadata>
   <g
-     inkscape:label="Layer 1"
-     inkscape:groupmode="layer"
      id="layer1"
      style="display:inline">
     <rect
@@ -80,21 +42,15 @@
        transform="scale(1,-1)" />
   </g>
   <g
-     inkscape:groupmode="layer"
-     id="layer2"
-     inkscape:label="Layer 2">
+     id="layer2">
     <path
        transform="scale(1,-1)"
        style="display:inline;opacity:0.90000000000000002;fill:#bdc3c7;fill-opacity:1"
        d="m 180,-372.36218 110,0 20,0 0,20 0,110 c 0,11.08 -8.92,20 -20,20 l -110,0 c -11.08,0 -20,-8.92 -20,-20 l 0,-110 c 0,-11.08 8.92,-20 20,-20 z"
-       id="rect3051"
-       inkscape:connector-curvature="0"
-       sodipodi:nodetypes="scccssssss" />
+       id="rect3051"/>
   </g>
   <g
-     inkscape:groupmode="layer"
-     id="layer3"
-     inkscape:label="Layer 3">
+     id="layer3">
     <rect
        style="display:inline;opacity:0.90000000000000002;fill:#bdc3c7;fill-opacity:0.94117647"
        id="rect3840"
@@ -107,20 +63,14 @@
        transform="scale(1,-1)" />
   </g>
   <g
-     inkscape:groupmode="layer"
-     id="layer4"
-     inkscape:label="Layer 4">
+     id="layer4">
     <path
-       sodipodi:nodetypes="scccssssss"
-       inkscape:connector-curvature="0"
        id="path3054"
        d="m 490,372.36218 -110,0 -20,0 0,-20 0,-110 c 0,-11.08 8.92,-20 20,-20 l 110,0 c 11.08,0 20,8.92 20,20 l 0,110 c 0,11.08 -8.92,20 -20,20 z"
        style="display:inline;opacity:0.90000000000000002;fill:#bdc3c7;fill-opacity:1" />
   </g>
   <g
-     inkscape:groupmode="layer"
-     id="layer5"
-     inkscape:label="Layer 5">
+     id="layer5">
     <rect
        style="display:inline;opacity:0.90000000000000002;fill:#bdc3c7;fill-opacity:0.94117647"
        id="rect3844"
@@ -133,20 +83,14 @@
        transform="scale(1,-1)" />
   </g>
   <g
-     inkscape:groupmode="layer"
-     id="layer6"
-     inkscape:label="Layer 6">
+     id="layer6">
     <path
        style="display:inline;opacity:0.90000000000000002;fill:#bdc3c7;fill-opacity:0.94117647"
        d="m 490,422.36218 -110,0 -20,0 0,20 0,110 c 0,11.08 8.92,20 20,20 l 110,0 c 11.08,0 20,-8.92 20,-20 l 0,-110 c 0,-11.08 -8.92,-20 -20,-20 z"
-       id="path3058"
-       inkscape:connector-curvature="0"
-       sodipodi:nodetypes="scccssssss" />
+       id="path3058" />
   </g>
   <g
-     inkscape:groupmode="layer"
-     id="layer7"
-     inkscape:label="Layer 7">
+     id="layer7">
     <rect
        style="display:inline;opacity:0.90000000000000002;fill:#bdc3c7;fill-opacity:1"
        id="rect3848"
@@ -159,12 +103,8 @@
        transform="scale(1,-1)" />
   </g>
   <g
-     inkscape:groupmode="layer"
-     id="layer8"
-     inkscape:label="Layer 8">
+     id="layer8">
     <path
-       sodipodi:nodetypes="scccssssss"
-       inkscape:connector-curvature="0"
        id="path3056"
        d="m 180,422.36218 110,0 20,0 0,20 0,110 c 0,11.08 -8.92,20 -20,20 l -110,0 c -11.08,0 -20,-8.92 -20,-20 l 0,-110 c 0,-11.08 8.92,-20 20,-20 z"
        style="display:inline;opacity:0.90000000000000002;fill:#bdc3c7;fill-opacity:1" />
diff --git a/public/js/account_tree_grid.js b/public/js/account_tree_grid.js
index 13e2de2..44bef57 100644
--- a/public/js/account_tree_grid.js
+++ b/public/js/account_tree_grid.js
@@ -1,4 +1,4 @@
-// Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+// Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 // License: GNU General Public License v3. See license.txt
 
 // This program is free software: you can redistribute it and/or modify
@@ -36,39 +36,39 @@
 	},
 	setup_columns: function() {
 		this.columns = [
-			{id: "name", name: "Account", field: "name", width: 300, cssClass: "cell-title", 
+			{id: "name", name: wn._("Account"), field: "name", width: 300, cssClass: "cell-title", 
 				formatter: this.tree_formatter},
-			{id: "opening_debit", name: "Opening (Dr)", field: "opening_debit", width: 100,
+			{id: "opening_debit", name: wn._("Opening (Dr)"), field: "opening_debit", width: 100,
 				formatter: this.currency_formatter},
-			{id: "opening_credit", name: "Opening (Cr)", field: "opening_credit", width: 100,
+			{id: "opening_credit", name: wn._("Opening (Cr)"), field: "opening_credit", width: 100,
 				formatter: this.currency_formatter},
-			{id: "debit", name: "Debit", field: "debit", width: 100,
+			{id: "debit", name: wn._("Debit"), field: "debit", width: 100,
 				formatter: this.currency_formatter},
-			{id: "credit", name: "Credit", field: "credit", width: 100,
+			{id: "credit", name: wn._("Credit"), field: "credit", width: 100,
 				formatter: this.currency_formatter},
-			{id: "closing_debit", name: "Closing (Dr)", field: "closing_debit", width: 100,
+			{id: "closing_debit", name: wn._("Closing (Dr)"), field: "closing_debit", width: 100,
 				formatter: this.currency_formatter},
-			{id: "closing_credit", name: "Closing (Cr)", field: "closing_credit", width: 100,
+			{id: "closing_credit", name: wn._("Closing (Cr)"), field: "closing_credit", width: 100,
 				formatter: this.currency_formatter}
 		];
 
 	},
 	filters: [
-		{fieldtype: "Select", label: "Company", link:"Company", default_value: "Select Company...",
+		{fieldtype: "Select", label: wn._("Company"), link:"Company", default_value: "Select Company...",
 			filter: function(val, item, opts, me) {
 				if (item.company == val || val == opts.default_value) {
 					return me.apply_zero_filter(val, item, opts, me);
 				}
 				return false;
 			}},
-		{fieldtype: "Select", label: "Fiscal Year", link:"Fiscal Year", 
+		{fieldtype: "Select", label: wn._("Fiscal Year"), link:"Fiscal Year", 
 			default_value: "Select Fiscal Year..."},
-		{fieldtype: "Date", label: "From Date"},
-		{fieldtype: "Label", label: "To"},
-		{fieldtype: "Date", label: "To Date"},
-		{fieldtype: "Button", label: "Refresh", icon:"icon-refresh icon-white",
+		{fieldtype: "Date", label: wn._("From Date")},
+		{fieldtype: "Label", label: wn._("To")},
+		{fieldtype: "Date", label: wn._("To Date")},
+		{fieldtype: "Button", label: wn._("Refresh"), icon:"icon-refresh icon-white",
 		 	cssClass:"btn-info"},
-		{fieldtype: "Button", label: "Reset Filters"},
+		{fieldtype: "Button", label: wn._("Reset Filters")},
 	],
 	setup_filters: function() {
 		this._super();
@@ -193,7 +193,7 @@
 
 	set_fiscal_year: function() {
 		if (this.opening_date > this.closing_date) {
-			msgprint("Opening Date should be before Closing Date");
+			msgprint(wn._("Opening Date should be before Closing Date"));
 			return;
 		}
 
@@ -207,7 +207,7 @@
 		});
 
 		if (!this.fiscal_year) {
-			msgprint("Opening Date and Closing Date should be within same Fiscal Year");
+			msgprint(wn._("Opening Date and Closing Date should be within same Fiscal Year"));
 			return;
 		}
 	},
diff --git a/public/js/complete_setup.js b/public/js/complete_setup.js
deleted file mode 100644
index 7448c7b..0000000
--- a/public/js/complete_setup.js
+++ /dev/null
@@ -1,126 +0,0 @@
-// Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
-// License: GNU General Public License v3. See license.txt
-
-// complete my company registration
-// --------------------------------
-wn.provide('erpnext.complete_setup');
-
-$.extend(erpnext.complete_setup, {
-	show: function() {
-		d = erpnext.complete_setup.prepare_dialog();
-		d.show();
-	},
-	
-	prepare_dialog: function() {	
-		var d = new wn.ui.Dialog({
-			title: "Setup",
-			fields: [
-				{fieldname:'first_name', label:'Your First Name', fieldtype:'Data', reqd: 1},
-				{fieldname:'last_name', label:'Your Last Name', fieldtype:'Data'},
-				{fieldname:'company_name', label:'Company Name', fieldtype:'Data', reqd:1,
-					description: 'e.g. "My Company LLC"'},
-				{fieldname:'company_abbr', label:'Company Abbreviation', fieldtype:'Data',
-					description:'e.g. "MC"',reqd:1},
-				{fieldname:'fy_start', label:'Financial Year Start Date', fieldtype:'Select',
-					description:'Your financial year begins on"', reqd:1,
-					options: erpnext.complete_setup.fy_start_list.join('\n')},
-				{fieldname:'country', label: 'Country', reqd:1,
-					options: "", fieldtype: 'Select'},
-				{fieldname:'currency', label: 'Default Currency', reqd:1,
-					options: "", fieldtype: 'Select'},
-				{fieldname:'time_zone', label: 'Time Zone', reqd:1,
-					options: "", fieldtype: 'Select'},
-				{fieldname:'industry', label: 'Industry', reqd:1,
-					options: erpnext.complete_setup.domains.join('\n'), fieldtype: 'Select'},
-				{fieldname:'update', label:'Setup',fieldtype:'Button'},
-			],
-		});
-		
-		if(user != 'Administrator'){
-			d.$wrapper.find('.close').toggle(false); // Hide close image
-			$('header').toggle(false); // hide toolbar
-		}
-		
-		wn.call({
-			method:"webnotes.country_info.get_country_timezone_info",
-			callback: function(data) {
-				erpnext.country_info = data.message.country_info;
-				erpnext.all_timezones = data.message.all_timezones;
-				d.get_input("country").empty()
-					.add_options([""].concat(keys(erpnext.country_info).sort()));
-				d.get_input("currency").empty()
-					.add_options(wn.utils.unique([""].concat($.map(erpnext.country_info, 
-						function(opts, country) { return opts.currency; }))).sort());
-				d.get_input("time_zone").empty()
-					.add_options([""].concat(erpnext.all_timezones));
-			}
-		});
-		
-		// on clicking update
-		d.fields_dict.update.input.onclick = function() {
-			var data = d.get_values();
-			if(!data) return;
-			$(this).set_working();
-			return $c_obj('Setup Control','setup_account',data,function(r, rt){
-				$(this).done_working();
-				if(!r.exc) {
-					sys_defaults = r.message;
-					user_fullname = r.message.user_fullname;
-					wn.boot.user_info[user].fullname = user_fullname;
-					d.hide();
-					$('header').toggle(true);
-					wn.container.wntoolbar.set_user_name();
-					
-					setTimeout(function() { window.location.reload(); }, 3000);
-				}
-			});
-		};
-
-		d.fields_dict.company_name.input.onchange = function() {
-			var parts = d.get_input("company_name").val().split(" ");
-			var abbr = $.map(parts, function(p) { return p ? p.substr(0,1) : null }).join("");
-			d.get_input("company_abbr").val(abbr.toUpperCase());
-		}
-
-		d.fields_dict.country.input.onchange = function() {
-			var country = d.fields_dict.country.input.value;
-			var $timezone = $(d.fields_dict.time_zone.input);
-			$timezone.empty();
-			// add country specific timezones first
-			if(country){
-				var timezone_list = erpnext.country_info[country].timezones || [];
-				$timezone.add_options(timezone_list.sort());
-				
-				d.get_input("currency").val(erpnext.country_info[country].currency);
-			}
-			// add all timezones at the end, so that user has the option to change it to any timezone
-			$timezone.add_options([""].concat(erpnext.all_timezones));
-			
-		};
-		
-		// company name already set
-		if(wn.control_panel.company_name) {
-			var inp = d.fields_dict.company_name.input;
-			inp.value = wn.control_panel.company_name;
-			inp.disabled = true;
-			d.fields_dict.company_name.$input.trigger("change");
-		}
-
-		// set first name, last name
-		if(user_fullname) {
-			u = user_fullname.split(' ');
-			if(u[0]) {
-				d.fields_dict.first_name.input.value = u[0];
-			}
-			if(u[1]) {
-				d.fields_dict.last_name.input.value = u[1];			
-			}
-		}
-		
-		return d;
-	},
-	
-	fy_start_list: ['', '1st Jan', '1st Apr', '1st Jul', '1st Oct'],
-
-	domains: ['', "Manufacturing", "Retail", "Distribution", "Services", "Other"],	
-});
\ No newline at end of file
diff --git a/public/js/conf.js b/public/js/conf.js
index 993d2ab..929bfca 100644
--- a/public/js/conf.js
+++ b/public/js/conf.js
@@ -1,4 +1,4 @@
-// Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+// Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 // License: GNU General Public License v3. See license.txt
 
 wn.provide('erpnext');
@@ -24,14 +24,14 @@
 wn.provide('wn.ui.misc');
 wn.ui.misc.about = function() {
 	if(!wn.ui.misc.about_dialog) {
-		var d = new wn.ui.Dialog({title:'About ERPNext'})
+		var d = new wn.ui.Dialog({title: wn._('About ERPNext')})
 	
 		$(d.body).html(repl("<div>\
-		<p>ERPNext is an open-source web based ERP made by Web Notes Technologies Pvt Ltd.\
+		<p>"+wn._("ERPNext is an open-source web based ERP made by Web Notes Technologies Pvt Ltd.\
 		to provide an integrated tool to manage most processes in a small organization.\
-		For more information about Web Notes, or to buy hosting servies, go to \
-		<a href='https://erpnext.com'>https://erpnext.com</a>.</p>\
-		<p>To report an issue, go to <a href='https://github.com/webnotes/erpnext/issues'>GitHub Issues</a></p>\
+		For more information about Web Notes, or to buy hosting servies, go to ")+
+		"<a href='https://erpnext.com'>https://erpnext.com</a>.</p>\
+		<p>"+wn._("To report an issue, go to ")+"<a href='https://github.com/webnotes/erpnext/issues'>GitHub Issues</a></p>\
 		<hr>\
 		<p><a href='http://www.gnu.org/copyleft/gpl.html'>License: GNU General Public License Version 3</a></p>\
 		</div>", wn.app));
diff --git a/public/js/controllers/accounts.js b/public/js/controllers/accounts.js
new file mode 100644
index 0000000..201c47e
--- /dev/null
+++ b/public/js/controllers/accounts.js
@@ -0,0 +1,18 @@
+
+// get tax rate
+cur_frm.cscript.account_head = function(doc, cdt, cdn) {
+	var d = locals[cdt][cdn];
+	if(!d.charge_type && d.account_head){
+		msgprint("Please select Charge Type first");
+		wn.model.set_value(cdt, cdn, "account_head", "");
+	} else if(d.account_head && d.charge_type!=="Actual") {
+		wn.call({
+			type:"GET",
+			method: "controllers.accounts_controller.get_tax_rate", 
+			args: {"account_head":d.account_head},
+			callback: function(r) {
+			  wn.model.set_value(cdt, cdn, "rate", r.message || 0);
+			}
+		})
+	}
+}
diff --git a/public/js/controllers/stock_controller.js b/public/js/controllers/stock_controller.js
index de18fe0..ee5c497 100644
--- a/public/js/controllers/stock_controller.js
+++ b/public/js/controllers/stock_controller.js
@@ -1,4 +1,4 @@
-// Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+// Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 // License: GNU General Public License v3. See license.txt
 
 wn.provide("erpnext.stock");
@@ -7,7 +7,7 @@
 	show_stock_ledger: function() {
 		var me = this;
 		if(this.frm.doc.docstatus===1) {
-			this.frm.add_custom_button("Stock Ledger", function() {
+			this.frm.appframe.add_button(wn._("Stock Ledger"), function() {
 				wn.route_options = {
 					voucher_no: me.frm.doc.name,
 					from_date: me.frm.doc.posting_date,
@@ -22,14 +22,14 @@
 	show_general_ledger: function() {
 		var me = this;
 		if(this.frm.doc.docstatus===1 && cint(wn.defaults.get_default("auto_accounting_for_stock"))) { 
-			cur_frm.add_custom_button('Accounting Ledger', function() {
+			cur_frm.appframe.add_button(wn._('Accounting Ledger'), function() {
 				wn.route_options = {
 					"voucher_no": me.frm.doc.name,
 					"from_date": me.frm.doc.posting_date,
 					"to_date": me.frm.doc.posting_date,
 				};
 				wn.set_route("general-ledger");
-			});
+			}, "icon-table");
 		}
 	},
 
diff --git a/public/js/feature_setup.js b/public/js/feature_setup.js
index 31f81be..f6f32d5 100644
--- a/public/js/feature_setup.js
+++ b/public/js/feature_setup.js
@@ -1,4 +1,4 @@
-// Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+// Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 // License: GNU General Public License v3. See license.txt
 
 /* features setup "Dictionary", "Script"
@@ -198,7 +198,7 @@
 					} else if(cur_frm.fields_dict[fort]) {
 						cur_frm.fields_dict[fort].grid.set_column_disp(pscript.feature_dict[sys_feat][cur_frm.doc.doctype][fort], false);						
 					} else {
-						msgprint('Grid "'+fort+'" does not exists');
+						msgprint(wn._('Grid "')+fort+wn._('" does not exists'));
 					}
 				}
 			}
diff --git a/public/js/purchase_trends_filters.js b/public/js/purchase_trends_filters.js
index 5a13066..feb3d49 100644
--- a/public/js/purchase_trends_filters.js
+++ b/public/js/purchase_trends_filters.js
@@ -1,39 +1,39 @@
-// Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+// Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 // License: GNU General Public License v3. See license.txt
 
 var get_filters = function(){
 	return [
 		{
 			"fieldname":"period",
-			"label": "Period",
+			"label": wn._("Period"),
 			"fieldtype": "Select",
 			"options": ["Monthly", "Quarterly", "Half-Yearly", "Yearly"].join("\n"),
 			"default": "Monthly"
 		},
 		{
 			"fieldname":"based_on",
-			"label": "Based On",
+			"label": wn._("Based On"),
 			"fieldtype": "Select",
 			"options": ["Item", "Item Group", "Supplier", "Supplier Type", "Project"].join("\n"),
 			"default": "Item"
 		},
 		{
 			"fieldname":"group_by",
-			"label": "Group By",
+			"label": wn._("Group By"),
 			"fieldtype": "Select",
 			"options": ["Item", "Supplier"].join("\n"),
 			"default": ""
 		},
 		{
 			"fieldname":"fiscal_year",
-			"label": "Fiscal Year",
+			"label": wn._("Fiscal Year"),
 			"fieldtype": "Link",
 			"options":'Fiscal Year',
 			"default": sys_defaults.fiscal_year
 		},
 		{
 			"fieldname":"company",
-			"label": "Company",
+			"label": wn._("Company"),
 			"fieldtype": "Link",
 			"options": "Company",
 			"default": wn.defaults.get_default("company")
diff --git a/public/js/queries.js b/public/js/queries.js
index d0346e0..3c60a91 100644
--- a/public/js/queries.js
+++ b/public/js/queries.js
@@ -1,4 +1,4 @@
-// Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+// Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 // License: GNU General Public License v3. See license.txt
 
 // searches for enabled profiles
diff --git a/public/js/sales_trends_filters.js b/public/js/sales_trends_filters.js
index 63f6e63..fe3b338 100644
--- a/public/js/sales_trends_filters.js
+++ b/public/js/sales_trends_filters.js
@@ -1,39 +1,39 @@
-// Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+// Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 // License: GNU General Public License v3. See license.txt
 
 var get_filters = function(){
  	return[
 		{
 			"fieldname":"period",
-			"label": "Period",
+			"label": wn._("Period"),
 			"fieldtype": "Select",
 			"options": ["Monthly", "Quarterly", "Half-Yearly", "Yearly"].join("\n"),
 			"default": "Monthly"
 		},
 		{
 			"fieldname":"based_on",
-			"label": "Based On",
+			"label": wn._("Based On"),
 			"fieldtype": "Select",
 			"options": ["Item", "Item Group", "Customer", "Customer Group", "Territory", "Project"].join("\n"),
 			"default": "Item"
 		},
 		{
 			"fieldname":"group_by",
-			"label": "Group By",
+			"label": wn._("Group By"),
 			"fieldtype": "Select",
 			"options": ["Item", "Customer"].join("\n"),
 			"default": ""
 		},
 		{
 			"fieldname":"fiscal_year",
-			"label": "Fiscal Year",
+			"label": wn._("Fiscal Year"),
 			"fieldtype": "Link",
 			"options":'Fiscal Year',
 			"default": sys_defaults.fiscal_year
 		},
 		{
 			"fieldname":"company",
-			"label": "Company",
+			"label": wn._("Company"),
 			"fieldtype": "Link",
 			"options": "Company",
 			"default": wn.defaults.get_default("company")
diff --git a/public/js/startup.css b/public/js/startup.css
index c3b7276..54c40d4 100644
--- a/public/js/startup.css
+++ b/public/js/startup.css
@@ -41,9 +41,8 @@
 }
 
 .pos-bill {
-	padding: 20px 5px;
+	margin-left: -30px;
+	margin-top: -10px;
+	padding: 20px 10px;
 	font-family: Monospace;
-	border: 1px solid #eee;
-    -webkit-box-shadow: 0 6px 12px rgba(0, 0, 0, 0.175);
-            box-shadow: 0 6px 12px rgba(0, 0, 0, 0.175);
 }
\ No newline at end of file
diff --git a/public/js/startup.js b/public/js/startup.js
index eee8a05..0369170 100644
--- a/public/js/startup.js
+++ b/public/js/startup.js
@@ -1,4 +1,4 @@
-// Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+// Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 // License: GNU General Public License v3. See license.txt
 
 var current_module;
@@ -6,28 +6,13 @@
 wn.provide('erpnext.startup');
 
 erpnext.startup.start = function() {
-	console.log('Starting up...');
+	console.log(wn._('Starting up...'));
 	$('#startup_div').html('Starting up...').toggle(true);
 	
-	if(user != 'Guest'){
-		// setup toolbar
-		erpnext.toolbar.setup();
-		
-		// complete registration
-		if(in_list(user_roles,'System Manager') && (wn.boot.setup_complete==='No')) { 
-			wn.require("app/js/complete_setup.js");
-			erpnext.complete_setup.show(); 
-		} else if(!wn.boot.customer_count) {
-			if(wn.get_route()[0]!=="Setup") {
-				msgprint("<a class='btn btn-success' href='#Setup'>" 
-					+ wn._("Proceed to Setup") + "</a>\
-					<br><br><p class='text-muted'>"+
-					wn._("This message goes away after you create your first customer.")+
-					"</p>", wn._("Welcome"));
-			}
-		} else if(wn.boot.expires_on && in_list(user_roles, 'System Manager')) {
-			erpnext.startup.show_expiry_banner();
-		}
+	erpnext.toolbar.setup();
+	
+	if(wn.boot.expires_on && in_list(user_roles, 'System Manager')) {
+		erpnext.startup.show_expiry_banner();
 	}
 }
 
@@ -35,16 +20,16 @@
 	var today = dateutil.str_to_obj(wn.boot.server_date);
 	var expires_on = dateutil.str_to_obj(wn.boot.expires_on);
 	var diff = dateutil.get_diff(expires_on, today);
-	var payment_link = "<a href=\"https://erpnext.com/modes-of-payment.html\" target=\"_blank\">\
-		Click here to buy subscription.</a>";
+	var payment_link = "<a href=\"https://erpnext.com/modes-of-payment.html\" target=\"_blank\">"+
+		wn._("Click here to buy subscription.")+"</a>";
 	
 	var msg = "";
 	if (0 <= diff && diff <= 10) {
 		var expiry_string = diff==0 ? "today" : repl("in %(diff)s day(s)", { diff: diff });
-		msg = repl('Your ERPNext subscription will <b>expire %(expiry_string)s</b>. %(payment_link)s',
+		msg = repl(wn._('Your ERPNext subscription will')+'<b>expire %(expiry_string)s</b>. %(payment_link)s',
 			{ expiry_string: expiry_string, payment_link: payment_link });
 	} else if (diff < 0) {
-		msg = repl('This ERPNext subscription <b>has expired</b>. %(payment_link)s', {payment_link: payment_link});
+		msg = repl(wn._('This ERPNext subscription')+'<b>'+wn._('has expired')+'</b>. %(payment_link)s', {payment_link: payment_link});
 	}
 	
 	if(msg) wn.ui.toolbar.show_banner(msg);
diff --git a/public/js/stock_analytics.js b/public/js/stock_analytics.js
index f704a86..832cac5 100644
--- a/public/js/stock_analytics.js
+++ b/public/js/stock_analytics.js
@@ -1,4 +1,4 @@
-// Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+// Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 // License: GNU General Public License v3. See license.txt
 
 wn.require("app/js/stock_grid_report.js");
@@ -6,7 +6,7 @@
 erpnext.StockAnalytics = erpnext.StockGridReport.extend({
 	init: function(wrapper, opts) {
 		var args = {
-			title: "Stock Analytics",
+			title: wn._("Stock Analytics"),
 			page: wrapper,
 			parent: $(wrapper).find('.layout-main'),
 			appframe: wrapper.appframe,
@@ -36,13 +36,13 @@
 	},
 	setup_columns: function() {
 		var std_columns = [
-			{id: "check", name: "Plot", field: "check", width: 30,
+			{id: "check", name: wn._("Plot"), field: "check", width: 30,
 				formatter: this.check_formatter},
-			{id: "name", name: "Item", field: "name", width: 300,
+			{id: "name", name: wn._("Item"), field: "name", width: 300,
 				formatter: this.tree_formatter},
-			{id: "brand", name: "Brand", field: "brand", width: 100},
-			{id: "stock_uom", name: "UOM", field: "stock_uom", width: 100},
-			{id: "opening", name: "Opening", field: "opening", hidden: true,
+			{id: "brand", name: wn._("Brand"), field: "brand", width: 100},
+			{id: "stock_uom", name: wn._("UOM"), field: "stock_uom", width: 100},
+			{id: "opening", name: wn._("Opening"), field: "opening", hidden: true,
 				formatter: this.currency_formatter}
 		];
 
@@ -50,23 +50,23 @@
 		this.columns = std_columns.concat(this.columns);
 	},
 	filters: [
-		{fieldtype:"Select", label: "Value or Qty", options:["Value", "Quantity"],
+		{fieldtype:"Select", label: wn._("Value or Qty"), options:["Value", "Quantity"],
 			filter: function(val, item, opts, me) {
 				return me.apply_zero_filter(val, item, opts, me);
 			}},
-		{fieldtype:"Select", label: "Brand", link:"Brand", 
+		{fieldtype:"Select", label: wn._("Brand"), link:"Brand", 
 			default_value: "Select Brand...", filter: function(val, item, opts) {
 				return val == opts.default_value || item.brand == val || item._show;
 			}, link_formatter: {filter_input: "brand"}},
-		{fieldtype:"Select", label: "Warehouse", link:"Warehouse", 
+		{fieldtype:"Select", label: wn._("Warehouse"), link:"Warehouse", 
 			default_value: "Select Warehouse..."},
-		{fieldtype:"Date", label: "From Date"},
-		{fieldtype:"Label", label: "To"},
-		{fieldtype:"Date", label: "To Date"},
-		{fieldtype:"Select", label: "Range", 
+		{fieldtype:"Date", label: wn._("From Date")},
+		{fieldtype:"Label", label: wn._("To")},
+		{fieldtype:"Date", label: wn._("To Date")},
+		{fieldtype:"Select", label: wn._("Range"), 
 			options:["Daily", "Weekly", "Monthly", "Quarterly", "Yearly"]},
-		{fieldtype:"Button", label: "Refresh", icon:"icon-refresh icon-white", cssClass:"btn-info"},
-		{fieldtype:"Button", label: "Reset Filters"}
+		{fieldtype:"Button", label: wn._("Refresh"), icon:"icon-refresh icon-white"},
+		{fieldtype:"Button", label: wn._("Reset Filters")}
 	],
 	setup_filters: function() {
 		var me = this;
diff --git a/public/js/stock_grid_report.js b/public/js/stock_grid_report.js
index bfe364b..b727123 100644
--- a/public/js/stock_grid_report.js
+++ b/public/js/stock_grid_report.js
@@ -1,4 +1,4 @@
-// Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+// Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 // License: GNU General Public License v3. See license.txt
 
 erpnext.StockGridReport = wn.views.TreeGridReport.extend({
diff --git a/public/js/toolbar.js b/public/js/toolbar.js
index 3f910ff..e0affaf 100644
--- a/public/js/toolbar.js
+++ b/public/js/toolbar.js
@@ -1,4 +1,4 @@
-// Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+// Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 // License: GNU General Public License v3. See license.txt
 
 /* toolbar settings */
diff --git a/public/js/transaction.js b/public/js/transaction.js
index 29fe32b..4c4a810 100644
--- a/public/js/transaction.js
+++ b/public/js/transaction.js
@@ -1,4 +1,4 @@
-// Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+// Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 // License: GNU General Public License v3. See license.txt
 
 wn.provide("erpnext");
@@ -66,13 +66,10 @@
 
 		// Show POS button only if it is enabled from features setup
 		if(cint(sys_defaults.fs_pos_view)===1 && this.frm.doctype!="Material Request")
-			this.pos_btn();
+			this.make_pos_btn();
 	},
 
-	pos_btn: function() {
-		if(this.$pos_btn) 
-			this.$pos_btn.remove();
-
+	make_pos_btn: function() {
 		if(!this.pos_active) {
 			var btn_label = wn._("POS View"),
 				icon = "icon-desktop";
@@ -81,10 +78,9 @@
 				icon = "icon-file-text";
 		}
 		var me = this;
-
-		this.$pos_btn = this.frm.add_custom_button(btn_label, function() {
+		
+		this.$pos_btn = this.frm.appframe.add_button(btn_label, function() {
 			me.toggle_pos();
-			me.pos_btn();
 		}, icon);
 	},
 
@@ -326,7 +322,7 @@
 	validate_on_previous_row: function(tax) {
 		// validate if a valid row id is mentioned in case of
 		// On Previous Row Amount and On Previous Row Total
-		if((["On Previous Row Amount", "On Previous Row Total"].indexOf(tax.charge_type) != -1) &&
+		if(([wn._("On Previous Row Amount"), wn._("On Previous Row Total")].indexOf(tax.charge_type) != -1) &&
 			(!tax.row_id || cint(tax.row_id) >= tax.idx)) {
 				var msg = repl(wn._("Row") + " # %(idx)s [%(doctype)s]: " +
 					wn._("Please specify a valid") + " %(row_id_label)s", {
@@ -455,7 +451,8 @@
 		}).join("\n");
 		
 		if(!rows) return "";
-		return '<div style="overflow-x: scroll;"><table class="table table-bordered table-hover">\
+		return '<p><a href="#" onclick="$(\'.tax-break-up\').toggleClass(\'hide\'); return false;">Show / Hide tax break-up</a><br><br></p>\
+		<div class="tax-break-up hide" style="overflow-x: auto;"><table class="table table-bordered table-hover">\
 			<thead><tr>' + headings + '</tr></thead> \
 			<tbody>' + rows + '</tbody> \
 		</table></div>';
diff --git a/public/js/utils.js b/public/js/utils.js
index 2dccd35..0ee3ce0 100644
--- a/public/js/utils.js
+++ b/public/js/utils.js
@@ -1,4 +1,4 @@
-// Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+// Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 // License: GNU General Public License v3. See license.txt
 wn.provide("erpnext");
 
@@ -13,14 +13,14 @@
 	},
 	
 	hide_naming_series: function() {
-		if(cur_frm.fields_dict.naming_series) {
+		if(cur_frm.fields_dict.naming_series && !wn.meta.get_docfield(cur_frm.doctype, "naming_series")) {
 			cur_frm.toggle_display("naming_series", cur_frm.doc.__islocal?true:false);
 		}
 	},
 	
 	hide_company: function() {
 		if(cur_frm.fields_dict.company) {
-			var companies = Object.keys(locals[":Company"]);
+			var companies = Object.keys(locals[":Company"] || {});
 			if(companies.length === 1) {
 				if(!cur_frm.doc.company) cur_frm.set_value("company", companies[0]);
 				cur_frm.toggle_display("company", false);
@@ -41,19 +41,19 @@
 		if(!grid_row.fields_dict.serial_no || 
 			grid_row.fields_dict.serial_no.get_status()!=="Write") return;
 		
-		var $btn = $('<button class="btn btn-sm btn-default">Add Serial No</button>')
+		var $btn = $('<button class="btn btn-sm btn-default">'+wn._("Add Serial No")+'</button>')
 			.appendTo($("<div>")
-				.css({"margin-bottom": "10px", "margin-top": "-10px"})
+				.css({"margin-bottom": "10px", "margin-left": "15px"})
 				.appendTo(grid_row.fields_dict.serial_no.$wrapper));
 				
 		$btn.on("click", function() {
 			var d = new wn.ui.Dialog({
-				title: "Add Serial No",
+				title: wn._("Add Serial No"),
 				fields: [
 					{
 						"fieldtype": "Link",
 						"options": "Serial No",
-						"label": "Serial No",
+						"label": wn._("Serial No"),
 						"get_query": {
 							item_code: grid_row.doc.item_code,
 							warehouse: grid_row.doc.warehouse
@@ -61,7 +61,7 @@
 					},
 					{
 						"fieldtype": "Button",
-						"label": "Add"
+						"label": wn._("Add")
 					}
 				]
 			});
diff --git a/public/js/website_utils.js b/public/js/website_utils.js
index 06bbe59..e752812 100644
--- a/public/js/website_utils.js
+++ b/public/js/website_utils.js
@@ -1,4 +1,4 @@
-// Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+// Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 // License: GNU General Public License v3. See license.txt
 
 if(!window.erpnext) erpnext = {};
diff --git a/selling/doctype/campaign/campaign.js b/selling/doctype/campaign/campaign.js
index e8c3c69..6271a16 100644
--- a/selling/doctype/campaign/campaign.js
+++ b/selling/doctype/campaign/campaign.js
@@ -1,4 +1,4 @@
-// Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+// Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 // License: GNU General Public License v3. See license.txt
 
  
diff --git a/selling/doctype/campaign/campaign.py b/selling/doctype/campaign/campaign.py
index 8bb44ee..b0215d5 100644
--- a/selling/doctype/campaign/campaign.py
+++ b/selling/doctype/campaign/campaign.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 # License: GNU General Public License v3. See license.txt
 
 from __future__ import unicode_literals
diff --git a/selling/doctype/campaign/test_campaign.py b/selling/doctype/campaign/test_campaign.py
index 20641a2..d3bf61e 100644
--- a/selling/doctype/campaign/test_campaign.py
+++ b/selling/doctype/campaign/test_campaign.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 # License: GNU General Public License v3. See license.txt
 
 test_records = [
diff --git a/selling/doctype/customer/customer.js b/selling/doctype/customer/customer.js
index 014efe6..5e0ccc9 100644
--- a/selling/doctype/customer/customer.js
+++ b/selling/doctype/customer/customer.js
@@ -1,4 +1,4 @@
-// Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+// Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 // License: GNU General Public License v3. See license.txt
 
 wn.require('app/setup/doctype/contact_control/contact_control.js');
@@ -20,10 +20,7 @@
 
 cur_frm.cscript.refresh = function(doc,dt,dn) {
 	cur_frm.cscript.setup_dashboard(doc);
-	if(sys_defaults.cust_master_name == 'Customer Name')
-		hide_field('naming_series');
-	else
-		unhide_field('naming_series');
+	erpnext.hide_naming_series();
 
 	if(doc.__islocal){		
 		hide_field(['address_html','contact_html']);
@@ -34,7 +31,6 @@
 		cur_frm.cscript.make_contact(doc,dt,dn);
 
 		cur_frm.communication_view = new wn.views.CommunicationList({
-			list: wn.model.get("Communication", {"customer": doc.name}),
 			parent: cur_frm.fields_dict.communication_html.wrapper,
 			doc: doc,
 		});
@@ -84,7 +80,7 @@
 				return "select name, address_type, address_line1, address_line2, city, state, country, pincode, fax, email_id, phone, is_primary_address, is_shipping_address from tabAddress where customer='"+cur_frm.docname+"' and docstatus != 2 order by is_primary_address desc"
 			},
 			as_dict: 1,
-			no_results_message: 'No addresses created',
+			no_results_message: wn._('No addresses created'),
 			render_row: cur_frm.cscript.render_address_row,
 		});
 		// note: render_address_row is defined in contact_control.js
@@ -114,7 +110,7 @@
 cur_frm.fields_dict['customer_group'].get_query = function(doc,dt,dn) {
 	return{
 		filters:{'is_group': 'No'}
-	}	
+	}
 }
 
 
@@ -123,3 +119,9 @@
 		query:"controllers.queries.lead_query"
 	}
 }
+
+cur_frm.fields_dict['default_price_list'].get_query = function(doc,cdt,cdn) {
+	return{
+		filters:{'buying_or_selling': "Selling"}
+	}
+}
diff --git a/selling/doctype/customer/customer.py b/selling/doctype/customer/customer.py
index 206e28d..7e4a73a 100644
--- a/selling/doctype/customer/customer.py
+++ b/selling/doctype/customer/customer.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 # License: GNU General Public License v3. See license.txt
 
 from __future__ import unicode_literals
@@ -8,7 +8,6 @@
 from webnotes import msgprint, _
 import webnotes.defaults
 
-sql = webnotes.conn.sql
 
 from utilities.transaction_base import TransactionBase
 
@@ -30,7 +29,7 @@
 		return webnotes.conn.get_value('Company', self.doc.company, 'abbr')
 
 	def get_receivables_group(self):
-		g = sql("select receivables_group from tabCompany where name=%s", self.doc.company)
+		g = webnotes.conn.sql("select receivables_group from tabCompany where name=%s", self.doc.company)
 		g = g and g[0][0] or '' 
 		if not g:
 			msgprint("Update Company master, assign a default group for Receivables")
@@ -46,7 +45,7 @@
 
 	def update_lead_status(self):
 		if self.doc.lead_name:
-			sql("update `tabLead` set status='Converted' where name = %s", self.doc.lead_name)
+			webnotes.conn.sql("update `tabLead` set status='Converted' where name = %s", self.doc.lead_name)
 
 	def create_account_head(self):
 		if self.doc.company :
@@ -131,7 +130,7 @@
 	
 	def delete_customer_account(self):
 		"""delete customer's ledger if exist and check balance before deletion"""
-		acc = sql("select name from `tabAccount` where master_type = 'Customer' \
+		acc = webnotes.conn.sql("select name from `tabAccount` where master_type = 'Customer' \
 			and master_name = %s and docstatus < 2", self.doc.name)
 		if acc:
 			from webnotes.model import delete_doc
@@ -142,7 +141,7 @@
 		self.delete_customer_contact()
 		self.delete_customer_account()
 		if self.doc.lead_name:
-			sql("update `tabLead` set status='Interested' where name=%s",self.doc.lead_name)
+			webnotes.conn.sql("update `tabLead` set status='Interested' where name=%s",self.doc.lead_name)
 			
 	def after_rename(self, old, new, merge=False):
 		#update customer_name if not naming series
diff --git a/selling/doctype/customer/customer.txt b/selling/doctype/customer/customer.txt
index b25c0bd..7a24531 100644
--- a/selling/doctype/customer/customer.txt
+++ b/selling/doctype/customer/customer.txt
@@ -2,7 +2,7 @@
  {
   "creation": "2013-06-11 14:26:44", 
   "docstatus": 0, 
-  "modified": "2013-09-10 10:50:50", 
+  "modified": "2013-11-03 14:01:33", 
   "modified_by": "Administrator", 
   "owner": "Administrator"
  }, 
@@ -38,7 +38,6 @@
   "name": "Customer"
  }, 
  {
-  "description": "Note: You Can Manage Multiple Address or Contacts via Addresses & Contacts", 
   "doctype": "DocField", 
   "fieldname": "basic_info", 
   "fieldtype": "Section Break", 
@@ -50,12 +49,22 @@
  }, 
  {
   "doctype": "DocField", 
+  "fieldname": "naming_series", 
+  "fieldtype": "Select", 
+  "label": "Series", 
+  "no_copy": 1, 
+  "options": "\nCUST\nCUSTMUM", 
+  "permlevel": 0, 
+  "print_hide": 0
+ }, 
+ {
+  "doctype": "DocField", 
   "fieldname": "customer_name", 
   "fieldtype": "Data", 
   "hidden": 0, 
   "in_filter": 1, 
   "in_list_view": 1, 
-  "label": "Customer Name", 
+  "label": "Full Name", 
   "no_copy": 1, 
   "oldfieldname": "customer_name", 
   "oldfieldtype": "Data", 
@@ -69,7 +78,7 @@
   "doctype": "DocField", 
   "fieldname": "customer_type", 
   "fieldtype": "Select", 
-  "label": "Customer Type", 
+  "label": "Type", 
   "oldfieldname": "customer_type", 
   "oldfieldtype": "Select", 
   "options": "\nCompany\nIndividual", 
@@ -78,17 +87,6 @@
  }, 
  {
   "doctype": "DocField", 
-  "fieldname": "naming_series", 
-  "fieldtype": "Select", 
-  "label": "Document Numbering Series", 
-  "no_copy": 1, 
-  "options": "\nCUST\nCUSTMUM", 
-  "permlevel": 0, 
-  "print_hide": 0
- }, 
- {
-  "description": "Fetch lead which will be converted into customer.", 
-  "doctype": "DocField", 
   "fieldname": "lead_name", 
   "fieldtype": "Link", 
   "hidden": 0, 
@@ -110,13 +108,13 @@
   "width": "50%"
  }, 
  {
-  "description": "<a href=\"#!Sales Browser/Customer Group\">To manage Customer Groups, click here</a>", 
+  "description": "<a href=\"#Sales Browser/Customer Group\">Add / Edit</a>", 
   "doctype": "DocField", 
   "fieldname": "customer_group", 
   "fieldtype": "Link", 
   "hidden": 0, 
   "in_filter": 1, 
-  "label": "Customer Group", 
+  "label": "Group", 
   "oldfieldname": "customer_group", 
   "oldfieldtype": "Link", 
   "options": "Customer Group", 
@@ -126,7 +124,7 @@
   "search_index": 1
  }, 
  {
-  "description": "<a href=\"#!Sales Browser/Territory\">To manage Territory, click here</a>", 
+  "description": "<a href=\"#Sales Browser/Territory\">Add / Edit</a>", 
   "doctype": "DocField", 
   "fieldname": "territory", 
   "fieldtype": "Link", 
@@ -140,6 +138,7 @@
   "reqd": 1
  }, 
  {
+  "depends_on": "eval:!doc.__islocal", 
   "doctype": "DocField", 
   "fieldname": "address_contacts", 
   "fieldtype": "Section Break", 
@@ -148,15 +147,6 @@
   "permlevel": 0
  }, 
  {
-  "depends_on": "eval:doc.__islocal", 
-  "doctype": "DocField", 
-  "fieldname": "address_desc", 
-  "fieldtype": "HTML", 
-  "label": "Address Desc", 
-  "options": "<em>Addresses will appear only when you save the customer</em>", 
-  "permlevel": 0
- }, 
- {
   "doctype": "DocField", 
   "fieldname": "address_html", 
   "fieldtype": "HTML", 
@@ -172,15 +162,6 @@
   "width": "50%"
  }, 
  {
-  "depends_on": "eval:doc.__islocal", 
-  "doctype": "DocField", 
-  "fieldname": "contact_desc", 
-  "fieldtype": "HTML", 
-  "label": "Contact Desc", 
-  "options": "<em>Contact Details will appear only when you save the customer</em>", 
-  "permlevel": 0
- }, 
- {
   "doctype": "DocField", 
   "fieldname": "contact_html", 
   "fieldtype": "HTML", 
@@ -190,6 +171,7 @@
   "read_only": 1
  }, 
  {
+  "depends_on": "eval:!doc.__islocal", 
   "doctype": "DocField", 
   "fieldname": "communication_history", 
   "fieldtype": "Section Break", 
@@ -237,24 +219,6 @@
   "search_index": 1
  }, 
  {
-  "doctype": "DocField", 
-  "fieldname": "default_price_list", 
-  "fieldtype": "Link", 
-  "label": "Default Price List", 
-  "options": "Price List", 
-  "permlevel": 0
- }, 
- {
-  "description": "This currency will get fetched in Sales transactions of this customer", 
-  "doctype": "DocField", 
-  "fieldname": "default_currency", 
-  "fieldtype": "Link", 
-  "label": "Default Currency", 
-  "no_copy": 1, 
-  "options": "Currency", 
-  "permlevel": 0
- }, 
- {
   "description": "Your Customer's TAX registration numbers (if applicable) or any general information", 
   "doctype": "DocField", 
   "fieldname": "customer_details", 
@@ -273,6 +237,23 @@
  }, 
  {
   "doctype": "DocField", 
+  "fieldname": "default_currency", 
+  "fieldtype": "Link", 
+  "label": "Currency", 
+  "no_copy": 1, 
+  "options": "Currency", 
+  "permlevel": 0
+ }, 
+ {
+  "doctype": "DocField", 
+  "fieldname": "default_price_list", 
+  "fieldtype": "Link", 
+  "label": "Price List", 
+  "options": "Price List", 
+  "permlevel": 0
+ }, 
+ {
+  "doctype": "DocField", 
   "fieldname": "credit_days", 
   "fieldtype": "Int", 
   "label": "Credit Days", 
@@ -310,7 +291,7 @@
   "doctype": "DocField", 
   "fieldname": "default_sales_partner", 
   "fieldtype": "Link", 
-  "label": "Default Sales Partner", 
+  "label": "Sales Partner", 
   "oldfieldname": "default_sales_partner", 
   "oldfieldtype": "Link", 
   "options": "Sales Partner", 
@@ -320,7 +301,7 @@
   "doctype": "DocField", 
   "fieldname": "default_commission_rate", 
   "fieldtype": "Float", 
-  "label": "Default Commission Rate", 
+  "label": "Commission Rate", 
   "oldfieldname": "default_commission_rate", 
   "oldfieldtype": "Currency", 
   "permlevel": 0
diff --git a/selling/doctype/customer/test_customer.py b/selling/doctype/customer/test_customer.py
index 7c90f6a..707d38a 100644
--- a/selling/doctype/customer/test_customer.py
+++ b/selling/doctype/customer/test_customer.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 # License: GNU General Public License v3. See license.txt
 
 from __future__ import unicode_literals
@@ -17,6 +17,8 @@
 			(("_Test Customer 1 Renamed",),))
 		self.assertEqual(webnotes.conn.exists("Customer", "_Test Customer 1"), ())
 		
+		webnotes.rename_doc("Customer", "_Test Customer 1 Renamed", "_Test Customer 1")
+		
 	def test_merge(self):
 		from webnotes.test_runner import make_test_records
 		make_test_records("Sales Invoice")
@@ -57,6 +59,9 @@
 		# check that old name doesn't exist
 		self.assertEqual(webnotes.conn.exists("Customer", "_Test Customer"), ())
 		self.assertEqual(webnotes.conn.exists("Account", "_Test Customer - _TC"), ())
+		
+		# create back _Test Customer
+		webnotes.bean(copy=test_records[0]).insert()
 
 test_ignore = ["Price List"]
 			
diff --git a/selling/doctype/customer_discount/customer_discount.py b/selling/doctype/customer_discount/customer_discount.py
index 784339d..e5468e5 100644
--- a/selling/doctype/customer_discount/customer_discount.py
+++ b/selling/doctype/customer_discount/customer_discount.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 # License: GNU General Public License v3. See license.txt
 
 # For license information, please see license.txt
diff --git a/selling/doctype/customer_discount/customer_discount.txt b/selling/doctype/customer_discount/customer_discount.txt
index e7b7822..135871d 100644
--- a/selling/doctype/customer_discount/customer_discount.txt
+++ b/selling/doctype/customer_discount/customer_discount.txt
@@ -2,7 +2,7 @@
  {
   "creation": "2013-07-22 12:43:40", 
   "docstatus": 0, 
-  "modified": "2013-07-22 12:49:32", 
+  "modified": "2013-11-02 19:41:31", 
   "modified_by": "Administrator", 
   "owner": "Administrator"
  }, 
@@ -27,6 +27,7 @@
   "name": "Customer Discount"
  }, 
  {
+  "description": "<a href=\"#Sales Browser/Item Group\">Add / Edit</a>", 
   "doctype": "DocField", 
   "fieldname": "item_group", 
   "fieldtype": "Link", 
@@ -36,7 +37,7 @@
  {
   "doctype": "DocField", 
   "fieldname": "discount", 
-  "fieldtype": "Currency", 
+  "fieldtype": "Float", 
   "label": "Discount (%)"
  }
 ]
\ No newline at end of file
diff --git a/selling/doctype/industry_type/industry_type.js b/selling/doctype/industry_type/industry_type.js
index e8c3c69..6271a16 100644
--- a/selling/doctype/industry_type/industry_type.js
+++ b/selling/doctype/industry_type/industry_type.js
@@ -1,4 +1,4 @@
-// Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+// Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 // License: GNU General Public License v3. See license.txt
 
  
diff --git a/selling/doctype/industry_type/industry_type.py b/selling/doctype/industry_type/industry_type.py
index 8bb44ee..b0215d5 100644
--- a/selling/doctype/industry_type/industry_type.py
+++ b/selling/doctype/industry_type/industry_type.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 # License: GNU General Public License v3. See license.txt
 
 from __future__ import unicode_literals
diff --git a/selling/doctype/industry_type/test_industry_type.py b/selling/doctype/industry_type/test_industry_type.py
index 84ca31e..91679c7 100644
--- a/selling/doctype/industry_type/test_industry_type.py
+++ b/selling/doctype/industry_type/test_industry_type.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 # License: GNU General Public License v3. See license.txt
 
 test_records = [
diff --git a/selling/doctype/installation_note/installation_note.js b/selling/doctype/installation_note/installation_note.js
index 4476c95..ea777e0 100644
--- a/selling/doctype/installation_note/installation_note.js
+++ b/selling/doctype/installation_note/installation_note.js
@@ -1,4 +1,4 @@
-// Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+// Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 // License: GNU General Public License v3. See license.txt
 
 cur_frm.cscript.tname = "Installation Note Item";
diff --git a/selling/doctype/installation_note/installation_note.py b/selling/doctype/installation_note/installation_note.py
index ca47043..026d7e1 100644
--- a/selling/doctype/installation_note/installation_note.py
+++ b/selling/doctype/installation_note/installation_note.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 # License: GNU General Public License v3. See license.txt
 
 from __future__ import unicode_literals
@@ -6,7 +6,6 @@
 
 from webnotes.utils import cstr, getdate
 from webnotes.model.bean import getlist
-from webnotes.model.code import get_obj
 from webnotes import msgprint
 from stock.utils import get_valid_serial_nos	
 
@@ -36,9 +35,9 @@
 		self.validate_fiscal_year()
 		self.validate_installation_date()
 		self.check_item_table()
-		sales_com_obj = get_obj(dt = 'Sales Common')
-		sales_com_obj.check_active_sales_items(self)
-		sales_com_obj.get_prevdoc_date(self)
+		
+		from controllers.selling_controller import check_active_sales_items
+		check_active_sales_items(self)
 
 	def validate_fiscal_year(self):
 		from accounts.utils import validate_fiscal_year
diff --git a/selling/doctype/installation_note/installation_note.txt b/selling/doctype/installation_note/installation_note.txt
index ec42455..af81d7f 100644
--- a/selling/doctype/installation_note/installation_note.txt
+++ b/selling/doctype/installation_note/installation_note.txt
@@ -2,7 +2,7 @@
  {
   "creation": "2013-04-30 13:13:06", 
   "docstatus": 0, 
-  "modified": "2013-08-08 14:22:13", 
+  "modified": "2013-11-02 16:58:44", 
   "modified_by": "Administrator", 
   "owner": "Administrator"
  }, 
@@ -54,7 +54,7 @@
   "doctype": "DocField", 
   "fieldname": "naming_series", 
   "fieldtype": "Select", 
-  "label": "Document Numbering Series", 
+  "label": "Series", 
   "no_copy": 1, 
   "oldfieldname": "naming_series", 
   "oldfieldtype": "Select", 
@@ -130,6 +130,7 @@
   "read_only": 1
  }, 
  {
+  "description": "<a href=\"#Sales Browser/Territory\">Add / Edit</a>", 
   "doctype": "DocField", 
   "fieldname": "territory", 
   "fieldtype": "Link", 
@@ -141,6 +142,7 @@
   "search_index": 1
  }, 
  {
+  "description": "<a href=\"#Sales Browser/Customer Group\">Add / Edit</a>", 
   "doctype": "DocField", 
   "fieldname": "customer_group", 
   "fieldtype": "Link", 
diff --git a/selling/doctype/installation_note_item/installation_note_item.py b/selling/doctype/installation_note_item/installation_note_item.py
index 26d0f76..cb6190f 100644
--- a/selling/doctype/installation_note_item/installation_note_item.py
+++ b/selling/doctype/installation_note_item/installation_note_item.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 # License: GNU General Public License v3. See license.txt
 
 from __future__ import unicode_literals
diff --git a/selling/doctype/installation_note_item/installation_note_item.txt b/selling/doctype/installation_note_item/installation_note_item.txt
index 02871ad..7435d46 100644
--- a/selling/doctype/installation_note_item/installation_note_item.txt
+++ b/selling/doctype/installation_note_item/installation_note_item.txt
@@ -2,7 +2,7 @@
  {
   "creation": "2013-02-22 01:27:51", 
   "docstatus": 0, 
-  "modified": "2013-07-10 14:54:09", 
+  "modified": "2013-10-10 17:02:31", 
   "modified_by": "Administrator", 
   "owner": "Administrator"
  }, 
@@ -50,18 +50,6 @@
  }, 
  {
   "doctype": "DocField", 
-  "fieldname": "prevdoc_date", 
-  "fieldtype": "Date", 
-  "hidden": 0, 
-  "in_list_view": 1, 
-  "label": "Delivery Date", 
-  "oldfieldname": "prevdoc_date", 
-  "oldfieldtype": "Date", 
-  "print_hide": 0, 
-  "read_only": 1
- }, 
- {
-  "doctype": "DocField", 
   "fieldname": "serial_no", 
   "fieldtype": "Small Text", 
   "in_list_view": 1, 
diff --git a/selling/doctype/lead/get_leads.py b/selling/doctype/lead/get_leads.py
index 3305a3b..7bc691f 100644
--- a/selling/doctype/lead/get_leads.py
+++ b/selling/doctype/lead/get_leads.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 # License: GNU General Public License v3. See license.txt
 
 from __future__ import unicode_literals
@@ -29,7 +29,7 @@
 	parent_name = contact_name or lead_name
 
 	message = make(content=content, sender=sender, subject=subject,
-		doctype = parent_doctype, name = parent_name, date=date)
+		doctype = parent_doctype, name = parent_name, date=date, sent_or_received="Received")
 	
 	if mail:
 		# save attachments to parent if from mail
diff --git a/selling/doctype/lead/lead.js b/selling/doctype/lead/lead.js
index 3c6fda7..79d649b 100644
--- a/selling/doctype/lead/lead.js
+++ b/selling/doctype/lead/lead.js
@@ -1,4 +1,4 @@
-// Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+// Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 // License: GNU General Public License v3. See license.txt
 
 wn.require('app/utilities/doctype/sms_control/sms_control.js');
@@ -23,9 +23,8 @@
 		}
 
 		if(in_list(user_roles,'System Manager')) {
-			cur_frm.footer.help_area.innerHTML = '<hr>\
-				<p><a href="#Form/Sales Email Settings">Sales Email Settings</a><br>\
-				<span class="help">Automatically extract Leads from a mail box e.g. "sales@example.com"</span></p>';
+			cur_frm.footer.help_area.innerHTML = '<p><a href="#Form/Sales Email Settings">'+wn._('Sales Email Settings')+'</a><br>\
+				<span class="help">'+wn._('Automatically extract Leads from a mail box e.g.')+' "sales@example.com"</span></p>';
 		}
 	},
 	
@@ -33,12 +32,12 @@
 		var doc = this.frm.doc;
 		erpnext.hide_naming_series();
 		this.frm.clear_custom_buttons();
-				
+
 		this.frm.__is_customer = this.frm.__is_customer || this.frm.doc.__is_customer;
 		if(!this.frm.doc.__islocal && !this.frm.__is_customer) {
-			this.frm.add_custom_button("Create Customer", this.create_customer);
-			this.frm.add_custom_button("Create Opportunity", this.create_opportunity);
-			this.frm.add_custom_button("Send SMS", this.frm.cscript.send_sms);
+			this.frm.add_custom_button(wn._("Create Customer"), this.create_customer);
+			this.frm.add_custom_button(wn._("Create Opportunity"), this.create_opportunity);
+			this.frm.appframe.add_button(wn._("Send SMS"), this.frm.cscript.send_sms, "icon-mobile-phone");
 		}
 		
 		cur_frm.communication_view = new wn.views.CommunicationList({
@@ -68,7 +67,7 @@
 					order by is_primary_address, is_shipping_address desc'
 				},
 				as_dict: 1,
-				no_results_message: 'No addresses created',
+				no_results_message: wn._('No addresses created'),
 				render_row: this.render_address_row,
 			});
 			// note: render_address_row is defined in contact_control.js
diff --git a/selling/doctype/lead/lead.py b/selling/doctype/lead/lead.py
index 41387f4..26c06bb 100644
--- a/selling/doctype/lead/lead.py
+++ b/selling/doctype/lead/lead.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 # License: GNU General Public License v3. See license.txt
 
 from __future__ import unicode_literals
@@ -7,7 +7,6 @@
 from webnotes.utils import cstr, validate_email_add, cint, extract_email_id
 from webnotes import session, msgprint
 
-sql = webnotes.conn.sql
 	
 from controllers.selling_controller import SellingController
 
@@ -27,24 +26,9 @@
 		customer = webnotes.conn.get_value("Customer", {"lead_name": self.doc.name})
 		if customer:
 			self.doc.fields["__is_customer"] = customer
-
-	def on_communication(self, comm):
-		if comm.sender == self.get_sender(comm) or \
-			webnotes.conn.get_value("Profile", extract_email_id(comm.sender), "user_type")=="System User":
-				status = "Replied"
-		else:
-			status = "Open"
-			
-		webnotes.conn.set(self.doc, 'status', status)
-
-	def check_status(self):
-		chk = sql("select status from `tabLead` where name=%s", self.doc.name)
-		chk = chk and chk[0][0] or ''
-		return cstr(chk)
 	
 	def validate(self):
-		if self.doc.status == 'Lead Lost' and not self.doc.order_lost_reason:
-			webnotes.throw("Please Enter Lost Reason under More Info section")
+		self.set_status()
 		
 		if self.doc.source == 'Campaign' and not self.doc.campaign_name and session['user'] != 'Guest':
 			webnotes.throw("Please specify campaign name")
@@ -76,14 +60,18 @@
 				webnotes.msgprint(_("""Email Id must be unique, already exists for: """) + \
 					", ".join(items), raise_exception=True)
 
-	def get_sender(self, comm):
-		return webnotes.conn.get_value('Sales Email Settings',None,'email_id')
-
 	def on_trash(self):
 		webnotes.conn.sql("""update `tabSupport Ticket` set lead='' where lead=%s""",
 			self.doc.name)
 		
 		self.delete_events()
+		
+	def has_customer(self):
+		return webnotes.conn.get_value("Customer", {"lead_name": self.doc.name})
+		
+	def has_opportunity(self):
+		return webnotes.conn.get_value("Opportunity", {"lead": self.doc.name, "docstatus": 1,
+			"status": ["!=", "Lost"]})
 
 @webnotes.whitelist()
 def make_customer(source_name, target_doclist=None):
diff --git a/selling/doctype/lead/lead.txt b/selling/doctype/lead/lead.txt
index b969906..f573a01 100644
--- a/selling/doctype/lead/lead.txt
+++ b/selling/doctype/lead/lead.txt
@@ -2,11 +2,12 @@
  {
   "creation": "2013-04-10 11:45:37", 
   "docstatus": 0, 
-  "modified": "2013-10-09 15:27:54", 
+  "modified": "2013-11-18 15:12:07", 
   "modified_by": "Administrator", 
   "owner": "Administrator"
  }, 
  {
+  "allow_import": 1, 
   "autoname": "naming_series:", 
   "doctype": "DocType", 
   "document_type": "Master", 
@@ -49,11 +50,10 @@
   "options": "icon-user"
  }, 
  {
-  "description": "To manage multiple series please go to Setup > Manage Series", 
   "doctype": "DocField", 
   "fieldname": "naming_series", 
   "fieldtype": "Select", 
-  "label": "Document Numbering Series", 
+  "label": "Series", 
   "no_copy": 1, 
   "oldfieldname": "naming_series", 
   "oldfieldtype": "Select", 
@@ -73,13 +73,12 @@
   "search_index": 1
  }, 
  {
-  "description": "Name of organization from where lead has come", 
   "doctype": "DocField", 
   "fieldname": "company_name", 
   "fieldtype": "Data", 
   "in_filter": 1, 
   "in_list_view": 1, 
-  "label": "Company Name", 
+  "label": "Organization Name", 
   "oldfieldname": "company_name", 
   "oldfieldtype": "Data", 
   "reqd": 0, 
@@ -101,7 +100,7 @@
   "fieldtype": "Column Break"
  }, 
  {
-  "default": "Open", 
+  "default": "Lead", 
   "doctype": "DocField", 
   "fieldname": "status", 
   "fieldtype": "Select", 
@@ -111,12 +110,11 @@
   "no_copy": 1, 
   "oldfieldname": "status", 
   "oldfieldtype": "Select", 
-  "options": "\nOpen\nReplied\nAttempted to Contact\nContact in Future\nContacted\nOpportunity Made\nInterested\nNot interested\nLead Lost\nConverted\nPassive", 
+  "options": "Lead\nOpen\nReplied\nOpportunity\nInterested\nConverted\nDo Not Contact", 
   "reqd": 1, 
   "search_index": 1
  }, 
  {
-  "description": "Source of the lead. If via a campaign, select \"Campaign\"", 
   "doctype": "DocField", 
   "fieldname": "source", 
   "fieldtype": "Select", 
@@ -132,7 +130,6 @@
  }, 
  {
   "depends_on": "eval:doc.source == 'Customer'", 
-  "description": "Source of th", 
   "doctype": "DocField", 
   "fieldname": "customer", 
   "fieldtype": "Link", 
@@ -182,7 +179,6 @@
  }, 
  {
   "allow_on_submit": 0, 
-  "description": "Your sales person who will contact the lead in future", 
   "doctype": "DocField", 
   "fieldname": "contact_by", 
   "fieldtype": "Link", 
@@ -198,7 +194,7 @@
  }, 
  {
   "allow_on_submit": 0, 
-  "description": "Your sales person will get a reminder on this date to contact the lead", 
+  "description": "Add to calendar on this date", 
   "doctype": "DocField", 
   "fieldname": "contact_date", 
   "fieldtype": "Date", 
@@ -223,8 +219,7 @@
   "fieldtype": "HTML", 
   "label": "Communication HTML", 
   "oldfieldname": "follow_up", 
-  "oldfieldtype": "Table", 
-  "print_hide": 1
+  "oldfieldtype": "Table"
  }, 
  {
   "doctype": "DocField", 
@@ -260,14 +255,6 @@
  }, 
  {
   "doctype": "DocField", 
-  "fieldname": "remark", 
-  "fieldtype": "Small Text", 
-  "label": "Remark", 
-  "oldfieldname": "remark", 
-  "oldfieldtype": "Text"
- }, 
- {
-  "doctype": "DocField", 
   "fieldname": "phone", 
   "fieldtype": "Data", 
   "label": "Phone", 
@@ -300,7 +287,7 @@
   "oldfieldtype": "Data"
  }, 
  {
-  "description": "<a href=\"#!Sales Browser/Territory\">To manage Territory, click here</a>", 
+  "description": "<a href=\"#Sales Browser/Territory\">Add / Edit</a>", 
   "doctype": "DocField", 
   "fieldname": "territory", 
   "fieldtype": "Link", 
@@ -378,18 +365,6 @@
   "width": "50%"
  }, 
  {
-  "allow_on_submit": 0, 
-  "depends_on": "eval:doc.status == 'Lead Lost'", 
-  "doctype": "DocField", 
-  "fieldname": "order_lost_reason", 
-  "fieldtype": "Link", 
-  "hidden": 0, 
-  "label": "Lost Reason", 
-  "oldfieldname": "order_lost_reason", 
-  "oldfieldtype": "Link", 
-  "options": "Quotation Lost Reason"
- }, 
- {
   "doctype": "DocField", 
   "fieldname": "company", 
   "fieldtype": "Link", 
@@ -417,8 +392,7 @@
   "fieldtype": "Table", 
   "hidden": 1, 
   "label": "Communications", 
-  "options": "Communication", 
-  "print_hide": 1
+  "options": "Communication"
  }, 
  {
   "cancel": 1, 
diff --git a/selling/doctype/lead/test_lead.py b/selling/doctype/lead/test_lead.py
index 3be3ada..ec18ff7 100644
--- a/selling/doctype/lead/test_lead.py
+++ b/selling/doctype/lead/test_lead.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 # License: GNU General Public License v3. See license.txt
 
 from __future__ import unicode_literals
diff --git a/selling/doctype/opportunity/opportunity.js b/selling/doctype/opportunity/opportunity.js
index 25f28bf..05970fc 100644
--- a/selling/doctype/opportunity/opportunity.js
+++ b/selling/doctype/opportunity/opportunity.js
@@ -1,4 +1,4 @@
-// Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+// Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 // License: GNU General Public License v3. See license.txt
 
 wn.require('app/utilities/doctype/sms_control/sms_control.js');
@@ -101,21 +101,14 @@
 
 cur_frm.cscript.refresh = function(doc, cdt, cdn){
 	erpnext.hide_naming_series();
-
-	cur_frm.dashboard.reset(doc);
-	if(!doc.__islocal) {
-		if(doc.status=="Converted" || doc.status=="Order Confirmed") {
-			cur_frm.dashboard.set_headline_alert(wn._(doc.status), "alert-success", "icon-ok-sign");
-		} else if(doc.status=="Opportunity Lost") {
-			cur_frm.dashboard.set_headline_alert(wn._(doc.status), "alert-danger", "icon-exclamation-sign");
-		}
-	}
-	
 	cur_frm.clear_custom_buttons();
-	if(doc.docstatus === 1 && doc.status!=="Opportunity Lost") {
-		cur_frm.add_custom_button('Create Quotation', cur_frm.cscript.create_quotation);
-		cur_frm.add_custom_button('Opportunity Lost', cur_frm.cscript['Declare Opportunity Lost']);
-		cur_frm.add_custom_button('Send SMS', cur_frm.cscript.send_sms);
+	
+	if(doc.docstatus === 1 && doc.status!=="Lost") {
+		cur_frm.add_custom_button(wn._('Create Quotation'), cur_frm.cscript.create_quotation);
+		if(doc.status!=="Quotation") {
+			cur_frm.add_custom_button(wn._('Opportunity Lost'), cur_frm.cscript['Declare Opportunity Lost']);
+		}
+		cur_frm.add_custom_button(wn._('Send SMS'), cur_frm.cscript.send_sms, "icon-mobile-phone");
 	}
 	
 	cur_frm.toggle_display("contact_info", doc.customer || doc.lead);
@@ -181,11 +174,11 @@
 
 cur_frm.cscript['Declare Opportunity Lost'] = function(){
 	var dialog = new wn.ui.Dialog({
-		title: "Set as Lost",
+		title: wn._("Set as Lost"),
 		fields: [
-			{"fieldtype": "Text", "label": "Reason for losing", "fieldname": "reason",
+			{"fieldtype": "Text", "label": wn._("Reason for losing"), "fieldname": "reason",
 				"reqd": 1 },
-			{"fieldtype": "Button", "label": "Update", "fieldname": "update"},
+			{"fieldtype": "Button", "label": wn._("Update"), "fieldname": "update"},
 		]
 	});
 
@@ -198,7 +191,7 @@
 			args: args.reason,
 			callback: function(r) {
 				if(r.exc) {
-					msgprint("There were errors.");
+					msgprint(wn._("There were errors."));
 					return;
 				}
 				dialog.hide();
diff --git a/selling/doctype/opportunity/opportunity.py b/selling/doctype/opportunity/opportunity.py
index 5854758..e6c0afe 100644
--- a/selling/doctype/opportunity/opportunity.py
+++ b/selling/doctype/opportunity/opportunity.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 # License: GNU General Public License v3. See license.txt
 
 from __future__ import unicode_literals
@@ -6,9 +6,8 @@
 
 from webnotes.utils import cstr, cint
 from webnotes.model.bean import getlist
-from webnotes import msgprint
+from webnotes import msgprint, _
 
-sql = webnotes.conn.sql
 	
 from utilities.transaction_base import TransactionBase
 
@@ -27,7 +26,7 @@
 		})
 		
 	def get_item_details(self, item_code):
-		item = sql("""select item_name, stock_uom, description_html, description, item_group, brand
+		item = webnotes.conn.sql("""select item_name, stock_uom, description_html, description, item_group, brand
 			from `tabItem` where name = %s""", item_code, as_dict=1)
 		ret = {
 			'item_name': item and item[0]['item_name'] or '',
@@ -39,7 +38,7 @@
 		return ret
 
 	def get_cust_address(self,name):
-		details = sql("select customer_name, address, territory, customer_group from `tabCustomer` where name = '%s' and docstatus != 2" %(name), as_dict = 1)
+		details = webnotes.conn.sql("select customer_name, address, territory, customer_group from `tabCustomer` where name = '%s' and docstatus != 2" %(name), as_dict = 1)
 		if details:
 			ret = {
 				'customer_name':	details and details[0]['customer_name'] or '',
@@ -49,7 +48,7 @@
 			}
 			# ********** get primary contact details (this is done separately coz. , in case there is no primary contact thn it would not be able to fetch customer details in case of join query)
 
-			contact_det = sql("select contact_name, contact_no, email_id from `tabContact` where customer = '%s' and is_customer = 1 and is_primary_contact = 'Yes' and docstatus != 2" %(name), as_dict = 1)
+			contact_det = webnotes.conn.sql("select contact_name, contact_no, email_id from `tabContact` where customer = '%s' and is_customer = 1 and is_primary_contact = 'Yes' and docstatus != 2" %(name), as_dict = 1)
 
 			ret['contact_person'] = contact_det and contact_det[0]['contact_name'] or ''
 			ret['contact_no']		 = contact_det and contact_det[0]['contact_no'] or ''
@@ -60,15 +59,6 @@
 			msgprint("Customer : %s does not exist in system." % (name))
 			raise Exception
 			
-	def get_contact_details(self, arg):
-		arg = eval(arg)
-		contact = sql("select contact_no, email_id from `tabContact` where contact_name = '%s' and customer_name = '%s'" %(arg['contact_person'],arg['customer']), as_dict = 1)
-		ret = {
-			'contact_no' : contact and contact[0]['contact_no'] or '',
-			'email_id' : contact and contact[0]['email_id'] or ''
-		}
-		return ret
-		
 	def on_update(self):
 		self.add_calendar_event()
 
@@ -109,48 +99,36 @@
 			msgprint("Customer is mandatory if 'Opportunity From' is selected as Customer", raise_exception=1)
 
 	def validate(self):
+		self.set_status()
 		self.validate_item_details()
 		self.validate_uom_is_integer("uom", "qty")
 		self.validate_lead_cust()
 		
 		from accounts.utils import validate_fiscal_year
 		validate_fiscal_year(self.doc.transaction_date, self.doc.fiscal_year, "Opportunity Date")
-		self.doc.status = "Draft"
 
 	def on_submit(self):
-		webnotes.conn.set(self.doc, 'status', 'Submitted')
-		if self.doc.lead and webnotes.conn.get_value("Lead", self.doc.lead, "status")!="Converted":
-			webnotes.conn.set_value("Lead", self.doc.lead, "status", "Opportunity Made")
+		if self.doc.lead:
+			webnotes.bean("Lead", self.doc.lead).get_controller().set_status(update=True)
 	
 	def on_cancel(self):
-		chk = sql("select t1.name from `tabQuotation` t1, `tabQuotation Item` t2 where t2.parent = t1.name and t1.docstatus=1 and (t1.status!='Order Lost' and t1.status!='Cancelled') and t2.prevdoc_docname = %s",self.doc.name)
-		if chk:
-			msgprint("Quotation No. "+cstr(chk[0][0])+" is submitted against this Opportunity. Thus can not be cancelled.")
-			raise Exception
-		else:
-			webnotes.conn.set(self.doc, 'status', 'Cancelled')
-			if self.doc.lead and webnotes.conn.get_value("Lead", self.doc.lead,
-				"status")!="Converted":
-					if webnotes.conn.get_value("Communication", {"parent": self.doc.lead}):
-						status = "Contacted"
-					else:
-						status = "Open"
-					
-					webnotes.conn.set_value("Lead", self.doc.lead, "status", status)
+		if self.has_quotation():
+			webnotes.throw(_("Cannot Cancel Opportunity as Quotation Exists"))
+		self.set_status(update=True)
 		
 	def declare_enquiry_lost(self,arg):
-		chk = sql("select t1.name from `tabQuotation` t1, `tabQuotation Item` t2 where t2.parent = t1.name and t1.docstatus=1 and (t1.status!='Order Lost' and t1.status!='Cancelled') and t2.prevdoc_docname = %s",self.doc.name)
-		if chk:
-			msgprint("Quotation No. "+cstr(chk[0][0])+" is submitted against this Opportunity. Thus 'Opportunity Lost' can not be declared against it.")
-			raise Exception
-		else:
-			webnotes.conn.set(self.doc, 'status', 'Opportunity Lost')
+		if not self.has_quotation():
+			webnotes.conn.set(self.doc, 'status', 'Lost')
 			webnotes.conn.set(self.doc, 'order_lost_reason', arg)
-			return 'true'
+		else:
+			webnotes.throw(_("Cannot declare as lost, because Quotation has been made."))
 
 	def on_trash(self):
 		self.delete_events()
 		
+	def has_quotation(self):
+		return webnotes.conn.get_value("Quotation Item", {"prevdoc_docname": self.doc.name, "docstatus": 1})
+		
 @webnotes.whitelist()
 def make_quotation(source_name, target_doclist=None):
 	from webnotes.model.mapper import get_mapped_doclist
diff --git a/selling/doctype/opportunity/opportunity.txt b/selling/doctype/opportunity/opportunity.txt
index 8a68a31..604599c 100644
--- a/selling/doctype/opportunity/opportunity.txt
+++ b/selling/doctype/opportunity/opportunity.txt
@@ -2,11 +2,12 @@
  {
   "creation": "2013-03-07 18:50:30", 
   "docstatus": 0, 
-  "modified": "2013-10-09 15:26:29", 
+  "modified": "2013-11-03 14:20:14", 
   "modified_by": "Administrator", 
   "owner": "Administrator"
  }, 
  {
+  "allow_import": 1, 
   "autoname": "naming_series:", 
   "description": "Potential Sales Deal", 
   "doctype": "DocType", 
@@ -52,11 +53,10 @@
   "options": "icon-user"
  }, 
  {
-  "description": "To manage multiple series please go to Setup > Manage Series", 
   "doctype": "DocField", 
   "fieldname": "naming_series", 
   "fieldtype": "Select", 
-  "label": "Document Numbering Series", 
+  "label": "Series", 
   "no_copy": 1, 
   "oldfieldname": "naming_series", 
   "oldfieldtype": "Select", 
@@ -125,7 +125,7 @@
   "no_copy": 1, 
   "oldfieldname": "status", 
   "oldfieldtype": "Select", 
-  "options": "\nDraft\nSubmitted\nQuotation Sent\nOrder Confirmed\nOpportunity Lost\nCancelled", 
+  "options": "Draft\nSubmitted\nQuotation\nLost\nCancelled\nReplied\nOpen", 
   "read_only": 1, 
   "reqd": 1
  }, 
@@ -168,7 +168,6 @@
   "label": "Communication History", 
   "oldfieldtype": "Section Break", 
   "options": "icon-comments", 
-  "print_hide": 1, 
   "read_only": 0
  }, 
  {
@@ -179,7 +178,6 @@
   "label": "Communication HTML", 
   "oldfieldname": "follow_up", 
   "oldfieldtype": "Table", 
-  "print_hide": 1, 
   "read_only": 0
  }, 
  {
@@ -211,7 +209,7 @@
   "read_only": 1
  }, 
  {
-  "description": "<a href=\"#Sales Browser/Territory\">To manage Territory, click here</a>", 
+  "description": "<a href=\"#Sales Browser/Territory\">Add / Edit</a>", 
   "doctype": "DocField", 
   "fieldname": "territory", 
   "fieldtype": "Link", 
@@ -225,7 +223,7 @@
  }, 
  {
   "depends_on": "eval:doc.enquiry_from==\"Customer\"", 
-  "description": "<a href=\"#Sales Browser/Customer Group\">To manage Territory, click here</a>", 
+  "description": "<a href=\"#Sales Browser/Customer Group\">Add / Edit</a>", 
   "doctype": "DocField", 
   "fieldname": "customer_group", 
   "fieldtype": "Link", 
@@ -286,7 +284,6 @@
   "read_only": 1
  }, 
  {
-  "description": "Filing in Additional Information about the Opportunity will help you analyze your data better.", 
   "doctype": "DocField", 
   "fieldname": "more_info", 
   "fieldtype": "Section Break", 
@@ -305,7 +302,6 @@
  }, 
  {
   "default": "Today", 
-  "description": "The date at which current entry is made in system.", 
   "doctype": "DocField", 
   "fieldname": "transaction_date", 
   "fieldtype": "Date", 
@@ -352,18 +348,6 @@
   "read_only": 0
  }, 
  {
-  "depends_on": "eval:!doc.__islocal", 
-  "doctype": "DocField", 
-  "fieldname": "order_lost_reason", 
-  "fieldtype": "Small Text", 
-  "label": "Quotation Lost Reason", 
-  "no_copy": 1, 
-  "oldfieldname": "order_lost_reason", 
-  "oldfieldtype": "Small Text", 
-  "read_only": 1, 
-  "report_hide": 0
- }, 
- {
   "doctype": "DocField", 
   "fieldname": "company", 
   "fieldtype": "Link", 
@@ -378,6 +362,15 @@
   "search_index": 1
  }, 
  {
+  "depends_on": "eval:!doc.__islocal", 
+  "doctype": "DocField", 
+  "fieldname": "order_lost_reason", 
+  "fieldtype": "Text", 
+  "label": "Lost Reason", 
+  "no_copy": 1, 
+  "read_only": 1
+ }, 
+ {
   "doctype": "DocField", 
   "fieldname": "column_break2", 
   "fieldtype": "Column Break", 
@@ -436,8 +429,7 @@
   "fieldtype": "Table", 
   "hidden": 1, 
   "label": "Communications", 
-  "options": "Communication", 
-  "print_hide": 1
+  "options": "Communication"
  }, 
  {
   "doctype": "DocPerm", 
diff --git a/selling/doctype/opportunity_item/opportunity_item.py b/selling/doctype/opportunity_item/opportunity_item.py
index 26d0f76..cb6190f 100644
--- a/selling/doctype/opportunity_item/opportunity_item.py
+++ b/selling/doctype/opportunity_item/opportunity_item.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 # License: GNU General Public License v3. See license.txt
 
 from __future__ import unicode_literals
diff --git a/selling/doctype/opportunity_item/opportunity_item.txt b/selling/doctype/opportunity_item/opportunity_item.txt
index fb1501c..efa1ee9 100644
--- a/selling/doctype/opportunity_item/opportunity_item.txt
+++ b/selling/doctype/opportunity_item/opportunity_item.txt
@@ -2,7 +2,7 @@
  {
   "creation": "2013-02-22 01:27:51", 
   "docstatus": 0, 
-  "modified": "2013-07-10 14:54:11", 
+  "modified": "2013-11-02 19:41:31", 
   "modified_by": "Administrator", 
   "owner": "Administrator"
  }, 
@@ -58,6 +58,7 @@
   "width": "300px"
  }, 
  {
+  "description": "<a href=\"#Sales Browser/Item Group\">Add / Edit</a>", 
   "doctype": "DocField", 
   "fieldname": "item_group", 
   "fieldtype": "Link", 
diff --git a/selling/doctype/quotation/quotation.js b/selling/doctype/quotation/quotation.js
index e20308f..c7bf447 100644
--- a/selling/doctype/quotation/quotation.js
+++ b/selling/doctype/quotation/quotation.js
@@ -1,4 +1,4 @@
-// Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+// Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 // License: GNU General Public License v3. See license.txt
 
 // Module CRM
@@ -10,7 +10,7 @@
 
 wn.require('app/accounts/doctype/sales_taxes_and_charges_master/sales_taxes_and_charges_master.js');
 wn.require('app/utilities/doctype/sms_control/sms_control.js');
-wn.require('app/selling/doctype/sales_common/sales_common.js');
+wn.require('app/selling/sales_common.js');
 wn.require('app/accounts/doctype/sales_invoice/pos.js');
 
 erpnext.selling.QuotationController = erpnext.selling.SellingController.extend({
@@ -24,22 +24,15 @@
 	},
 	refresh: function(doc, dt, dn) {
 		this._super(doc, dt, dn);
-
-		cur_frm.dashboard.reset(doc);
-		if(!doc.__islocal) {
-			if(doc.status=="Converted" || doc.status=="Order Confirmed") {
-				cur_frm.dashboard.set_headline_alert(wn._(doc.status), "alert-success", "icon-ok-sign");
-			} else if(doc.status==="Order Lost") {
-				cur_frm.dashboard.set_headline_alert(wn._(doc.status), "alert-danger", "icon-exclamation-sign");
-			}
-		}
 		
-		if(doc.docstatus == 1 && doc.status!=='Order Lost') {
-			cur_frm.add_custom_button('Make Sales Order', cur_frm.cscript['Make Sales Order']);
-			if(doc.status!=="Order Confirmed") {
-				cur_frm.add_custom_button('Set as Lost', cur_frm.cscript['Declare Order Lost']);
+		if(doc.docstatus == 1 && doc.status!=='Lost') {
+			cur_frm.add_custom_button(wn._('Make Sales Order'), 
+				cur_frm.cscript['Make Sales Order']);
+			if(doc.status!=="Ordered") {
+				cur_frm.add_custom_button(wn._('Set as Lost'), 
+					cur_frm.cscript['Declare Order Lost'], "icon-exclamation");
 			}
-			cur_frm.add_custom_button('Send SMS', cur_frm.cscript.send_sms);
+			cur_frm.appframe.add_button(wn._('Send SMS'), cur_frm.cscript.send_sms, "icon-mobile-phone");
 		}
 		
 		if (this.frm.doc.docstatus===0) {
@@ -59,7 +52,6 @@
 					})
 				});
 		}
-		
 
 		if (!doc.__islocal) {
 			cur_frm.communication_view = new wn.views.CommunicationList({
@@ -131,9 +123,9 @@
 	var dialog = new wn.ui.Dialog({
 		title: "Set as Lost",
 		fields: [
-			{"fieldtype": "Text", "label": "Reason for losing", "fieldname": "reason",
+			{"fieldtype": "Text", "label": wn._("Reason for losing"), "fieldname": "reason",
 				"reqd": 1 },
-			{"fieldtype": "Button", "label": "Update", "fieldname": "update"},
+			{"fieldtype": "Button", "label": wn._("Update"), "fieldname": "update"},
 		]
 	});
 
@@ -146,7 +138,7 @@
 			args: args.reason,
 			callback: function(r) {
 				if(r.exc) {
-					msgprint("There were errors.");
+					msgprint(wn._("There were errors."));
 					return;
 				}
 				dialog.hide();
diff --git a/selling/doctype/quotation/quotation.py b/selling/doctype/quotation/quotation.py
index 8209548..f2546b9 100644
--- a/selling/doctype/quotation/quotation.py
+++ b/selling/doctype/quotation/quotation.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 # License: GNU General Public License v3. See license.txt
 
 from __future__ import unicode_literals
@@ -9,7 +9,6 @@
 from webnotes.model.code import get_obj
 from webnotes import _, msgprint
 
-sql = webnotes.conn.sql
 	
 
 from controllers.selling_controller import SellingController
@@ -20,47 +19,10 @@
 		self.doclist = doclist
 		self.tname = 'Quotation Item'
 		self.fname = 'quotation_details'
-		 
-	# Get contact person details based on customer selected
-	# ------------------------------------------------------
-	def get_contact_details(self):
-		return get_obj('Sales Common').get_contact_details(self,0)
-	
-	# Get Item Details
-	# -----------------
-	def get_item_details(self, args=None):
-		import json
-		args = args and json.loads(args) or {}
-		if args.get('item_code'):
-			return get_obj('Sales Common').get_item_details(args, self)
-		else:
-			obj = get_obj('Sales Common')
-			for doc in self.doclist:
-				if doc.fields.get('item_code'):
-					arg = {
-						'item_code': doc.fields.get('item_code'),
-						'income_account': doc.fields.get('income_account'),
-						'cost_center': doc.fields.get('cost_center'),
-						'warehouse': doc.fields.get('warehouse')
-					}
-					res = obj.get_item_details(arg, self) or {}
-					for r in res:
-						if not doc.fields.get(r):
-							doc.fields[r] = res[r]
 
-	# Re-calculates Basic Rate & amount based on Price List Selected
-	# --------------------------------------------------------------
-	def get_adj_percent(self, arg=''):
-		get_obj('Sales Common').get_adj_percent(self)
-	
-		
-	# Get Tax rate if account type is TAX
-	# -----------------------------------
-	def get_rate(self,arg):
-		return get_obj('Sales Common').get_rate(arg)
-	
-	# Does not allow same item code to be entered twice
-	# -------------------------------------------------
+	def has_sales_order(self):
+		return webnotes.conn.get_value("Sales Order Item", {"prevdoc_docname": self.doc.name, "docstatus": 1})
+
 	def validate_for_items(self):
 		chk_dupl_itm = []
 		for d in getlist(self.doclist,'quotation_details'):
@@ -70,15 +32,12 @@
 			else:
 				chk_dupl_itm.append([cstr(d.item_code),cstr(d.description)])
 
-
-	#do not allow sales item in maintenance quotation and service item in sales quotation
-	#-----------------------------------------------------------------------------------------------
 	def validate_order_type(self):
 		super(DocType, self).validate_order_type()
 		
 		if self.doc.order_type in ['Maintenance', 'Service']:
 			for d in getlist(self.doclist, 'quotation_details'):
-				is_service_item = sql("select is_service_item from `tabItem` where name=%s", d.item_code)
+				is_service_item = webnotes.conn.sql("select is_service_item from `tabItem` where name=%s", d.item_code)
 				is_service_item = is_service_item and is_service_item[0][0] or 'No'
 				
 				if is_service_item == 'No':
@@ -86,7 +45,7 @@
 					raise Exception
 		else:
 			for d in getlist(self.doclist, 'quotation_details'):
-				is_sales_item = sql("select is_sales_item from `tabItem` where name=%s", d.item_code)
+				is_sales_item = webnotes.conn.sql("select is_sales_item from `tabItem` where name=%s", d.item_code)
 				is_sales_item = is_sales_item and is_sales_item[0][0] or 'No'
 				
 				if is_sales_item == 'No':
@@ -95,90 +54,42 @@
 	
 	def validate(self):
 		super(DocType, self).validate()
-		
-		import utilities
-		if not self.doc.status:
-			self.doc.status = "Draft"
-		else:
-			utilities.validate_status(self.doc.status, ["Draft", "Submitted", 
-				"Order Confirmed", "Order Lost", "Cancelled"])
-
+		self.set_status()
 		self.validate_order_type()
 		self.validate_for_items()
-
 		self.validate_uom_is_integer("stock_uom", "qty")
 
-		sales_com_obj = get_obj('Sales Common')
-		sales_com_obj.check_active_sales_items(self)
-		sales_com_obj.validate_max_discount(self,'quotation_details')
-
-	def on_update(self):
-		# Set Quotation Status
-		webnotes.conn.set(self.doc, 'status', 'Draft')
+	def update_opportunity(self):
+		for opportunity in self.doclist.get_distinct_values("prevdoc_docname"):
+			webnotes.bean("Opportunity", opportunity).get_controller().set_status(update=True)
 	
-	#update enquiry
-	#------------------
-	def update_enquiry(self, flag):
-		prevdoc=''
-		for d in getlist(self.doclist, 'quotation_details'):
-			if d.prevdoc_docname:
-				prevdoc = d.prevdoc_docname
-		
-		if prevdoc:
-			if flag == 'submit': #on submit
-				sql("update `tabOpportunity` set status = 'Quotation Sent' where name = %s", prevdoc)
-			elif flag == 'cancel': #on cancel
-				sql("update `tabOpportunity` set status = 'Open' where name = %s", prevdoc)
-			elif flag == 'order lost': #order lost
-				sql("update `tabOpportunity` set status = 'Opportunity Lost' where name=%s", prevdoc)
-			elif flag == 'order confirm': #order confirm
-				sql("update `tabOpportunity` set status='Order Confirmed' where name=%s", prevdoc)
-	
-	# declare as order lost
-	#-------------------------
 	def declare_order_lost(self, arg):
-		chk = sql("select t1.name from `tabSales Order` t1, `tabSales Order Item` t2 where t2.parent = t1.name and t1.docstatus=1 and t2.prevdoc_docname = %s",self.doc.name)
-		if chk:
-			msgprint("Sales Order No. "+cstr(chk[0][0])+" is submitted against this Quotation. Thus 'Order Lost' can not be declared against it.")
-			raise Exception
-		else:
-			webnotes.conn.set(self.doc, 'status', 'Order Lost')
+		if not self.has_sales_order():
+			webnotes.conn.set(self.doc, 'status', 'Lost')
 			webnotes.conn.set(self.doc, 'order_lost_reason', arg)
-			self.update_enquiry('order lost')
-			return 'true'
+			self.update_opportunity()
+		else:
+			webnotes.throw(_("Cannot set as Lost as Sales Order is made."))
 	
-	#check if value entered in item table
-	#--------------------------------------
 	def check_item_table(self):
 		if not getlist(self.doclist, 'quotation_details'):
 			msgprint("Please enter item details")
 			raise Exception
 		
-	# ON SUBMIT
-	# =========================================================================
 	def on_submit(self):
 		self.check_item_table()
 		
 		# Check for Approving Authority
 		get_obj('Authorization Control').validate_approving_authority(self.doc.doctype, self.doc.company, self.doc.grand_total, self)
-
-		# Set Quotation Status
-		webnotes.conn.set(self.doc, 'status', 'Submitted')
-		
+			
 		#update enquiry status
-		self.update_enquiry('submit')
+		self.update_opportunity()
 		
-		
-# ON CANCEL
-# ==========================================================================
 	def on_cancel(self):
 		#update enquiry status
-		self.update_enquiry('cancel')
-		
-		webnotes.conn.set(self.doc,'status','Cancelled')
+		self.set_status()
+		self.update_opportunity()
 			
-# Print other charges
-# ===========================================================================
 	def print_other_charges(self,docname):
 		print_lst = []
 		for d in getlist(self.doclist,'other_charges'):
@@ -187,6 +98,7 @@
 			lst1.append(d.total)
 			print_lst.append(lst1)
 		return print_lst
+		
 	
 @webnotes.whitelist()
 def make_sales_order(source_name, target_doclist=None):
@@ -256,7 +168,7 @@
 					customer.insert()
 					return customer
 				else:
-					raise e
+					raise
 			except webnotes.MandatoryError:
 				from webnotes.utils import get_url_to_form
 				webnotes.throw(_("Before proceeding, please create Customer from Lead") + \
diff --git a/selling/doctype/quotation/quotation.txt b/selling/doctype/quotation/quotation.txt
index 62c36b4..0c42722 100644
--- a/selling/doctype/quotation/quotation.txt
+++ b/selling/doctype/quotation/quotation.txt
@@ -2,13 +2,14 @@
  {
   "creation": "2013-05-24 19:29:08", 
   "docstatus": 0, 
-  "modified": "2013-10-11 13:21:07", 
+  "modified": "2013-11-03 14:20:15", 
   "modified_by": "Administrator", 
   "owner": "Administrator"
  }, 
  {
   "allow_attach": 1, 
   "allow_email": 0, 
+  "allow_import": 1, 
   "autoname": "naming_series:", 
   "doctype": "DocType", 
   "document_type": "Transaction", 
@@ -58,11 +59,10 @@
   "width": "50%"
  }, 
  {
-  "description": "To manage multiple series please go to Setup > Manage Series", 
   "doctype": "DocField", 
   "fieldname": "naming_series", 
   "fieldtype": "Select", 
-  "label": "Document Numbering Series", 
+  "label": "Series", 
   "no_copy": 1, 
   "oldfieldname": "naming_series", 
   "oldfieldtype": "Select", 
@@ -203,7 +203,6 @@
  }, 
  {
   "default": "Today", 
-  "description": "The date at which current entry is made in system.", 
   "doctype": "DocField", 
   "fieldname": "transaction_date", 
   "fieldtype": "Date", 
@@ -241,7 +240,6 @@
   "read_only": 0
  }, 
  {
-  "description": "Customer's currency - If you want to select a currency that is not the default currency, then you must also specify the Currency Conversion Rate.", 
   "doctype": "DocField", 
   "fieldname": "currency", 
   "fieldtype": "Link", 
@@ -261,7 +259,7 @@
   "doctype": "DocField", 
   "fieldname": "conversion_rate", 
   "fieldtype": "Float", 
-  "label": "Conversion Rate", 
+  "label": "Exchange Rate", 
   "oldfieldname": "conversion_rate", 
   "oldfieldtype": "Currency", 
   "print_hide": 1, 
@@ -277,7 +275,6 @@
   "width": "50%"
  }, 
  {
-  "description": "Select the price list as entered in \"Price List\" master. This will pull the reference rates of items against this price list as specified in \"Item\" master.", 
   "doctype": "DocField", 
   "fieldname": "selling_price_list", 
   "fieldtype": "Link", 
@@ -293,7 +290,6 @@
   "width": "100px"
  }, 
  {
-  "description": "Select the currency in which price list is maintained", 
   "doctype": "DocField", 
   "fieldname": "price_list_currency", 
   "fieldtype": "Link", 
@@ -308,7 +304,7 @@
   "doctype": "DocField", 
   "fieldname": "plc_conversion_rate", 
   "fieldtype": "Float", 
-  "label": "Price List Currency Conversion Rate", 
+  "label": "Price List Exchange Rate", 
   "print_hide": 1, 
   "read_only": 0, 
   "reqd": 1
@@ -384,7 +380,7 @@
   "fieldname": "charge", 
   "fieldtype": "Link", 
   "hidden": 0, 
-  "label": "Apply Taxes and Charges Master", 
+  "label": "Tax Master", 
   "oldfieldname": "charge", 
   "oldfieldtype": "Link", 
   "options": "Sales Taxes and Charges Master", 
@@ -401,7 +397,7 @@
   "fieldname": "shipping_rule", 
   "fieldtype": "Link", 
   "hidden": 0, 
-  "label": "Apply Shipping Rule", 
+  "label": "Shipping Rule", 
   "oldfieldtype": "Button", 
   "options": "Shipping Rule", 
   "print_hide": 1, 
@@ -562,7 +558,6 @@
   "width": "200px"
  }, 
  {
-  "description": "Add Terms and Conditions for the Quotation like Payment Terms, Validity of Offer etc. You can also prepare a Terms and Conditions Master and use the Template", 
   "doctype": "DocField", 
   "fieldname": "terms_section_break", 
   "fieldtype": "Section Break", 
@@ -576,7 +571,7 @@
   "doctype": "DocField", 
   "fieldname": "tc_name", 
   "fieldtype": "Link", 
-  "label": "Select Terms and Conditions", 
+  "label": "Terms", 
   "oldfieldname": "tc_name", 
   "oldfieldtype": "Link", 
   "options": "Terms and Conditions", 
@@ -602,7 +597,7 @@
   "read_only": 0
  }, 
  {
-  "description": "Will be fetched from Customer", 
+  "description": "<a href=\"#Sales Browser/Territory\">Add / Edit</a>", 
   "doctype": "DocField", 
   "fieldname": "territory", 
   "fieldtype": "Link", 
@@ -617,6 +612,7 @@
  }, 
  {
   "depends_on": "customer", 
+  "description": "<a href=\"#Sales Browser/Customer Group\">Add / Edit</a>", 
   "doctype": "DocField", 
   "fieldname": "customer_group", 
   "fieldtype": "Link", 
@@ -635,7 +631,7 @@
   "fieldname": "shipping_address_name", 
   "fieldtype": "Link", 
   "hidden": 0, 
-  "label": "Shipping Address Name", 
+  "label": "Shipping Address", 
   "options": "Address", 
   "print_hide": 1
  }, 
@@ -682,7 +678,6 @@
   "reqd": 0
  }, 
  {
-  "description": "Filling in additional information about the Quotation will help you analyze your data better.", 
   "doctype": "DocField", 
   "fieldname": "more_info", 
   "fieldtype": "Section Break", 
@@ -732,7 +727,7 @@
   "no_copy": 1, 
   "oldfieldname": "status", 
   "oldfieldtype": "Select", 
-  "options": "\nDraft\nSubmitted\nOrder Confirmed\nOrder Lost\nCancelled", 
+  "options": "Draft\nSubmitted\nOrdered\nLost\nCancelled", 
   "print_hide": 1, 
   "read_only": 1, 
   "reqd": 1, 
@@ -776,7 +771,7 @@
   "doctype": "DocField", 
   "fieldname": "select_print_heading", 
   "fieldtype": "Link", 
-  "label": "Select Print Heading", 
+  "label": "Print Heading", 
   "no_copy": 1, 
   "oldfieldname": "select_print_heading", 
   "oldfieldtype": "Link", 
@@ -824,6 +819,7 @@
  }, 
  {
   "allow_on_submit": 1, 
+  "depends_on": "eval:!doc.__islocal", 
   "doctype": "DocField", 
   "fieldname": "communication_html", 
   "fieldtype": "HTML", 
@@ -840,8 +836,7 @@
   "fieldtype": "Table", 
   "hidden": 1, 
   "label": "Communications", 
-  "options": "Communication", 
-  "print_hide": 1
+  "options": "Communication"
  }, 
  {
   "amend": 1, 
diff --git a/selling/doctype/quotation/test_quotation.py b/selling/doctype/quotation/test_quotation.py
index cf3881d..8f0e644 100644
--- a/selling/doctype/quotation/test_quotation.py
+++ b/selling/doctype/quotation/test_quotation.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 # License: GNU General Public License v3. See license.txt
 
 import webnotes, json
@@ -11,17 +11,19 @@
 	def test_make_sales_order(self):
 		from selling.doctype.quotation.quotation import make_sales_order
 		
-		self.assertRaises(webnotes.ValidationError, make_sales_order, "_T-Quotation-00001")
+		quotation = webnotes.bean(copy=test_records[0])
+		quotation.insert()
 		
-		quotation = webnotes.bean("Quotation","_T-Quotation-00001")
+		self.assertRaises(webnotes.ValidationError, make_sales_order, quotation.doc.name)
+		
 		quotation.submit()
 
-		sales_order = make_sales_order("_T-Quotation-00001")
+		sales_order = make_sales_order(quotation.doc.name)
 				
 		self.assertEquals(sales_order[0]["doctype"], "Sales Order")
 		self.assertEquals(len(sales_order), 2)
 		self.assertEquals(sales_order[1]["doctype"], "Sales Order Item")
-		self.assertEquals(sales_order[1]["prevdoc_docname"], "_T-Quotation-00001")
+		self.assertEquals(sales_order[1]["prevdoc_docname"], quotation.doc.name)
 		self.assertEquals(sales_order[0]["customer"], "_Test Customer")
 		
 		sales_order[0]["delivery_date"] = "2014-01-01"
diff --git a/selling/doctype/quotation_item/quotation_item.py b/selling/doctype/quotation_item/quotation_item.py
index 26d0f76..cb6190f 100644
--- a/selling/doctype/quotation_item/quotation_item.py
+++ b/selling/doctype/quotation_item/quotation_item.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 # License: GNU General Public License v3. See license.txt
 
 from __future__ import unicode_literals
diff --git a/selling/doctype/quotation_item/quotation_item.txt b/selling/doctype/quotation_item/quotation_item.txt
index c38116a..3764208 100644
--- a/selling/doctype/quotation_item/quotation_item.txt
+++ b/selling/doctype/quotation_item/quotation_item.txt
@@ -2,7 +2,7 @@
  {
   "creation": "2013-03-07 11:42:57", 
   "docstatus": 0, 
-  "modified": "2013-08-07 14:44:28", 
+  "modified": "2013-11-02 19:41:32", 
   "modified_by": "Administrator", 
   "owner": "Administrator"
  }, 
@@ -239,6 +239,7 @@
   "label": "Reference"
  }, 
  {
+  "description": "<a href=\"#Sales Browser/Item Group\">Add / Edit</a>", 
   "doctype": "DocField", 
   "fieldname": "item_group", 
   "fieldtype": "Link", 
diff --git a/selling/doctype/sales_bom/sales_bom.js b/selling/doctype/sales_bom/sales_bom.js
index 80e66b8..e6e1bb4 100644
--- a/selling/doctype/sales_bom/sales_bom.js
+++ b/selling/doctype/sales_bom/sales_bom.js
@@ -1,10 +1,10 @@
-// Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+// Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 // License: GNU General Public License v3. See license.txt
 
 cur_frm.cscript.refresh = function(doc, cdt, cdn) {
 	cur_frm.toggle_enable('new_item_code', doc.__islocal);
 	if(!doc.__islocal) {
-		cur_frm.add_custom_button("Check for Duplicates", function() {
+		cur_frm.add_custom_button(wn._("Check for Duplicates"), function() {
 			return cur_frm.call_server('check_duplicate', 1)			
 		}, 'icon-search')
 	}
@@ -15,8 +15,8 @@
 		query: "selling.doctype.sales_bom.sales_bom.get_new_item_code"
 	}
 }
-cur_frm.fields_dict.new_item_code.query_description = 'Select Item where "Is Stock Item" is "No" \
-	and "Is Sales Item" is "Yes" and there is no other Sales BOM';
+cur_frm.fields_dict.new_item_code.query_description = wn._('Select Item where "Is Stock Item" is "No"')+ 
+wn._('and "Is Sales Item" is "Yes" and there is no other Sales BOM');
 
 cur_frm.cscript.item_code = function(doc, dt, dn) {
 	var d = locals[dt][dn];
diff --git a/selling/doctype/sales_bom/sales_bom.py b/selling/doctype/sales_bom/sales_bom.py
index 2e56f2a..f2b00c6 100644
--- a/selling/doctype/sales_bom/sales_bom.py
+++ b/selling/doctype/sales_bom/sales_bom.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 # License: GNU General Public License v3. See license.txt
 
 from __future__ import unicode_literals
diff --git a/selling/doctype/sales_bom/test_sales_bom.py b/selling/doctype/sales_bom/test_sales_bom.py
index 7d273a9..02ca68f 100644
--- a/selling/doctype/sales_bom/test_sales_bom.py
+++ b/selling/doctype/sales_bom/test_sales_bom.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 # License: GNU General Public License v3. See license.txt
 
 test_records = [
diff --git a/selling/doctype/sales_bom_item/sales_bom_item.py b/selling/doctype/sales_bom_item/sales_bom_item.py
index 26d0f76..cb6190f 100644
--- a/selling/doctype/sales_bom_item/sales_bom_item.py
+++ b/selling/doctype/sales_bom_item/sales_bom_item.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 # License: GNU General Public License v3. See license.txt
 
 from __future__ import unicode_literals
diff --git a/selling/doctype/sales_common/README.md b/selling/doctype/sales_common/README.md
deleted file mode 100644
index 1c029d2..0000000
--- a/selling/doctype/sales_common/README.md
+++ /dev/null
@@ -1 +0,0 @@
-Common scripts used in Sales Cycle.
\ No newline at end of file
diff --git a/selling/doctype/sales_common/__init__.py b/selling/doctype/sales_common/__init__.py
deleted file mode 100644
index baffc48..0000000
--- a/selling/doctype/sales_common/__init__.py
+++ /dev/null
@@ -1 +0,0 @@
-from __future__ import unicode_literals
diff --git a/selling/doctype/sales_common/sales_common.py b/selling/doctype/sales_common/sales_common.py
deleted file mode 100644
index 3be27b2..0000000
--- a/selling/doctype/sales_common/sales_common.py
+++ /dev/null
@@ -1,343 +0,0 @@
-# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
-# License: GNU General Public License v3. See license.txt
-
-from __future__ import unicode_literals
-import webnotes
-
-from webnotes.utils import cint, cstr, flt
-from webnotes.model.doc import addchild
-from webnotes.model.bean import getlist
-from webnotes.model.code import get_obj
-from webnotes import msgprint, _
-
-from utilities.transaction_base import TransactionBase
-
-class DocType(TransactionBase):
-	def __init__(self,d,dl):
-		self.doc, self.doclist = d, dl
-
-
-	def get_contact_details(self, obj = '', primary = 0):
-		cond = " and contact_name = '"+cstr(obj.doc.contact_person)+"'"
-		if primary: cond = " and is_primary_contact = 'Yes'"
-		contact = webnotes.conn.sql("select contact_name, contact_no, email_id, contact_address from `tabContact` where customer = '%s' and docstatus != 2 %s" %(obj.doc.customer, cond), as_dict = 1)
-		if not contact:
-			return
-		c = contact[0]
-		obj.doc.contact_person = c['contact_name'] or ''
-		obj.doc.contact_no = c['contact_no'] or ''
-		obj.doc.email_id = c['email_id'] or ''
-		obj.doc.customer_mobile_no = c['contact_no'] or ''
-		if c['contact_address']:
-			obj.doc.customer_address = c['contact_address']
-
-	def get_invoice_details(self, obj = ''):
-		if obj.doc.company:
-			acc_head = webnotes.conn.sql("select name from `tabAccount` where name = '%s' and docstatus != 2" % (cstr(obj.doc.customer) + " - " + webnotes.conn.get_value('Company', obj.doc.company, 'abbr')))
-			obj.doc.debit_to = acc_head and acc_head[0][0] or ''
-			
-	def get_tax_details(self, item_code, obj):
-		import json
-		tax = webnotes.conn.sql("select tax_type, tax_rate from `tabItem Tax` where parent = %s" , item_code)
-		t = {}
-		for x in tax: t[x[0]] = flt(x[1])
-		ret = {
-			'item_tax_rate'		:	tax and json.dumps(t) or ''
-		}
-		return ret
-
-	def get_serial_details(self, serial_no, obj):
-		import json
-		item = webnotes.conn.sql("select item_code, make, label,brand, description from `tabSerial No` where name = '%s' and docstatus != 2" %(serial_no), as_dict=1)
-		tax = webnotes.conn.sql("select tax_type, tax_rate from `tabItem Tax` where parent = %s" , item[0]['item_code'])
-		t = {}
-		for x in tax: t[x[0]] = flt(x[1])
-		ret = {
-			'item_code'				: item and item[0]['item_code'] or '',
-			'make'						 : item and item[0]['make'] or '',
-			'label'						: item and item[0]['label'] or '',
-			'brand'						: item and item[0]['brand'] or '',
-			'description'			: item and item[0]['description'] or '',
-			'item_tax_rate'		: json.dumps(t)
-		}
-		return ret
-		
-	# To verify whether rate entered in details table does not exceed max discount %
-	# =======================================================================================
-	def validate_max_discount(self,obj, detail_table):
-		for d in getlist(obj.doclist, detail_table):
-			discount = webnotes.conn.sql("select max_discount from tabItem where name = '%s'" %(d.item_code),as_dict = 1)
-			if discount and discount[0]['max_discount'] and (flt(d.adj_rate)>flt(discount[0]['max_discount'])):
-				msgprint("You cannot give more than " + cstr(discount[0]['max_discount']) + " % discount on Item Code : "+cstr(d.item_code))
-				raise Exception
-			
-	# Get Tax rate if account type is TAX
-	# =========================================================================
-	def get_rate(self, arg):
-		arg = eval(arg)
-		rate = webnotes.conn.sql("select account_type, tax_rate from `tabAccount` where name = '%s' and docstatus != 2" %(arg['account_head']), as_dict=1)
-		ret = {'rate' : 0}
-		if arg['charge_type'] == 'Actual' and rate[0]['account_type'] == 'Tax':
-			msgprint("You cannot select ACCOUNT HEAD of type TAX as your CHARGE TYPE is 'ACTUAL'")
-			ret = {
-				'account_head'	:	''
-			}
-		elif rate[0]['account_type'] in ['Tax', 'Chargeable'] and not arg['charge_type'] == 'Actual':
-			ret = {
-				'rate'	:	rate and flt(rate[0]['tax_rate']) or 0
-			}
-		return ret
-
-
-	def get_item_list(self, obj, is_stopped=0):
-		"""get item list"""
-		il = []
-		for d in getlist(obj.doclist, obj.fname):
-			reserved_warehouse = ""
-			reserved_qty_for_main_item = 0
-			
-			if obj.doc.doctype == "Sales Order":
-				if (webnotes.conn.get_value("Item", d.item_code, "is_stock_item") == 'Yes' or 
-					self.has_sales_bom(d.item_code)) and not d.reserved_warehouse:
-						webnotes.throw(_("Please enter Reserved Warehouse for item ") + 
-							d.item_code + _(" as it is stock Item or packing item"))
-				reserved_warehouse = d.reserved_warehouse
-				if flt(d.qty) > flt(d.delivered_qty):
-					reserved_qty_for_main_item = flt(d.qty) - flt(d.delivered_qty)
-				
-			if obj.doc.doctype == "Delivery Note" and d.prevdoc_doctype == 'Sales Order':
-				# if SO qty is 10 and there is tolerance of 20%, then it will allow DN of 12.
-				# But in this case reserved qty should only be reduced by 10 and not 12
-				
-				already_delivered_qty = self.get_already_delivered_qty(obj.doc.name, 
-					d.prevdoc_docname, d.prevdoc_detail_docname)
-				so_qty, reserved_warehouse = self.get_so_qty_and_warehouse(d.prevdoc_detail_docname)
-				
-				if already_delivered_qty + d.qty > so_qty:
-					reserved_qty_for_main_item = -(so_qty - already_delivered_qty)
-				else:
-					reserved_qty_for_main_item = -flt(d.qty)
-
-			if self.has_sales_bom(d.item_code):
-				for p in getlist(obj.doclist, 'packing_details'):
-					if p.parent_detail_docname == d.name and p.parent_item == d.item_code:
-						# the packing details table's qty is already multiplied with parent's qty
-						il.append(webnotes._dict({
-							'warehouse': p.warehouse,
-							'reserved_warehouse': reserved_warehouse,
-							'item_code': p.item_code,
-							'qty': flt(p.qty),
-							'reserved_qty': (flt(p.qty)/flt(d.qty)) * reserved_qty_for_main_item,
-							'uom': p.uom,
-							'batch_no': cstr(p.batch_no).strip(),
-							'serial_no': cstr(p.serial_no).strip(),
-							'name': d.name
-						}))
-			else:
-				il.append(webnotes._dict({
-					'warehouse': d.warehouse,
-					'reserved_warehouse': reserved_warehouse,
-					'item_code': d.item_code,
-					'qty': d.qty,
-					'reserved_qty': reserved_qty_for_main_item,
-					'uom': d.stock_uom,
-					'batch_no': cstr(d.batch_no).strip(),
-					'serial_no': cstr(d.serial_no).strip(),
-					'name': d.name
-				}))
-		return il
-
-	def get_already_delivered_qty(self, dn, so, so_detail):
-		qty = webnotes.conn.sql("""select sum(qty) from `tabDelivery Note Item` 
-			where prevdoc_detail_docname = %s and docstatus = 1 
-			and prevdoc_doctype = 'Sales Order' and prevdoc_docname = %s 
-			and parent != %s""", (so_detail, so, dn))
-		return qty and flt(qty[0][0]) or 0.0
-
-	def get_so_qty_and_warehouse(self, so_detail):
-		so_item = webnotes.conn.sql("""select qty, reserved_warehouse from `tabSales Order Item`
-			where name = %s and docstatus = 1""", so_detail, as_dict=1)
-		so_qty = so_item and flt(so_item[0]["qty"]) or 0.0
-		so_warehouse = so_item and so_item[0]["reserved_warehouse"] or ""
-		return so_qty, so_warehouse
-
-	def has_sales_bom(self, item_code):
-		return webnotes.conn.sql("select name from `tabSales BOM` where new_item_code=%s and docstatus != 2", item_code)
-	
-	def get_sales_bom_items(self, item_code):
-		return webnotes.conn.sql("""select t1.item_code, t1.qty, t1.uom 
-			from `tabSales BOM Item` t1, `tabSales BOM` t2 
-			where t2.new_item_code=%s and t1.parent = t2.name""", item_code, as_dict=1)
-
-	def get_packing_item_details(self, item):
-		return webnotes.conn.sql("select item_name, description, stock_uom from `tabItem` where name = %s", item, as_dict = 1)[0]
-
-	def get_bin_qty(self, item, warehouse):
-		det = webnotes.conn.sql("select actual_qty, projected_qty from `tabBin` where item_code = '%s' and warehouse = '%s'" % (item, warehouse), as_dict = 1)
-		return det and det[0] or ''
-
-	def update_packing_list_item(self,obj, packing_item_code, qty, warehouse, line):
-		bin = self.get_bin_qty(packing_item_code, warehouse)
-		item = self.get_packing_item_details(packing_item_code)
-
-		# check if exists
-		exists = 0
-		for d in getlist(obj.doclist, 'packing_details'):
-			if d.parent_item == line.item_code and d.item_code == packing_item_code and d.parent_detail_docname == line.name:
-				pi, exists = d, 1
-				break
-
-		if not exists:
-			pi = addchild(obj.doc, 'packing_details', 'Delivery Note Packing Item', 
-				obj.doclist)
-
-		pi.parent_item = line.item_code
-		pi.item_code = packing_item_code
-		pi.item_name = item['item_name']
-		pi.parent_detail_docname = line.name
-		pi.description = item['description']
-		pi.uom = item['stock_uom']
-		pi.qty = flt(qty)
-		pi.actual_qty = bin and flt(bin['actual_qty']) or 0
-		pi.projected_qty = bin and flt(bin['projected_qty']) or 0
-		pi.prevdoc_doctype = line.prevdoc_doctype
-		if not pi.warehouse:
-			pi.warehouse = warehouse
-		if not pi.batch_no:
-			pi.batch_no = cstr(line.batch_no)
-		pi.idx = self.packing_list_idx
-		
-		# saved, since this function is called on_update of delivery note
-		pi.save()
-		
-		self.packing_list_idx += 1
-
-
-	def make_packing_list(self, obj, fname):
-		"""make packing list for sales bom item"""
-		self.packing_list_idx = 0
-		parent_items = []
-		for d in getlist(obj.doclist, fname):
-			warehouse = fname == "sales_order_details" and d.reserved_warehouse or d.warehouse
-			if self.has_sales_bom(d.item_code):
-				for i in self.get_sales_bom_items(d.item_code):
-					self.update_packing_list_item(obj, i['item_code'], flt(i['qty'])*flt(d.qty), warehouse, d)
-
-				if [d.item_code, d.name] not in parent_items:
-					parent_items.append([d.item_code, d.name])
-				
-		obj.doclist = self.cleanup_packing_list(obj, parent_items)
-		
-		return obj.doclist
-		
-	def cleanup_packing_list(self, obj, parent_items):
-		"""Remove all those child items which are no longer present in main item table"""
-		delete_list = []
-		for d in getlist(obj.doclist, 'packing_details'):
-			if [d.parent_item, d.parent_detail_docname] not in parent_items:
-				# mark for deletion from doclist
-				delete_list.append(d.name)
-
-		if not delete_list:
-			return obj.doclist
-		
-		# delete from doclist
-		obj.doclist = webnotes.doclist(filter(lambda d: d.name not in delete_list, obj.doclist))
-		
-		# delete from db
-		webnotes.conn.sql("""\
-			delete from `tabDelivery Note Packing Item`
-			where name in (%s)"""
-			% (", ".join(["%s"] * len(delete_list))),
-			tuple(delete_list))
-			
-		return obj.doclist
-		
-
-	def get_month(self,date):
-		"""Get month based on date (required in sales person and sales partner)"""
-		month_list = ['January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December']
-		month_idx = cint(cstr(date).split('-')[1])-1
-		return month_list[month_idx]
-		
-		
-	# **** Check for Stop SO as no transactions can be made against Stopped SO. Need to unstop it. ***
-	def check_stop_sales_order(self,obj):
-		for d in getlist(obj.doclist,obj.fname):
-			ref_doc_name = ''
-			if d.fields.has_key('prevdoc_docname') and d.prevdoc_docname and d.prevdoc_doctype == 'Sales Order':
-				ref_doc_name = d.prevdoc_docname
-			elif d.fields.has_key('sales_order') and d.sales_order and not d.delivery_note:
-				ref_doc_name = d.sales_order
-			if ref_doc_name:
-				so_status = webnotes.conn.sql("select status from `tabSales Order` where name = %s",ref_doc_name)
-				so_status = so_status and so_status[0][0] or ''
-				if so_status == 'Stopped':
-					msgprint("You cannot do any transaction against Sales Order : '%s' as it is Stopped." %(ref_doc_name))
-					raise Exception
-
-	def check_active_sales_items(self,obj):
-		for d in getlist(obj.doclist, obj.fname):
-			if d.item_code:
-				item = webnotes.conn.sql("""select docstatus, is_sales_item, 
-					is_service_item, default_income_account from tabItem where name = %s""", 
-					d.item_code, as_dict=True)[0]
-				if item.is_sales_item == 'No' and item.is_service_item == 'No':
-					msgprint("Item : '%s' is neither Sales nor Service Item" % (d.item_code))
-					raise Exception
-				if d.income_account and not item.default_income_account:
-					webnotes.conn.set_value("Item", d.item_code, "default_income_account", d.income_account)
-
-
-	def check_credit(self,obj,grand_total):
-		acc_head = webnotes.conn.sql("select name from `tabAccount` where company = '%s' and master_name = '%s'"%(obj.doc.company, obj.doc.customer))
-		if acc_head:
-			dbcr = webnotes.conn.sql("""select sum(debit), sum(credit) from `tabGL Entry` 
-				where account = %s""", acc_head[0][0])
-			tot_outstanding = flt(dbcr[0][0])-flt(dbcr[0][1]) if dbcr else 0
-
-			exact_outstanding = flt(tot_outstanding) + flt(grand_total)
-			get_obj('Account',acc_head[0][0]).check_credit_limit(exact_outstanding)
-
-	def get_prevdoc_date(self, obj):
-		for d in getlist(obj.doclist, obj.fname):
-			if d.prevdoc_doctype and d.prevdoc_docname:
-				if d.prevdoc_doctype in ["Sales Invoice", "Delivery Note"]:
-					date_field = "posting_date"
-				else:
-					date_field = "transaction_date"
-					
-				d.prevdoc_date = webnotes.conn.get_value(d.prevdoc_doctype, 
-					d.prevdoc_docname, date_field)
-
-def get_batch_no(doctype, txt, searchfield, start, page_len, filters):
-	from controllers.queries import get_match_cond
-
-	if filters.has_key('warehouse'):
-		return webnotes.conn.sql("""select batch_no from `tabStock Ledger Entry` sle 
-				where item_code = '%(item_code)s' 
-					and warehouse = '%(warehouse)s' 
-					and batch_no like '%(txt)s' 
-					and exists(select * from `tabBatch` 
-							where name = sle.batch_no 
-								and (ifnull(expiry_date, '')='' or expiry_date >= '%(posting_date)s') 
-								and docstatus != 2) 
-					%(mcond)s
-				group by batch_no having sum(actual_qty) > 0 
-				order by batch_no desc 
-				limit %(start)s, %(page_len)s """ % {'item_code': filters['item_code'], 
-					'warehouse': filters['warehouse'], 'posting_date': filters['posting_date'], 
-					'txt': "%%%s%%" % txt, 'mcond':get_match_cond(doctype, searchfield), 
-					'start': start, 'page_len': page_len})
-	else:
-		return webnotes.conn.sql("""select name from tabBatch 
-				where docstatus != 2 
-					and item = '%(item_code)s' 
-					and (ifnull(expiry_date, '')='' or expiry_date >= '%(posting_date)s')
-					and name like '%(txt)s' 
-					%(mcond)s 
-				order by name desc 
-				limit %(start)s, %(page_len)s""" % {'item_code': filters['item_code'], 
-				'posting_date': filters['posting_date'], 'txt': "%%%s%%" % txt, 
-				'mcond':get_match_cond(doctype, searchfield),'start': start, 
-				'page_len': page_len})
diff --git a/selling/doctype/sales_common/sales_common.txt b/selling/doctype/sales_common/sales_common.txt
deleted file mode 100644
index a407493..0000000
--- a/selling/doctype/sales_common/sales_common.txt
+++ /dev/null
@@ -1,19 +0,0 @@
-[
- {
-  "creation": "2012-03-27 14:36:14", 
-  "docstatus": 0, 
-  "modified": "2013-07-10 14:54:19", 
-  "modified_by": "Administrator", 
-  "owner": "Administrator"
- }, 
- {
-  "doctype": "DocType", 
-  "issingle": 1, 
-  "module": "Selling", 
-  "name": "__common__"
- }, 
- {
-  "doctype": "DocType", 
-  "name": "Sales Common"
- }
-]
\ No newline at end of file
diff --git a/selling/doctype/sales_order/sales_order.js b/selling/doctype/sales_order/sales_order.js
index 0c26179..e4b3caf 100644
--- a/selling/doctype/sales_order/sales_order.js
+++ b/selling/doctype/sales_order/sales_order.js
@@ -1,4 +1,4 @@
-// Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+// Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 // License: GNU General Public License v3. See license.txt
 
 // Module CRM
@@ -9,7 +9,7 @@
 cur_frm.cscript.sales_team_fname = "sales_team";
 
 
-wn.require('app/selling/doctype/sales_common/sales_common.js');
+wn.require('app/selling/sales_common.js');
 wn.require('app/accounts/doctype/sales_taxes_and_charges_master/sales_taxes_and_charges_master.js');
 wn.require('app/utilities/doctype/sms_control/sms_control.js');
 wn.require('app/accounts/doctype/sales_invoice/pos.js');
@@ -27,7 +27,7 @@
 				cur_frm.dashboard.add_progress(cint(doc.per_billed) + wn._("% Billed"), 
 					doc.per_billed);
 
-				cur_frm.add_custom_button(wn._('Send SMS'), cur_frm.cscript.send_sms);
+				cur_frm.add_custom_button(wn._('Send SMS'), cur_frm.cscript.send_sms, "icon-mobile-phone");
 				// delivery note
 				if(flt(doc.per_delivered, 2) < 100 && doc.order_type=='Sales')
 					cur_frm.add_custom_button(wn._('Make Delivery'), this.make_delivery_note);
@@ -50,11 +50,11 @@
 			
 				// stop
 				if(flt(doc.per_delivered, 2) < 100 || doc.per_billed < 100)
-					cur_frm.add_custom_button(wn._('Stop!'), cur_frm.cscript['Stop Sales Order']);
+					cur_frm.add_custom_button(wn._('Stop!'), cur_frm.cscript['Stop Sales Order'],"icon-exclamation");
 			} else {	
 				// un-stop
 				cur_frm.dashboard.set_headline_alert(wn._("Stopped"), "alert-danger", "icon-stop");
-				cur_frm.add_custom_button(wn._('Unstop'), cur_frm.cscript['Unstop Sales Order']);
+				cur_frm.add_custom_button(wn._('Unstop'), cur_frm.cscript['Unstop Sales Order'], "icon-check");
 			}
 		}
 
@@ -66,7 +66,7 @@
 						source_doctype: "Quotation",
 						get_query_filters: {
 							docstatus: 1,
-							status: ["!=", "Order Lost"],
+							status: ["!=", "Lost"],
 							order_type: cur_frm.doc.order_type,
 							customer: cur_frm.doc.customer || undefined,
 							company: cur_frm.doc.company
diff --git a/selling/doctype/sales_order/sales_order.py b/selling/doctype/sales_order/sales_order.py
index 66b487e..771aafa 100644
--- a/selling/doctype/sales_order/sales_order.py
+++ b/selling/doctype/sales_order/sales_order.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 # License: GNU General Public License v3. See license.txt
 
 from __future__ import unicode_literals
@@ -11,9 +11,6 @@
 from webnotes import msgprint
 from webnotes.model.mapper import get_mapped_doclist
 
-sql = webnotes.conn.sql
-	
-
 from controllers.selling_controller import SellingController
 
 class DocType(SellingController):
@@ -27,21 +24,6 @@
 		self.partner_tname = 'Partner Target Detail'
 		self.territory_tname = 'Territory Target Detail'
 	
-	def get_contact_details(self):
-		get_obj('Sales Common').get_contact_details(self,0)
-
-	def get_comm_rate(self, sales_partner):
-		return get_obj('Sales Common').get_comm_rate(sales_partner, self)
-
-	def get_adj_percent(self, arg=''):
-		get_obj('Sales Common').get_adj_percent(self)
-
-	def get_available_qty(self,args):
-		return get_obj('Sales Common').get_available_qty(eval(args))
-	
-	def get_rate(self,arg):
-		return get_obj('Sales Common').get_rate(arg)
-
 	def validate_mandatory(self):
 		# validate transaction date v/s delivery date
 		if self.doc.delivery_date:
@@ -88,14 +70,14 @@
 			# used for production plan
 			d.transaction_date = self.doc.transaction_date
 			
-			tot_avail_qty = sql("select projected_qty from `tabBin` \
+			tot_avail_qty = webnotes.conn.sql("select projected_qty from `tabBin` \
 				where item_code = '%s' and warehouse = '%s'" % (d.item_code,d.reserved_warehouse))
 			d.projected_qty = tot_avail_qty and flt(tot_avail_qty[0][0]) or 0
 
 	def validate_sales_mntc_quotation(self):
 		for d in getlist(self.doclist, 'sales_order_details'):
 			if d.prevdoc_docname:
-				res = sql("select name from `tabQuotation` where name=%s and order_type = %s", (d.prevdoc_docname, self.doc.order_type))
+				res = webnotes.conn.sql("select name from `tabQuotation` where name=%s and order_type = %s", (d.prevdoc_docname, self.doc.order_type))
 				if not res:
 					msgprint("""Order Type (%s) should be same in Quotation: %s \
 						and current Sales Order""" % (self.doc.order_type, d.prevdoc_docname))
@@ -112,7 +94,7 @@
 
 	def validate_proj_cust(self):
 		if self.doc.project_name and self.doc.customer_name:
-			res = sql("select name from `tabProject` where name = '%s' and (customer = '%s' or ifnull(customer,'')='')"%(self.doc.project_name, self.doc.customer))
+			res = webnotes.conn.sql("select name from `tabProject` where name = '%s' and (customer = '%s' or ifnull(customer,'')='')"%(self.doc.project_name, self.doc.customer))
 			if not res:
 				msgprint("Customer - %s does not belong to project - %s. \n\nIf you want to use project for multiple customers then please make customer details blank in project - %s."%(self.doc.customer,self.doc.project_name,self.doc.project_name))
 				raise Exception
@@ -128,13 +110,10 @@
 		self.validate_uom_is_integer("stock_uom", "qty")
 		self.validate_for_items()
 		self.validate_warehouse()
-		sales_com_obj = get_obj(dt = 'Sales Common')
-		sales_com_obj.check_active_sales_items(self)
-		
 
-		sales_com_obj.validate_max_discount(self,'sales_order_details')
-		self.doclist = sales_com_obj.make_packing_list(self,'sales_order_details')
-		
+		from stock.doctype.packed_item.packed_item import make_packing_list
+		self.doclist = make_packing_list(self,'sales_order_details')
+
 		self.validate_with_previous_doc()
 				
 		if not self.doc.status:
@@ -167,39 +146,23 @@
 		})
 
 		
-	def check_prev_docstatus(self):
-		for d in getlist(self.doclist, 'sales_order_details'):
-			cancel_quo = sql("select name from `tabQuotation` where docstatus = 2 and name = '%s'" % d.prevdoc_docname)
-			if cancel_quo:
-				msgprint("Quotation :" + cstr(cancel_quo[0][0]) + " is already cancelled !")
-				raise Exception , "Validation Error. "
-	
 	def update_enquiry_status(self, prevdoc, flag):
-		enq = sql("select t2.prevdoc_docname from `tabQuotation` t1, `tabQuotation Item` t2 where t2.parent = t1.name and t1.name=%s", prevdoc)
+		enq = webnotes.conn.sql("select t2.prevdoc_docname from `tabQuotation` t1, `tabQuotation Item` t2 where t2.parent = t1.name and t1.name=%s", prevdoc)
 		if enq:
-			sql("update `tabOpportunity` set status = %s where name=%s",(flag,enq[0][0]))
+			webnotes.conn.sql("update `tabOpportunity` set status = %s where name=%s",(flag,enq[0][0]))
 
-	def update_prevdoc_status(self, flag):
-		for d in getlist(self.doclist, 'sales_order_details'):
-			if d.prevdoc_docname:
-				if flag=='submit':
-					sql("update `tabQuotation` set status = 'Order Confirmed' where name=%s",d.prevdoc_docname)
-					
-					#update enquiry
-					self.update_enquiry_status(d.prevdoc_docname, 'Order Confirmed')
-				elif flag == 'cancel':
-					chk = sql("select t1.name from `tabSales Order` t1, `tabSales Order Item` t2 where t2.parent = t1.name and t2.prevdoc_docname=%s and t1.name!=%s and t1.docstatus=1", (d.prevdoc_docname,self.doc.name))
-					if not chk:
-						sql("update `tabQuotation` set status = 'Submitted' where name=%s",d.prevdoc_docname)
-						
-						#update enquiry
-						self.update_enquiry_status(d.prevdoc_docname, 'Quotation Sent')
+	def update_prevdoc_status(self, flag):				
+		for quotation in self.doclist.get_distinct_values("prevdoc_docname"):
+			bean = webnotes.bean("Quotation", quotation)
+			if bean.doc.docstatus==2:
+				webnotes.throw(quotation + ": " + webnotes._("Quotation is cancelled."))
+				
+			bean.get_controller().set_status(update=True)
 
 	def on_submit(self):
-		self.check_prev_docstatus()		
 		self.update_stock_ledger(update_stock = 1)
 
-		get_obj('Sales Common').check_credit(self,self.doc.grand_total)
+		self.check_credit(self.doc.grand_total)
 		
 		get_obj('Authorization Control').validate_approving_authority(self.doc.doctype, self.doc.grand_total, self)
 		
@@ -220,56 +183,56 @@
 		
 	def check_nextdoc_docstatus(self):
 		# Checks Delivery Note
-		submit_dn = sql("select t1.name from `tabDelivery Note` t1,`tabDelivery Note Item` t2 where t1.name = t2.parent and t2.prevdoc_docname = '%s' and t1.docstatus = 1" % (self.doc.name))
+		submit_dn = webnotes.conn.sql("select t1.name from `tabDelivery Note` t1,`tabDelivery Note Item` t2 where t1.name = t2.parent and t2.against_sales_order = %s and t1.docstatus = 1", self.doc.name)
 		if submit_dn:
 			msgprint("Delivery Note : " + cstr(submit_dn[0][0]) + " has been submitted against " + cstr(self.doc.doctype) + ". Please cancel Delivery Note : " + cstr(submit_dn[0][0]) + " first and then cancel "+ cstr(self.doc.doctype), raise_exception = 1)
 			
 		# Checks Sales Invoice
-		submit_rv = sql("select t1.name from `tabSales Invoice` t1,`tabSales Invoice Item` t2 where t1.name = t2.parent and t2.sales_order = '%s' and t1.docstatus = 1" % (self.doc.name))
+		submit_rv = webnotes.conn.sql("select t1.name from `tabSales Invoice` t1,`tabSales Invoice Item` t2 where t1.name = t2.parent and t2.sales_order = '%s' and t1.docstatus = 1" % (self.doc.name))
 		if submit_rv:
 			msgprint("Sales Invoice : " + cstr(submit_rv[0][0]) + " has already been submitted against " +cstr(self.doc.doctype)+ ". Please cancel Sales Invoice : "+ cstr(submit_rv[0][0]) + " first and then cancel "+ cstr(self.doc.doctype), raise_exception = 1)
 			
 		#check maintenance schedule
-		submit_ms = sql("select t1.name from `tabMaintenance Schedule` t1, `tabMaintenance Schedule Item` t2 where t2.parent=t1.name and t2.prevdoc_docname = %s and t1.docstatus = 1",self.doc.name)
+		submit_ms = webnotes.conn.sql("select t1.name from `tabMaintenance Schedule` t1, `tabMaintenance Schedule Item` t2 where t2.parent=t1.name and t2.prevdoc_docname = %s and t1.docstatus = 1",self.doc.name)
 		if submit_ms:
 			msgprint("Maintenance Schedule : " + cstr(submit_ms[0][0]) + " has already been submitted against " +cstr(self.doc.doctype)+ ". Please cancel Maintenance Schedule : "+ cstr(submit_ms[0][0]) + " first and then cancel "+ cstr(self.doc.doctype), raise_exception = 1)
 			
 		# check maintenance visit
-		submit_mv = sql("select t1.name from `tabMaintenance Visit` t1, `tabMaintenance Visit Purpose` t2 where t2.parent=t1.name and t2.prevdoc_docname = %s and t1.docstatus = 1",self.doc.name)
+		submit_mv = webnotes.conn.sql("select t1.name from `tabMaintenance Visit` t1, `tabMaintenance Visit Purpose` t2 where t2.parent=t1.name and t2.prevdoc_docname = %s and t1.docstatus = 1",self.doc.name)
 		if submit_mv:
 			msgprint("Maintenance Visit : " + cstr(submit_mv[0][0]) + " has already been submitted against " +cstr(self.doc.doctype)+ ". Please cancel Maintenance Visit : " + cstr(submit_mv[0][0]) + " first and then cancel "+ cstr(self.doc.doctype), raise_exception = 1)
 		
 		# check production order
-		pro_order = sql("""select name from `tabProduction Order` where sales_order = %s and docstatus = 1""", self.doc.name)
+		pro_order = webnotes.conn.sql("""select name from `tabProduction Order` where sales_order = %s and docstatus = 1""", self.doc.name)
 		if pro_order:
 			msgprint("""Production Order: %s exists against this sales order. 
 				Please cancel production order first and then cancel this sales order""" % 
 				pro_order[0][0], raise_exception=1)
 
 	def check_modified_date(self):
-		mod_db = sql("select modified from `tabSales Order` where name = '%s'" % self.doc.name)
-		date_diff = sql("select TIMEDIFF('%s', '%s')" % ( mod_db[0][0],cstr(self.doc.modified)))
+		mod_db = webnotes.conn.sql("select modified from `tabSales Order` where name = '%s'" % self.doc.name)
+		date_diff = webnotes.conn.sql("select TIMEDIFF('%s', '%s')" % ( mod_db[0][0],cstr(self.doc.modified)))
 		if date_diff and date_diff[0][0]:
 			msgprint("%s: %s has been modified after you have opened. Please Refresh"
 				% (self.doc.doctype, self.doc.name), raise_exception=1)
 
 	def stop_sales_order(self):
 		self.check_modified_date()
-		self.update_stock_ledger(update_stock = -1,is_stopped = 1)
+		self.update_stock_ledger(-1)
 		webnotes.conn.set(self.doc, 'status', 'Stopped')
 		msgprint("""%s: %s has been Stopped. To make transactions against this Sales Order 
 			you need to Unstop it.""" % (self.doc.doctype, self.doc.name))
 
 	def unstop_sales_order(self):
 		self.check_modified_date()
-		self.update_stock_ledger(update_stock = 1,is_stopped = 1)
+		self.update_stock_ledger(1)
 		webnotes.conn.set(self.doc, 'status', 'Submitted')
 		msgprint("%s: %s has been Unstopped" % (self.doc.doctype, self.doc.name))
 
 
-	def update_stock_ledger(self, update_stock, is_stopped = 0):
+	def update_stock_ledger(self, update_stock):
 		from stock.utils import update_bin
-		for d in self.get_item_list(is_stopped):
+		for d in self.get_item_list():
 			if webnotes.conn.get_value("Item", d['item_code'], "is_stock_item") == "Yes":
 				args = {
 					"item_code": d['item_code'],
@@ -281,10 +244,6 @@
 					"is_amended": self.doc.amended_from and 'Yes' or 'No'
 				}
 				update_bin(args)
-				
-				
-	def get_item_list(self, is_stopped):
-		return get_obj('Sales Common').get_item_list( self, is_stopped)
 
 	def on_update(self):
 		pass
@@ -343,8 +302,7 @@
 			"field_map": {
 				"export_rate": "export_rate", 
 				"name": "prevdoc_detail_docname", 
-				"parent": "prevdoc_docname", 
-				"parenttype": "prevdoc_doctype", 
+				"parent": "against_sales_order", 
 				"reserved_warehouse": "warehouse"
 			},
 			"postprocess": update_item,
diff --git a/selling/doctype/sales_order/sales_order.txt b/selling/doctype/sales_order/sales_order.txt
index 46a06b5..7a1af77 100644
--- a/selling/doctype/sales_order/sales_order.txt
+++ b/selling/doctype/sales_order/sales_order.txt
@@ -2,12 +2,13 @@
  {
   "creation": "2013-06-18 12:39:59", 
   "docstatus": 0, 
-  "modified": "2013-10-11 13:18:47", 
+  "modified": "2013-11-03 14:20:16", 
   "modified_by": "Administrator", 
   "owner": "Administrator"
  }, 
  {
   "allow_attach": 1, 
+  "allow_import": 1, 
   "autoname": "naming_series:", 
   "doctype": "DocType", 
   "document_type": "Transaction", 
@@ -57,11 +58,10 @@
   "width": "50%"
  }, 
  {
-  "description": "To manage multiple series please go to Setup > Manage Series", 
   "doctype": "DocField", 
   "fieldname": "naming_series", 
   "fieldtype": "Select", 
-  "label": "Document Numbering Series", 
+  "label": "Series", 
   "no_copy": 1, 
   "oldfieldname": "naming_series", 
   "oldfieldtype": "Select", 
@@ -70,7 +70,6 @@
   "reqd": 1
  }, 
  {
-  "description": "Select Customer", 
   "doctype": "DocField", 
   "fieldname": "customer", 
   "fieldtype": "Link", 
@@ -175,7 +174,6 @@
  }, 
  {
   "default": "Today", 
-  "description": "The date at which current entry is made in system.", 
   "doctype": "DocField", 
   "fieldname": "transaction_date", 
   "fieldtype": "Date", 
@@ -196,7 +194,7 @@
   "fieldtype": "Date", 
   "hidden": 0, 
   "in_filter": 1, 
-  "label": "Expected Delivery Date", 
+  "label": "Delivery Date", 
   "oldfieldname": "delivery_date", 
   "oldfieldtype": "Date", 
   "print_hide": 1, 
@@ -205,12 +203,12 @@
   "width": "160px"
  }, 
  {
-  "description": "Purchase Order sent by customer", 
+  "description": "Customer's Purchase Order Number", 
   "doctype": "DocField", 
   "fieldname": "po_no", 
   "fieldtype": "Data", 
   "hidden": 0, 
-  "label": "Customer's Purchase Order No", 
+  "label": "PO No", 
   "oldfieldname": "po_no", 
   "oldfieldtype": "Data", 
   "print_hide": 0, 
@@ -219,11 +217,12 @@
  }, 
  {
   "depends_on": "eval:doc.po_no", 
+  "description": "Customer's Purchase Order Date", 
   "doctype": "DocField", 
   "fieldname": "po_date", 
   "fieldtype": "Date", 
   "hidden": 0, 
-  "label": "Customer's Purchase Order Date", 
+  "label": "PO Date", 
   "oldfieldname": "po_date", 
   "oldfieldtype": "Date", 
   "print_hide": 0, 
@@ -236,7 +235,7 @@
   "fieldtype": "Link", 
   "hidden": 1, 
   "in_filter": 1, 
-  "label": "Shipping Address Name", 
+  "label": "Shipping Address", 
   "options": "Address", 
   "print_hide": 1, 
   "read_only": 0
@@ -259,7 +258,6 @@
   "options": "icon-tag"
  }, 
  {
-  "description": "Customer's currency", 
   "doctype": "DocField", 
   "fieldname": "currency", 
   "fieldtype": "Link", 
@@ -276,7 +274,7 @@
   "doctype": "DocField", 
   "fieldname": "conversion_rate", 
   "fieldtype": "Float", 
-  "label": "Conversion Rate", 
+  "label": "Exchange Rate", 
   "oldfieldname": "conversion_rate", 
   "oldfieldtype": "Currency", 
   "print_hide": 1, 
@@ -290,7 +288,6 @@
   "width": "50%"
  }, 
  {
-  "description": "Select the price list as entered in \"Price List\" master. This will pull the reference rates of items against this price list as specified in \"Item\" master.", 
   "doctype": "DocField", 
   "fieldname": "selling_price_list", 
   "fieldtype": "Link", 
@@ -303,7 +300,6 @@
   "width": "100px"
  }, 
  {
-  "description": "Select the currency in which price list is maintained", 
   "doctype": "DocField", 
   "fieldname": "price_list_currency", 
   "fieldtype": "Link", 
@@ -318,7 +314,7 @@
   "doctype": "DocField", 
   "fieldname": "plc_conversion_rate", 
   "fieldtype": "Float", 
-  "label": "Price List Currency Conversion Rate", 
+  "label": "Price List Exchange Rate", 
   "print_hide": 1, 
   "reqd": 1
  }, 
@@ -360,7 +356,7 @@
   "label": "Packing Details", 
   "oldfieldname": "packing_details", 
   "oldfieldtype": "Table", 
-  "options": "Delivery Note Packing Item", 
+  "options": "Packed Item", 
   "print_hide": 1, 
   "read_only": 1
  }, 
@@ -408,7 +404,7 @@
   "doctype": "DocField", 
   "fieldname": "charge", 
   "fieldtype": "Link", 
-  "label": "Apply Taxes and Charges Master", 
+  "label": "Tax Master", 
   "oldfieldname": "charge", 
   "oldfieldtype": "Link", 
   "options": "Sales Taxes and Charges Master", 
@@ -423,7 +419,7 @@
   "doctype": "DocField", 
   "fieldname": "shipping_rule", 
   "fieldtype": "Link", 
-  "label": "Apply Shipping Rule", 
+  "label": "Shipping Rule", 
   "oldfieldtype": "Button", 
   "options": "Shipping Rule", 
   "print_hide": 1
@@ -584,7 +580,7 @@
   "doctype": "DocField", 
   "fieldname": "tc_name", 
   "fieldtype": "Link", 
-  "label": "Select Terms and Conditions", 
+  "label": "Terms", 
   "oldfieldname": "tc_name", 
   "oldfieldtype": "Link", 
   "options": "Terms and Conditions", 
@@ -615,6 +611,7 @@
   "width": "50%"
  }, 
  {
+  "description": "<a href=\"#Sales Browser/Territory\">Add / Edit</a>", 
   "doctype": "DocField", 
   "fieldname": "territory", 
   "fieldtype": "Link", 
@@ -626,7 +623,7 @@
   "search_index": 1
  }, 
  {
-  "description": "Category of customer as entered in Customer master", 
+  "description": "<a href=\"#Sales Browser/Customer Group\">Add / Edit</a>", 
   "doctype": "DocField", 
   "fieldname": "customer_group", 
   "fieldtype": "Link", 
@@ -663,7 +660,6 @@
   "print_hide": 1
  }, 
  {
-  "description": "Filling in additional information about the Sales Order will help you analyze your data better.", 
   "doctype": "DocField", 
   "fieldname": "more_info", 
   "fieldtype": "Section Break", 
@@ -729,7 +725,7 @@
   "doctype": "DocField", 
   "fieldname": "select_print_heading", 
   "fieldtype": "Link", 
-  "label": "Select Print Heading", 
+  "label": "Print Heading", 
   "no_copy": 1, 
   "oldfieldname": "select_print_heading", 
   "oldfieldtype": "Link", 
@@ -844,7 +840,6 @@
   "print_hide": 1
  }, 
  {
-  "description": "Name as entered in Sales Partner master", 
   "doctype": "DocField", 
   "fieldname": "sales_partner", 
   "fieldtype": "Link", 
diff --git a/selling/doctype/sales_order/templates/pages/order.py b/selling/doctype/sales_order/templates/pages/order.py
index 88a4d46..d53a8b0 100644
--- a/selling/doctype/sales_order/templates/pages/order.py
+++ b/selling/doctype/sales_order/templates/pages/order.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 # License: GNU General Public License v3. See license.txt
 
 from __future__ import unicode_literals
diff --git a/selling/doctype/sales_order/templates/pages/orders.py b/selling/doctype/sales_order/templates/pages/orders.py
index 150a20f..d7f83dc 100644
--- a/selling/doctype/sales_order/templates/pages/orders.py
+++ b/selling/doctype/sales_order/templates/pages/orders.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 # License: GNU General Public License v3. See license.txt
 
 from __future__ import unicode_literals
diff --git a/selling/doctype/sales_order/test_sales_order.py b/selling/doctype/sales_order/test_sales_order.py
index 7b72271..1549b24 100644
--- a/selling/doctype/sales_order/test_sales_order.py
+++ b/selling/doctype/sales_order/test_sales_order.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 # License: GNU General Public License v3. See license.txt
 
 import webnotes
@@ -72,10 +72,13 @@
 		
 	def create_dn_against_so(self, so, delivered_qty=0):
 		from stock.doctype.delivery_note.test_delivery_note import test_records as dn_test_records
+		from stock.doctype.delivery_note.test_delivery_note import _insert_purchase_receipt
+
+		_insert_purchase_receipt(so.doclist[1].item_code)
+		
 		dn = webnotes.bean(webnotes.copy_doclist(dn_test_records[0]))
 		dn.doclist[1].item_code = so.doclist[1].item_code
-		dn.doclist[1].prevdoc_doctype = "Sales Order"
-		dn.doclist[1].prevdoc_docname = so.doc.name
+		dn.doclist[1].against_sales_order = so.doc.name
 		dn.doclist[1].prevdoc_detail_docname = so.doclist[1].name
 		if delivered_qty:
 			dn.doclist[1].qty = delivered_qty
@@ -273,14 +276,13 @@
 			so.doclist[1].reserved_warehouse, 20.0)
 
 	def test_warehouse_user(self):
-		webnotes.session.user = "test@example.com"
-
 		webnotes.bean("Profile", "test@example.com").get_controller()\
 			.add_roles("Sales User", "Sales Manager", "Material User", "Material Manager")
 			
 		webnotes.bean("Profile", "test2@example.com").get_controller()\
 			.add_roles("Sales User", "Sales Manager", "Material User", "Material Manager")
-
+		
+		webnotes.session.user = "test@example.com"
 
 		from stock.utils import UserNotAllowedForWarehouse
 		so = webnotes.bean(copy = test_records[0])
diff --git a/selling/doctype/sales_order_item/sales_order_item.py b/selling/doctype/sales_order_item/sales_order_item.py
index 26d0f76..cb6190f 100644
--- a/selling/doctype/sales_order_item/sales_order_item.py
+++ b/selling/doctype/sales_order_item/sales_order_item.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 # License: GNU General Public License v3. See license.txt
 
 from __future__ import unicode_literals
diff --git a/selling/doctype/sales_order_item/sales_order_item.txt b/selling/doctype/sales_order_item/sales_order_item.txt
index 47b4d6b..4754aa1 100644
--- a/selling/doctype/sales_order_item/sales_order_item.txt
+++ b/selling/doctype/sales_order_item/sales_order_item.txt
@@ -2,7 +2,7 @@
  {
   "creation": "2013-03-07 11:42:58", 
   "docstatus": 0, 
-  "modified": "2013-08-22 15:43:07", 
+  "modified": "2013-11-03 14:14:17", 
   "modified_by": "Administrator", 
   "owner": "Administrator"
  }, 
@@ -344,6 +344,7 @@
   "search_index": 1
  }, 
  {
+  "description": "<a href=\"#Sales Browser/Item Group\">Add / Edit</a>", 
   "doctype": "DocField", 
   "fieldname": "item_group", 
   "fieldtype": "Link", 
@@ -401,7 +402,6 @@
   "report_hide": 1
  }, 
  {
-  "description": "The date at which current entry is made in system.", 
   "doctype": "DocField", 
   "fieldname": "transaction_date", 
   "fieldtype": "Date", 
diff --git a/selling/doctype/sales_team/sales_team.py b/selling/doctype/sales_team/sales_team.py
index 26d0f76..cb6190f 100644
--- a/selling/doctype/sales_team/sales_team.py
+++ b/selling/doctype/sales_team/sales_team.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 # License: GNU General Public License v3. See license.txt
 
 from __future__ import unicode_literals
diff --git a/selling/doctype/selling_settings/selling_settings.py b/selling/doctype/selling_settings/selling_settings.py
index 9386652..0895e3f 100644
--- a/selling/doctype/selling_settings/selling_settings.py
+++ b/selling/doctype/selling_settings/selling_settings.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 # License: GNU General Public License v3. See license.txt
 
 # For license information, please see license.txt
@@ -14,3 +14,7 @@
 		for key in ["cust_master_name", "customer_group", "territory", "maintain_same_sales_rate",
 			"editable_price_list_rate", "selling_price_list"]:
 				webnotes.conn.set_default(key, self.doc.fields.get(key, ""))
+
+		from setup.doctype.naming_series.naming_series import set_by_naming_series
+		set_by_naming_series("Customer", "customer_name", 
+			self.doc.get("cust_master_name")=="Naming Series", hide_name_field=False)
diff --git a/selling/doctype/selling_settings/selling_settings.txt b/selling/doctype/selling_settings/selling_settings.txt
index fed3627..a112a7c 100644
--- a/selling/doctype/selling_settings/selling_settings.txt
+++ b/selling/doctype/selling_settings/selling_settings.txt
@@ -2,7 +2,7 @@
  {
   "creation": "2013-06-25 10:25:16", 
   "docstatus": 0, 
-  "modified": "2013-08-09 14:46:24", 
+  "modified": "2013-11-02 16:58:56", 
   "modified_by": "Administrator", 
   "owner": "Administrator"
  }, 
@@ -47,7 +47,7 @@
   "options": "Customer Name\nNaming Series"
  }, 
  {
-  "description": "<a href=\"#Sales Browser/Customer Group\">Manage Customer Groups</a>", 
+  "description": "<a href=\"#Sales Browser/Customer Group\">Add / Edit</a>", 
   "doctype": "DocField", 
   "fieldname": "customer_group", 
   "fieldtype": "Link", 
@@ -55,7 +55,7 @@
   "options": "Customer Group"
  }, 
  {
-  "description": "<a href=\"#Sales Browser/Territory\">Territory</a>", 
+  "description": "<a href=\"#Sales Browser/Territory\">Add / Edit</a>", 
   "doctype": "DocField", 
   "fieldname": "territory", 
   "fieldtype": "Link", 
diff --git a/selling/doctype/shopping_cart_price_list/shopping_cart_price_list.py b/selling/doctype/shopping_cart_price_list/shopping_cart_price_list.py
index 784339d..e5468e5 100644
--- a/selling/doctype/shopping_cart_price_list/shopping_cart_price_list.py
+++ b/selling/doctype/shopping_cart_price_list/shopping_cart_price_list.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 # License: GNU General Public License v3. See license.txt
 
 # For license information, please see license.txt
diff --git a/selling/doctype/shopping_cart_settings/shopping_cart_settings.js b/selling/doctype/shopping_cart_settings/shopping_cart_settings.js
index c38c757..7505dc2 100644
--- a/selling/doctype/shopping_cart_settings/shopping_cart_settings.js
+++ b/selling/doctype/shopping_cart_settings/shopping_cart_settings.js
@@ -1,4 +1,4 @@
-// Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+// Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 // License: GNU General Public License v3. See license.txt
 
 $.extend(cur_frm.cscript, {
diff --git a/selling/doctype/shopping_cart_settings/shopping_cart_settings.py b/selling/doctype/shopping_cart_settings/shopping_cart_settings.py
index d23f5e2..6912ac5 100644
--- a/selling/doctype/shopping_cart_settings/shopping_cart_settings.py
+++ b/selling/doctype/shopping_cart_settings/shopping_cart_settings.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 # License: GNU General Public License v3. See license.txt
 
 # For license information, please see license.txt
diff --git a/selling/doctype/shopping_cart_settings/shopping_cart_settings.txt b/selling/doctype/shopping_cart_settings/shopping_cart_settings.txt
index 531f8da..ffc3635 100644
--- a/selling/doctype/shopping_cart_settings/shopping_cart_settings.txt
+++ b/selling/doctype/shopping_cart_settings/shopping_cart_settings.txt
@@ -2,7 +2,7 @@
  {
   "creation": "2013-06-19 15:57:32", 
   "docstatus": 0, 
-  "modified": "2013-07-15 17:33:15", 
+  "modified": "2013-11-02 16:58:56", 
   "modified_by": "Administrator", 
   "owner": "Administrator"
  }, 
@@ -58,6 +58,7 @@
   "reqd": 1
  }, 
  {
+  "description": "<a href=\"#Sales Browser/Territory\">Add / Edit</a>", 
   "doctype": "DocField", 
   "fieldname": "default_territory", 
   "fieldtype": "Link", 
@@ -71,6 +72,7 @@
   "fieldtype": "Column Break"
  }, 
  {
+  "description": "<a href=\"#Sales Browser/Customer Group\">Add / Edit</a>", 
   "doctype": "DocField", 
   "fieldname": "default_customer_group", 
   "fieldtype": "Link", 
diff --git a/selling/doctype/shopping_cart_settings/test_shopping_cart_settings.py b/selling/doctype/shopping_cart_settings/test_shopping_cart_settings.py
index 77c7e23..6055c61 100644
--- a/selling/doctype/shopping_cart_settings/test_shopping_cart_settings.py
+++ b/selling/doctype/shopping_cart_settings/test_shopping_cart_settings.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 # License: GNU General Public License v3. See license.txt
 
 # For license information, please see license.txt
diff --git a/selling/doctype/shopping_cart_shipping_rule/shopping_cart_shipping_rule.py b/selling/doctype/shopping_cart_shipping_rule/shopping_cart_shipping_rule.py
index 784339d..e5468e5 100644
--- a/selling/doctype/shopping_cart_shipping_rule/shopping_cart_shipping_rule.py
+++ b/selling/doctype/shopping_cart_shipping_rule/shopping_cart_shipping_rule.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 # License: GNU General Public License v3. See license.txt
 
 # For license information, please see license.txt
diff --git a/selling/doctype/shopping_cart_taxes_and_charges_master/shopping_cart_taxes_and_charges_master.py b/selling/doctype/shopping_cart_taxes_and_charges_master/shopping_cart_taxes_and_charges_master.py
index 784339d..e5468e5 100644
--- a/selling/doctype/shopping_cart_taxes_and_charges_master/shopping_cart_taxes_and_charges_master.py
+++ b/selling/doctype/shopping_cart_taxes_and_charges_master/shopping_cart_taxes_and_charges_master.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 # License: GNU General Public License v3. See license.txt
 
 # For license information, please see license.txt
diff --git a/selling/doctype/sms_center/sms_center.py b/selling/doctype/sms_center/sms_center.py
index 29e793c..8671210 100644
--- a/selling/doctype/sms_center/sms_center.py
+++ b/selling/doctype/sms_center/sms_center.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 # License: GNU General Public License v3. See license.txt
 
 from __future__ import unicode_literals
@@ -10,7 +10,6 @@
 from webnotes.model.code import get_obj
 from webnotes import msgprint
 
-sql = webnotes.conn.sql
   
 # ----------
 
@@ -29,15 +28,15 @@
       where_clause = self.doc.sales_partner and " and ifnull(is_sales_partner, 0) = 1 and sales_partner = '%s'" % self.doc.sales_partner or " and ifnull(sales_partner, '') != ''"
 
     if self.doc.send_to in ['All Contact', 'All Customer Contact', 'All Supplier Contact', 'All Sales Partner Contact']:
-      rec = sql("select CONCAT(ifnull(first_name,''),'',ifnull(last_name,'')), mobile_no from `tabContact` where ifnull(mobile_no,'')!='' and docstatus != 2 %s" % where_clause)
+      rec = webnotes.conn.sql("select CONCAT(ifnull(first_name,''),'',ifnull(last_name,'')), mobile_no from `tabContact` where ifnull(mobile_no,'')!='' and docstatus != 2 %s" % where_clause)
     elif self.doc.send_to == 'All Lead (Open)':
-      rec = sql("select lead_name, mobile_no from tabLead where ifnull(mobile_no,'')!='' and docstatus != 2 and status = 'Open'")
+      rec = webnotes.conn.sql("select lead_name, mobile_no from tabLead where ifnull(mobile_no,'')!='' and docstatus != 2 and status = 'Open'")
     elif self.doc.send_to == 'All Employee (Active)':
       where_clause = self.doc.department and " and department = '%s'" % self.doc.department or ""
       where_clause += self.doc.branch and " and branch = '%s'" % self.doc.branch or ""
-      rec = sql("select employee_name, cell_number from `tabEmployee` where status = 'Active' and docstatus < 2 and ifnull(cell_number,'')!='' %s" % where_clause)
+      rec = webnotes.conn.sql("select employee_name, cell_number from `tabEmployee` where status = 'Active' and docstatus < 2 and ifnull(cell_number,'')!='' %s" % where_clause)
     elif self.doc.send_to == 'All Sales Person':
-      rec = sql("select sales_person_name, mobile_no from `tabSales Person` where docstatus != 2 and ifnull(mobile_no,'')!=''")
+      rec = webnotes.conn.sql("select sales_person_name, mobile_no from `tabSales Person` where docstatus != 2 and ifnull(mobile_no,'')!=''")
     rec_list = ''
     for d in rec:
       rec_list += d[0] + ' - ' + d[1] + '\n'
diff --git a/selling/doctype/sms_center/sms_center.txt b/selling/doctype/sms_center/sms_center.txt
index bed9cf4..364704c 100644
--- a/selling/doctype/sms_center/sms_center.txt
+++ b/selling/doctype/sms_center/sms_center.txt
@@ -112,7 +112,7 @@
   "width": "50%"
  }, 
  {
-  "description": "Message greater than 160 character will be splitted into multiple mesage", 
+  "description": "Messages greater than 160 characters will be split into multiple messages", 
   "doctype": "DocField", 
   "fieldname": "message", 
   "fieldtype": "Text", 
@@ -129,4 +129,4 @@
  {
   "doctype": "DocPerm"
  }
-]
\ No newline at end of file
+]
diff --git a/selling/page/sales_analytics/sales_analytics.js b/selling/page/sales_analytics/sales_analytics.js
index 0159ae0..2742e15 100644
--- a/selling/page/sales_analytics/sales_analytics.js
+++ b/selling/page/sales_analytics/sales_analytics.js
@@ -1,23 +1,23 @@
-// Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+// Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 // License: GNU General Public License v3. See license.txt
 
 wn.pages['sales-analytics'].onload = function(wrapper) { 
 	wn.ui.make_app_page({
 		parent: wrapper,
-		title: 'Sales Analytics',
+		title: wn._('Sales Analytics'),
 		single_column: true
 	});
 	new erpnext.SalesAnalytics(wrapper);
 	
-	wrapper.appframe.add_home_breadcrumb()
+
 	wrapper.appframe.add_module_icon("Selling")
-	wrapper.appframe.add_breadcrumb("icon-bar-chart")
+	
 }
 
 erpnext.SalesAnalytics = wn.views.TreeGridReport.extend({
 	init: function(wrapper) {
 		this._super({
-			title: "Sales Analytics",
+			title: wn._("Sales Analytics"),
 			page: wrapper,
 			parent: $(wrapper).find('.layout-main'),
 			appframe: wrapper.appframe,
@@ -30,14 +30,14 @@
 		
 		this.tree_grids = {
 			"Customer Group": {
-				label: "Customer Group / Customer",
+				label: wn._("Customer Group / Customer"),
 				show: true, 
 				item_key: "customer",
 				parent_field: "parent_customer_group", 
 				formatter: function(item) { return item.name; }
 			},
 			"Customer": {
-				label: "Customer",
+				label: wn._("Customer"),
 				show: false, 
 				item_key: "customer",
 				formatter: function(item) {
@@ -45,7 +45,7 @@
 				}
 			},	
 			"Item Group": {
-				label: "Item",
+				label: wn._("Item"),
 				show: true, 
 				parent_field: "parent_item_group", 
 				item_key: "item_code",
@@ -54,7 +54,7 @@
 				}
 			},	
 			"Item": {
-				label: "Item",
+				label: wn._("Item"),
 				show: false, 
 				item_key: "item_code",
 				formatter: function(item) {
@@ -62,7 +62,7 @@
 				}
 			},	
 			"Territory": {
-				label: "Territory / Customer",
+				label: wn._("Territory / Customer"),
 				show: true, 
 				item_key: "customer",
 				parent_field: "parent_territory", 
@@ -88,23 +88,23 @@
 		this.columns = std_columns.concat(this.columns);
 	},
 	filters: [
-		{fieldtype:"Select", label: "Tree Type", options:["Customer Group", "Customer", 
+		{fieldtype:"Select", fieldname: "tree_type", label: wn._("Tree Type"), options:["Customer Group", "Customer", 
 			"Item Group", "Item", "Territory"],
 			filter: function(val, item, opts, me) {
 				return me.apply_zero_filter(val, item, opts, me);
 			}},
-		{fieldtype:"Select", label: "Based On", options:["Sales Invoice", 
+		{fieldtype:"Select", fieldname: "based_on", label: wn._("Based On"), options:["Sales Invoice", 
 			"Sales Order", "Delivery Note"]},
-		{fieldtype:"Select", label: "Value or Qty", options:["Value", "Quantity"]},
-		{fieldtype:"Select", label: "Company", link:"Company", 
+		{fieldtype:"Select", fieldname: "value_or_qty", label:  wn._("Value or Qty"), options:["Value", "Quantity"]},
+		{fieldtype:"Select", fieldname: "company", label: wn._("Company"), link:"Company", 
 			default_value: "Select Company..."},
-		{fieldtype:"Date", label: "From Date"},
-		{fieldtype:"Label", label: "To"},
-		{fieldtype:"Date", label: "To Date"},
-		{fieldtype:"Select", label: "Range", 
+		{fieldtype:"Date", fieldname: "from_date", label: wn._("From Date")},
+		{fieldtype:"Label", fieldname: "to", label: wn._("To")},
+		{fieldtype:"Date", fieldname: "to_date", label: wn._("To Date")},
+		{fieldtype:"Select", fieldname: "range", label: wn._("Range"), 
 			options:["Daily", "Weekly", "Monthly", "Quarterly", "Yearly"]},
-		{fieldtype:"Button", label: "Refresh", icon:"icon-refresh icon-white", cssClass:"btn-info"},
-		{fieldtype:"Button", label: "Reset Filters"}
+		{fieldtype:"Button", fieldname: "refresh", label: wn._("Refresh"), icon:"icon-refresh"},
+		{fieldtype:"Button", fieldname: "reset_filters", label: wn._("Reset Filters"), icon:"icon-filter"}
 	],
 	setup_filters: function() {
 		var me = this;
@@ -247,4 +247,4 @@
 		return [[dateutil.str_to_obj(col.id).getTime(), item[col.field]], 
 			[dateutil.user_to_obj(col.name).getTime(), item[col.field]]];
 	}
-});
\ No newline at end of file
+});
diff --git a/selling/page/sales_browser/sales_browser.js b/selling/page/sales_browser/sales_browser.js
index 53df188..58a3b1f 100644
--- a/selling/page/sales_browser/sales_browser.js
+++ b/selling/page/sales_browser/sales_browser.js
@@ -1,4 +1,4 @@
-// Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+// Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 // License: GNU General Public License v3. See license.txt
 
 pscript['onload_Sales Browser'] = function(wrapper){
@@ -8,15 +8,16 @@
 	
 	wrapper.appframe.add_module_icon("Selling")
 	
-	wrapper.appframe.add_button('Refresh', function() {  
+	wrapper.appframe.set_title_right('Refresh', function() {  
 			wrapper.make_tree();
-		}, 'icon-refresh');
+		});
 
 
 	$(wrapper)
 		.find(".layout-side-section")
-		.html('<div class="text-muted">Click on a link to get options to expand \
-		 	get options Add / Edit / Delete.</div>')
+		.html('<div class="text-muted">'+ 
+			wn._('Click on a link to get options to expand get options ') + 
+			wn._('Add') + ' / ' + wn._('Edit') + ' / '+ wn._('Delete') + '.</div>')
 
 	wrapper.make_tree = function() {
 		var ctype = wn.get_route()[1] || 'Territory';
@@ -87,22 +88,22 @@
 		var node_links = [];
 		
 		if (wn.model.can_read(this.ctype)) {
-			node_links.push('<a onclick="erpnext.sales_chart.open();">Edit</a>');
+			node_links.push('<a onclick="erpnext.sales_chart.open();">'+wn._('Edit')+'</a>');
 		}
 
 		if(data.expandable) {
 			if (wn.boot.profile.can_create.indexOf(this.ctype) !== -1 ||
 					wn.boot.profile.in_create.indexOf(this.ctype) !== -1) {
-				node_links.push('<a onclick="erpnext.sales_chart.new_node();">Add Child</a>');
+				node_links.push('<a onclick="erpnext.sales_chart.new_node();">' + wn._('Add Child') + '</a>');
 			}
 		}
 
 		if (wn.model.can_write(this.ctype)) {
-			node_links.push('<a onclick="erpnext.sales_chart.rename()">Rename</a>');
+			node_links.push('<a onclick="erpnext.sales_chart.rename()">' + wn._('Rename') + '</a>');
 		};
 	
 		if (wn.model.can_delete(this.ctype)) {
-			node_links.push('<a onclick="erpnext.sales_chart.delete()">Delete</a>');
+			node_links.push('<a onclick="erpnext.sales_chart.delete()">' + wn._('Delete') + '</a>');
 		};
 		
 		link.toolbar.append(node_links.join(" | "));
@@ -114,18 +115,18 @@
 			{fieldtype:'Data', fieldname: 'name_field', 
 				label:'New ' + me.ctype + ' Name', reqd:true},
 			{fieldtype:'Select', fieldname:'is_group', label:'Group Node', options:'No\nYes', 
-				description: "Further nodes can be only created under 'Group' type nodes"}, 
+				description: wn._("Further nodes can be only created under 'Group' type nodes")}, 
 			{fieldtype:'Button', fieldname:'create_new', label:'Create New' }
 		]
 		
 		if(me.ctype == "Sales Person") {
 			fields.splice(-1, 0, {fieldtype:'Link', fieldname:'employee', label:'Employee',
-				options:'Employee', description: "Please enter Employee Id of this sales parson"});
+				options:'Employee', description: wn._("Please enter Employee Id of this sales parson")});
 		}
 		
 		// the dialog
 		var d = new wn.ui.Dialog({
-			title:'New ' + me.ctype,
+			title: wn._('New ') + wn._(me.ctype),
 			fields: fields
 		})		
 	
diff --git a/selling/page/sales_browser/sales_browser.py b/selling/page/sales_browser/sales_browser.py
index 6ee80fe..6791ecf 100644
--- a/selling/page/sales_browser/sales_browser.py
+++ b/selling/page/sales_browser/sales_browser.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 # License: GNU General Public License v3. See license.txt
 
 from __future__ import unicode_literals
diff --git a/patches/november_2013/__init__.py b/selling/page/sales_funnel/__init__.py
similarity index 100%
copy from patches/november_2013/__init__.py
copy to selling/page/sales_funnel/__init__.py
diff --git a/selling/page/sales_funnel/sales_funnel.css b/selling/page/sales_funnel/sales_funnel.css
new file mode 100644
index 0000000..89e904f
--- /dev/null
+++ b/selling/page/sales_funnel/sales_funnel.css
@@ -0,0 +1,3 @@
+.funnel-wrapper {
+	margin: 15px;
+}
\ No newline at end of file
diff --git a/selling/page/sales_funnel/sales_funnel.js b/selling/page/sales_funnel/sales_funnel.js
new file mode 100644
index 0000000..18cd6cc
--- /dev/null
+++ b/selling/page/sales_funnel/sales_funnel.js
@@ -0,0 +1,189 @@
+// Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
+// License: GNU General Public License v3. See license.txt
+
+wn.pages['sales-funnel'].onload = function(wrapper) { 
+	wn.ui.make_app_page({
+		parent: wrapper,
+		title: 'Sales Funnel',
+		single_column: true
+	});
+	
+	wrapper.sales_funnel = new erpnext.SalesFunnel(wrapper);
+	
+	wrapper.appframe.add_module_icon("Selling", "sales-funnel", function() {
+		wn.set_route("selling-home");
+	});
+}
+
+erpnext.SalesFunnel = Class.extend({
+	init: function(wrapper) {
+		var me = this;
+		// 0 setTimeout hack - this gives time for canvas to get width and height
+		setTimeout(function() { 
+			me.setup(wrapper);
+			me.get_data();
+		}, 0);
+	},
+	
+	setup: function(wrapper) {
+		var me = this;
+		
+		this.elements = { 
+			layout: $(wrapper).find(".layout-main"),
+			from_date: wrapper.appframe.add_date("From Date"),
+			to_date: wrapper.appframe.add_date("To Date"),
+			refresh_btn: wrapper.appframe.set_title_right("Refresh", 
+				function() { me.get_data(); }, "icon-refresh"),
+		};
+		
+		this.elements.no_data = $('<div class="alert alert-warning">No Data</div>')
+			.toggle(false)
+			.appendTo(this.elements.layout);
+		
+		this.elements.funnel_wrapper = $('<div class="funnel-wrapper text-center"></div>')
+			.appendTo(this.elements.layout);
+		
+		this.options = {
+			from_date: wn.datetime.add_months(wn.datetime.get_today(), -1),
+			to_date: wn.datetime.get_today()
+		};
+		
+		// set defaults and bind on change
+		$.each(this.options, function(k, v) { 
+			me.elements[k].val(wn.datetime.str_to_user(v)); 
+			me.elements[k].on("change", function() {
+				me.options[k] = wn.datetime.user_to_str($(this).val());
+				me.get_data();
+			});
+		});
+		
+		// bind refresh
+		this.elements.refresh_btn.on("click", function() {
+			me.get_data(this);
+		});
+		
+		// bind resize
+		$(window).resize(function() {
+			me.render();
+		});
+	},
+	
+	get_data: function(btn) {
+		var me = this;
+		wn.call({
+			module: "selling",
+			page: "sales_funnel",
+			method: "get_funnel_data",
+			args: {
+				from_date: this.options.from_date,
+				to_date: this.options.to_date
+			},
+			btn: btn,
+			callback: function(r) {
+				if(!r.exc) {
+					me.options.data = r.message;
+					me.render();
+				}
+			}
+		});
+	},
+	
+	render: function() {
+		var me = this;
+		this.prepare();
+		
+		var context = this.elements.context,
+			x_start = 0.0,
+			x_end = this.options.width,
+			x_mid = (x_end - x_start) / 2.0,
+			y = 0,
+			y_old = 0.0;
+		
+		if(this.options.total_value === 0) {
+			this.elements.no_data.toggle(true);
+			return;
+		}
+		
+		this.options.data.forEach(function(d) {
+			context.fillStyle = d.color;
+			context.strokeStyle = d.color;
+			me.draw_triangle(x_start, x_mid, x_end, y, me.options.height);
+			
+			y_old = y;
+
+			// new y
+			y = y + d.height;
+			
+			// new x
+			var half_side = (me.options.height - y) / Math.sqrt(3);
+			x_start = x_mid - half_side;
+			x_end = x_mid + half_side;
+			
+			var y_mid = y_old + (y - y_old) / 2.0;
+			
+			me.draw_legend(x_mid, y_mid, me.options.width, me.options.height, d.value + " - " + d.title);
+		});
+	},
+	
+	prepare: function() {
+		var me = this;
+		
+		this.elements.no_data.toggle(false);
+		
+		// calculate width and height options
+		this.options.width = $(this.elements.funnel_wrapper).width() * 2.0 / 3.0;
+		this.options.height = (Math.sqrt(3) * this.options.width) / 2.0;
+		
+		// calculate total weightage
+		// as height decreases, area decreases by the square of the reduction
+		// hence, compensating by squaring the index value
+		this.options.total_weightage = this.options.data.reduce(
+			function(prev, curr, i) { return prev + Math.pow(i+1, 2) * curr.value; }, 0.0);
+		
+		// calculate height for each data
+		$.each(this.options.data, function(i, d) {
+			d.height = me.options.height * d.value * Math.pow(i+1, 2) / me.options.total_weightage;
+		});
+		
+		this.elements.canvas = $('<canvas></canvas>')
+			.appendTo(this.elements.funnel_wrapper.empty())
+			.attr("width", $(this.elements.funnel_wrapper).width())
+			.attr("height", this.options.height);
+		
+		this.elements.context = this.elements.canvas.get(0).getContext("2d");
+	},
+	
+	draw_triangle: function(x_start, x_mid, x_end, y, height) {
+		var context = this.elements.context;
+		context.beginPath();
+		context.moveTo(x_start, y);
+		context.lineTo(x_end, y);
+		context.lineTo(x_mid, height);
+		context.lineTo(x_start, y);
+		context.closePath();
+		context.fill();
+	},
+	
+	draw_legend: function(x_mid, y_mid, width, height, title) {
+		var context = this.elements.context;
+		
+		// draw line
+		context.beginPath();
+		context.moveTo(x_mid, y_mid);
+		context.lineTo(width, y_mid);
+		context.closePath();
+		context.stroke();
+		
+		// draw circle
+		context.beginPath();
+		context.arc(width, y_mid, 5, 0, Math.PI * 2, false);
+		context.closePath();
+		context.fill();
+		
+		// draw text
+		context.fillStyle = "black";
+		context.textBaseline = "middle";
+		context.font = "1.1em sans-serif";
+		context.fillText(title, width + 20, y_mid);
+	}
+});
\ No newline at end of file
diff --git a/selling/page/sales_funnel/sales_funnel.py b/selling/page/sales_funnel/sales_funnel.py
new file mode 100644
index 0000000..433eaf1
--- /dev/null
+++ b/selling/page/sales_funnel/sales_funnel.py
@@ -0,0 +1,33 @@
+# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
+# License: GNU General Public License v3. See license.txt
+
+from __future__ import unicode_literals
+import webnotes
+
+@webnotes.whitelist()
+def get_funnel_data(from_date, to_date):
+	active_leads = webnotes.conn.sql("""select count(*) from `tabLead`
+		where (date(`modified`) between %s and %s)
+		and status != "Do Not Contact" """, (from_date, to_date))[0][0]
+		
+	active_leads += webnotes.conn.sql("""select count(distinct customer) from `tabContact`
+		where (date(`modified`) between %s and %s)
+		and status != "Passive" """, (from_date, to_date))[0][0]
+	
+	opportunities = webnotes.conn.sql("""select count(*) from `tabOpportunity`
+		where docstatus = 1 and (date(`creation`) between %s and %s)
+		and status != "Lost" """, (from_date, to_date))[0][0]
+	
+	quotations = webnotes.conn.sql("""select count(*) from `tabQuotation`
+		where docstatus = 1 and (date(`creation`) between %s and %s)
+		and status != "Lost" """, (from_date, to_date))[0][0]
+	
+	sales_orders = webnotes.conn.sql("""select count(*) from `tabQuotation`
+		where docstatus = 1 and (date(`creation`) between %s and %s)""", (from_date, to_date))[0][0]
+	
+	return [
+		{ "title": "Active Leads / Customers", "value": active_leads, "color": "#B03B46" },
+		{ "title": "Opportunities", "value": opportunities, "color": "#F09C00" },
+		{ "title": "Quotations", "value": quotations, "color": "#006685" },
+		{ "title": "Sales Orders", "value": sales_orders, "color": "#00AD65" }
+	]
diff --git a/selling/page/sales_funnel/sales_funnel.txt b/selling/page/sales_funnel/sales_funnel.txt
new file mode 100644
index 0000000..b841f20
--- /dev/null
+++ b/selling/page/sales_funnel/sales_funnel.txt
@@ -0,0 +1,33 @@
+[
+ {
+  "creation": "2013-10-04 13:17:18", 
+  "docstatus": 0, 
+  "modified": "2013-10-04 13:17:18", 
+  "modified_by": "Administrator", 
+  "owner": "Administrator"
+ }, 
+ {
+  "doctype": "Page", 
+  "icon": "icon-filter", 
+  "module": "Selling", 
+  "name": "__common__", 
+  "page_name": "sales-funnel", 
+  "standard": "Yes", 
+  "title": "Sales Funnel"
+ }, 
+ {
+  "doctype": "Page Role", 
+  "name": "__common__", 
+  "parent": "sales-funnel", 
+  "parentfield": "roles", 
+  "parenttype": "Page", 
+  "role": "Sales Manager"
+ }, 
+ {
+  "doctype": "Page", 
+  "name": "sales-funnel"
+ }, 
+ {
+  "doctype": "Page Role"
+ }
+]
\ No newline at end of file
diff --git a/selling/page/selling_home/selling_home.js b/selling/page/selling_home/selling_home.js
index 4981ee7..d645403 100644
--- a/selling/page/selling_home/selling_home.js
+++ b/selling/page/selling_home/selling_home.js
@@ -1,4 +1,4 @@
-// Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+// Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 // License: GNU General Public License v3. See license.txt"
 
 wn.module_page["Selling"] = [
@@ -63,7 +63,7 @@
 				"label": wn._("Selling Settings"),
 				"route": "Form/Selling Settings",
 				"doctype":"Selling Settings",
-				"description": "Settings for Selling Module"
+				"description": wn._("Settings for Selling Module")
 			},
 			{
 				"route":"Form/Shopping Cart Settings",
@@ -160,6 +160,10 @@
 				"label":wn._("Sales Analytics"),
 				page: "sales-analytics"
 			},
+			{
+				"label":wn._("Sales Funnel"),
+				page: "sales-funnel"
+			},
 		]
 	},
 	{
diff --git a/selling/report/available_stock_for_packing_items/available_stock_for_packing_items.py b/selling/report/available_stock_for_packing_items/available_stock_for_packing_items.py
index ec09c18..8b0bc23 100644
--- a/selling/report/available_stock_for_packing_items/available_stock_for_packing_items.py
+++ b/selling/report/available_stock_for_packing_items/available_stock_for_packing_items.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 # License: GNU General Public License v3. See license.txt
 
 from __future__ import unicode_literals
diff --git a/selling/report/customers_not_buying_since_long_time/customers_not_buying_since_long_time.js b/selling/report/customers_not_buying_since_long_time/customers_not_buying_since_long_time.js
index d527b34..b9f6633 100644
--- a/selling/report/customers_not_buying_since_long_time/customers_not_buying_since_long_time.js
+++ b/selling/report/customers_not_buying_since_long_time/customers_not_buying_since_long_time.js
@@ -1,11 +1,11 @@
-// Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+// Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 // License: GNU General Public License v3. See license.txt
 
 wn.query_reports["Customers Not Buying Since Long Time"] = {
 	"filters": [
 		{
 			"fieldname":"days_since_last_order",
-			"label": "Days Since Last Order",
+			"label": wn._("Days Since Last Order"),
 			"fieldtype": "Int",
 			"default": 60
 		}
diff --git a/selling/report/customers_not_buying_since_long_time/customers_not_buying_since_long_time.py b/selling/report/customers_not_buying_since_long_time/customers_not_buying_since_long_time.py
index fbe1bb8..608ae5f 100644
--- a/selling/report/customers_not_buying_since_long_time/customers_not_buying_since_long_time.py
+++ b/selling/report/customers_not_buying_since_long_time/customers_not_buying_since_long_time.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 # License: GNU General Public License v3. See license.txt
 
 from __future__ import unicode_literals
diff --git a/selling/report/quotation_trends/quotation_trends.js b/selling/report/quotation_trends/quotation_trends.js
index df8bd49..f26e873 100644
--- a/selling/report/quotation_trends/quotation_trends.js
+++ b/selling/report/quotation_trends/quotation_trends.js
@@ -1,4 +1,4 @@
-// Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+// Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 // License: GNU General Public License v3. See license.txt
 
 wn.require("app/js/sales_trends_filters.js");
diff --git a/selling/report/quotation_trends/quotation_trends.py b/selling/report/quotation_trends/quotation_trends.py
index 6eae949..f7c023f 100644
--- a/selling/report/quotation_trends/quotation_trends.py
+++ b/selling/report/quotation_trends/quotation_trends.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 # License: GNU General Public License v3. See license.txt
 
 from __future__ import unicode_literals
diff --git a/selling/report/sales_order_trends/sales_order_trends.js b/selling/report/sales_order_trends/sales_order_trends.js
index 8cab413..6268400 100644
--- a/selling/report/sales_order_trends/sales_order_trends.js
+++ b/selling/report/sales_order_trends/sales_order_trends.js
@@ -1,4 +1,4 @@
-// Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+// Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 // License: GNU General Public License v3. See license.txt
 
 wn.require("app/js/sales_trends_filters.js");
diff --git a/selling/report/sales_order_trends/sales_order_trends.py b/selling/report/sales_order_trends/sales_order_trends.py
index 7e42a71..d407be0 100644
--- a/selling/report/sales_order_trends/sales_order_trends.py
+++ b/selling/report/sales_order_trends/sales_order_trends.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 # License: GNU General Public License v3. See license.txt
 
 from __future__ import unicode_literals
diff --git a/selling/report/sales_person_target_variance_item_group_wise/sales_person_target_variance_item_group_wise.js b/selling/report/sales_person_target_variance_item_group_wise/sales_person_target_variance_item_group_wise.js
index 5f2b89c..9836dd3 100644
--- a/selling/report/sales_person_target_variance_item_group_wise/sales_person_target_variance_item_group_wise.js
+++ b/selling/report/sales_person_target_variance_item_group_wise/sales_person_target_variance_item_group_wise.js
@@ -1,25 +1,25 @@
-// Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+// Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 // License: GNU General Public License v3. See license.txt
 
 wn.query_reports["Sales Person Target Variance Item Group-Wise"] = {
 	"filters": [
 		{
 			fieldname: "fiscal_year",
-			label: "Fiscal Year",
+			label: wn._("Fiscal Year"),
 			fieldtype: "Link",
 			options: "Fiscal Year",
 			default: sys_defaults.fiscal_year
 		},
 		{
 			fieldname: "period",
-			label: "Period",
+			label: wn._("Period"),
 			fieldtype: "Select",
 			options: "Monthly\nQuarterly\nHalf-Yearly\nYearly",
 			default: "Monthly"
 		},
 		{
 			fieldname: "target_on",
-			label: "Target On",
+			label: wn._("Target On"),
 			fieldtype: "Select",
 			options: "Quantity\nAmount",
 			default: "Quantity"
diff --git a/selling/report/sales_person_target_variance_item_group_wise/sales_person_target_variance_item_group_wise.py b/selling/report/sales_person_target_variance_item_group_wise/sales_person_target_variance_item_group_wise.py
index 8a4b953..ca18936 100644
--- a/selling/report/sales_person_target_variance_item_group_wise/sales_person_target_variance_item_group_wise.py
+++ b/selling/report/sales_person_target_variance_item_group_wise/sales_person_target_variance_item_group_wise.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 # License: GNU General Public License v3. See license.txt
 
 from __future__ import unicode_literals
diff --git a/selling/report/sales_person_wise_transaction_summary/sales_person_wise_transaction_summary.js b/selling/report/sales_person_wise_transaction_summary/sales_person_wise_transaction_summary.js
index 6ddb5f9..88bbd6d 100644
--- a/selling/report/sales_person_wise_transaction_summary/sales_person_wise_transaction_summary.js
+++ b/selling/report/sales_person_wise_transaction_summary/sales_person_wise_transaction_summary.js
@@ -1,61 +1,61 @@
-// Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+// Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 // License: GNU General Public License v3. See license.txt
 
 wn.query_reports["Sales Person-wise Transaction Summary"] = {
 	"filters": [
 		{
 			fieldname: "sales_person",
-			label: "Sales Person",
+			label: wn._("Sales Person"),
 			fieldtype: "Link",
 			options: "Sales Person"
 		},
 		{
 			fieldname: "doc_type",
-			label: "Document Type",
+			label: wn._("Document Type"),
 			fieldtype: "Select",
 			options: "Sales Order\nDelivery Note\nSales Invoice",
 			default: "Sales Order"
 		},
 		{
 			fieldname: "from_date",
-			label: "From Date",
+			label: wn._("From Date"),
 			fieldtype: "Date",
 			default: wn.defaults.get_user_default("year_start_date"),
 		},
 		{
 			fieldname:"to_date",
-			label: "To Date",
+			label: wn._("To Date"),
 			fieldtype: "Date",
 			default: get_today()
 		},
 		{
 			fieldname:"company",
-			label: "Company",
+			label: wn._("Company"),
 			fieldtype: "Link",
 			options: "Company",
 			default: wn.defaults.get_default("company")
 		},
 		{
 			fieldname:"item_group",
-			label: "Item Group",
+			label: wn._("Item Group"),
 			fieldtype: "Link",
 			options: "Item Group",
 		},
 		{
 			fieldname:"brand",
-			label: "Brand",
+			label: wn._("Brand"),
 			fieldtype: "Link",
 			options: "Brand",
 		},
 		{
 			fieldname:"customer",
-			label: "Customer",
+			label: wn._("Customer"),
 			fieldtype: "Link",
 			options: "Customer",
 		},
 		{
 			fieldname:"territory",
-			label: "Territory",
+			label: wn._("Territory"),
 			fieldtype: "Link",
 			options: "Territory",
 		},
diff --git a/selling/report/sales_person_wise_transaction_summary/sales_person_wise_transaction_summary.py b/selling/report/sales_person_wise_transaction_summary/sales_person_wise_transaction_summary.py
index 45e893e..2c45e21 100644
--- a/selling/report/sales_person_wise_transaction_summary/sales_person_wise_transaction_summary.py
+++ b/selling/report/sales_person_wise_transaction_summary/sales_person_wise_transaction_summary.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 # License: GNU General Public License v3. See license.txt
 
 from __future__ import unicode_literals
diff --git a/selling/report/territory_target_variance_item_group_wise/territory_target_variance_item_group_wise.js b/selling/report/territory_target_variance_item_group_wise/territory_target_variance_item_group_wise.js
index 882cdb6..621f41d 100644
--- a/selling/report/territory_target_variance_item_group_wise/territory_target_variance_item_group_wise.js
+++ b/selling/report/territory_target_variance_item_group_wise/territory_target_variance_item_group_wise.js
@@ -1,25 +1,25 @@
-// Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+// Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 // License: GNU General Public License v3. See license.txt
 
 wn.query_reports["Territory Target Variance Item Group-Wise"] = {
 	"filters": [
 		{
 			fieldname: "fiscal_year",
-			label: "Fiscal Year",
+			label: wn._("Fiscal Year"),
 			fieldtype: "Link",
 			options: "Fiscal Year",
 			default: sys_defaults.fiscal_year
 		},
 		{
 			fieldname: "period",
-			label: "Period",
+			label: wn._("Period"),
 			fieldtype: "Select",
 			options: "Monthly\nQuarterly\nHalf-Yearly\nYearly",
 			default: "Monthly"
 		},
 		{
 			fieldname: "target_on",
-			label: "Target On",
+			label: wn._("Target On"),
 			fieldtype: "Select",
 			options: "Quantity\nAmount",
 			default: "Quantity"
diff --git a/selling/report/territory_target_variance_item_group_wise/territory_target_variance_item_group_wise.py b/selling/report/territory_target_variance_item_group_wise/territory_target_variance_item_group_wise.py
index f3b480c..08240a7 100644
--- a/selling/report/territory_target_variance_item_group_wise/territory_target_variance_item_group_wise.py
+++ b/selling/report/territory_target_variance_item_group_wise/territory_target_variance_item_group_wise.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 # License: GNU General Public License v3. See license.txt
 
 from __future__ import unicode_literals
diff --git a/selling/doctype/sales_common/sales_common.js b/selling/sales_common.js
similarity index 94%
rename from selling/doctype/sales_common/sales_common.js
rename to selling/sales_common.js
index 8203af8..ee55dfa 100644
--- a/selling/doctype/sales_common/sales_common.js
+++ b/selling/sales_common.js
@@ -1,4 +1,4 @@
-// Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+// Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 // License: GNU General Public License v3. See license.txt
 
 // Preset
@@ -10,6 +10,7 @@
 
 wn.provide("erpnext.selling");
 wn.require("app/js/transaction.js");
+wn.require("app/js/controllers/accounts.js");
 
 erpnext.selling.SellingController = erpnext.TransactionController.extend({
 	onload: function() {
@@ -70,25 +71,17 @@
 			this.frm.set_query("batch_no", this.fname, function(doc, cdt, cdn) {
 				var item = wn.model.get_doc(cdt, cdn);
 				if(!item.item_code) {
-					wn.throw("Please enter Item Code to get batch no");
+					wn.throw(wn._("Please enter Item Code to get batch no"));
 				} else {
-					if(item.warehouse) {
-						return {
-							query : "selling.doctype.sales_common.sales_common.get_batch_no",
-							filters: {
-								'item_code': item.item_code,
-								'warehouse': item.warehouse,
-								'posting_date': me.frm.doc.posting_date
-							}
-						}
-					} else {
-						return{
-							query : "selling.doctype.sales_common.sales_common.get_batch_no",
-							filters: {
-								'item_code': item.item_code,
-								'posting_date': me.frm.doc.posting_date
-							}
-						}
+					filters = {
+						'item_code': item.item_code,
+						'posting_date': me.frm.doc.posting_date,
+					}
+					if(item.warehouse) filters["warehouse"] = item.warehouse
+					
+					return {
+						query : "controllers.queries.get_batch_no",
+						filters: filters
 					}
 				}
 			});
@@ -531,12 +524,12 @@
 		setup_field_label_map(["net_total_export", "other_charges_total_export", "grand_total_export", 
 			"rounded_total_export", "in_words_export"], this.frm.doc.currency);
 		
-		setup_field_label_map(["conversion_rate"], 	"1 " + this.frm.doc.currency 
-			+ " = [?] " + company_currency);
+		cur_frm.set_df_property("conversion_rate", "description", "1 " + this.frm.doc.currency 
+			+ " = [?] " + company_currency)
 		
 		if(this.frm.doc.price_list_currency && this.frm.doc.price_list_currency!=company_currency) {
-			setup_field_label_map(["plc_conversion_rate"], 	"1 " + this.frm.doc.price_list_currency 
-				+ " = [?] " + company_currency);
+			cur_frm.set_df_property("plc_conversion_rate", "description", "1 " + this.frm.doc.price_list_currency 
+				+ " = [?] " + company_currency)
 		}
 		
 		// toggle fields
@@ -544,7 +537,7 @@
 			"grand_total", "rounded_total", "in_words"],
 			this.frm.doc.currency != company_currency);
 			
-		this.frm.toggle_display(["plc_conversion_rate"], 
+		this.frm.toggle_display(["plc_conversion_rate", "price_list_currency"], 
 			this.frm.doc.price_list_currency != company_currency);
 		
 		// set labels
@@ -628,16 +621,16 @@
 // Help for Sales BOM items
 var set_sales_bom_help = function(doc) {
 	if(!cur_frm.fields_dict.packing_list) return;
-	if (getchildren('Delivery Note Packing Item', doc.name, 'packing_details').length) {
+	if (getchildren('Packed Item', doc.name, 'packing_details').length) {
 		$(cur_frm.fields_dict.packing_list.row.wrapper).toggle(true);
 		
 		if (inList(['Delivery Note', 'Sales Invoice'], doc.doctype)) {
-			help_msg = "<div class='alert alert-warning'> \
-				For 'Sales BOM' items, warehouse, serial no and batch no \
+			help_msg = "<div class='alert alert-warning'>" +
+				wn._("For 'Sales BOM' items, warehouse, serial no and batch no \
 				will be considered from the 'Packing List' table. \
 				If warehouse and batch no are same for all packing items for any 'Sales BOM' item, \
-				those values can be entered in the main item table, values will be copied to 'Packing List' table. \
-			</div>";
+				those values can be entered in the main item table, values will be copied to 'Packing List' table.")+
+			"</div>";
 			wn.meta.get_docfield(doc.doctype, 'sales_bom_help', doc.name).options = help_msg;
 		} 
 	} else {
diff --git a/selling/utils/__init__.py b/selling/utils/__init__.py
index fd9c492..5974da7 100644
--- a/selling/utils/__init__.py
+++ b/selling/utils/__init__.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 # License: GNU General Public License v3. See license.txt
 
 from __future__ import unicode_literals
diff --git a/selling/utils/cart.py b/selling/utils/cart.py
index 7e7fb2e..c4c0b72 100644
--- a/selling/utils/cart.py
+++ b/selling/utils/cart.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 # License: GNU General Public License v3. See license.txt
 
 from __future__ import unicode_literals
@@ -12,8 +12,8 @@
 def set_cart_count(quotation=None):
 	if not quotation:
 		quotation = _get_cart_quotation()
-	webnotes.add_cookies["cart_count"] = cstr(len(quotation.doclist.get(
-		{"parentfield": "quotation_details"})) or "")
+	cart_count = cstr(len(quotation.doclist.get({"parentfield": "quotation_details"})))
+	webnotes._response.set_cookie("cart_count", cart_count)
 
 @webnotes.whitelist()
 def get_cart_quotation(doclist=None):
@@ -47,7 +47,7 @@
 	sales_order.ignore_permissions = True
 	sales_order.insert()
 	sales_order.submit()
-	webnotes.add_cookies["cart_count"] = ""
+	webnotes._response.set_cookie("cart_count", "")
 	
 	return sales_order.doc.name
 
diff --git a/selling/utils/product.py b/selling/utils/product.py
index df5f16d..d218979 100644
--- a/selling/utils/product.py
+++ b/selling/utils/product.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 # License: GNU General Public License v3. See license.txt
 
 from __future__ import unicode_literals
diff --git a/setup/doctype/applicable_territory/applicable_territory.py b/setup/doctype/applicable_territory/applicable_territory.py
index 3256c80..eaa0f46 100644
--- a/setup/doctype/applicable_territory/applicable_territory.py
+++ b/setup/doctype/applicable_territory/applicable_territory.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 # MIT License. See license.txt
 
 # For license information, please see license.txt
diff --git a/setup/doctype/applicable_territory/applicable_territory.txt b/setup/doctype/applicable_territory/applicable_territory.txt
index 31064de..10d84d1 100644
--- a/setup/doctype/applicable_territory/applicable_territory.txt
+++ b/setup/doctype/applicable_territory/applicable_territory.txt
@@ -2,7 +2,7 @@
  {
   "creation": "2013-06-20 12:48:38", 
   "docstatus": 0, 
-  "modified": "2013-10-31 18:56:54", 
+  "modified": "2013-11-02 16:58:57", 
   "modified_by": "Administrator", 
   "owner": "Administrator"
  }, 
@@ -13,6 +13,7 @@
   "name": "__common__"
  }, 
  {
+  "description": "<a href=\"#Sales Browser/Territory\">Add / Edit</a>", 
   "doctype": "DocField", 
   "fieldname": "territory", 
   "fieldtype": "Link", 
diff --git a/setup/doctype/authorization_control/authorization_control.py b/setup/doctype/authorization_control/authorization_control.py
index ddf0791..8c8900a 100644
--- a/setup/doctype/authorization_control/authorization_control.py
+++ b/setup/doctype/authorization_control/authorization_control.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 # License: GNU General Public License v3. See license.txt
 
 from __future__ import unicode_literals
@@ -9,7 +9,6 @@
 from webnotes import session, msgprint
 from setup.utils import get_company_currency
 
-sql = webnotes.conn.sql
 	
 from utilities.transaction_base import TransactionBase
 
@@ -28,10 +27,10 @@
 				amt_list.append(flt(x[0]))
 			max_amount = max(amt_list)
 			
-			app_dtl = sql("select approving_user, approving_role from `tabAuthorization Rule` where transaction = %s and (value = %s or value > %s) and docstatus != 2 and based_on = %s and company = %s %s" % ('%s', '%s', '%s', '%s', '%s', condition), (doctype_name, flt(max_amount), total, based_on, company))
+			app_dtl = webnotes.conn.sql("select approving_user, approving_role from `tabAuthorization Rule` where transaction = %s and (value = %s or value > %s) and docstatus != 2 and based_on = %s and company = %s %s" % ('%s', '%s', '%s', '%s', '%s', condition), (doctype_name, flt(max_amount), total, based_on, company))
 			
 			if not app_dtl:
-				app_dtl = sql("select approving_user, approving_role from `tabAuthorization Rule` where transaction = %s and (value = %s or value > %s) and docstatus != 2 and based_on = %s and ifnull(company,'') = '' %s" % ('%s', '%s', '%s', '%s', condition), (doctype_name, flt(max_amount), total, based_on)) 
+				app_dtl = webnotes.conn.sql("select approving_user, approving_role from `tabAuthorization Rule` where transaction = %s and (value = %s or value > %s) and docstatus != 2 and based_on = %s and ifnull(company,'') = '' %s" % ('%s', '%s', '%s', '%s', condition), (doctype_name, flt(max_amount), total, based_on)) 
 			for d in app_dtl:
 				if(d[0]): appr_users.append(d[0])
 				if(d[1]): appr_roles.append(d[1])
@@ -58,18 +57,18 @@
 		add_cond1,add_cond2	= '',''
 		if based_on == 'Itemwise Discount':
 			add_cond1 += " and master_name = '"+cstr(item)+"'"
-			itemwise_exists = sql("select value from `tabAuthorization Rule` where transaction = %s and value <= %s and based_on = %s and company = %s and docstatus != 2 %s %s" % ('%s', '%s', '%s', '%s', cond, add_cond1), (doctype_name, total, based_on, company))
+			itemwise_exists = webnotes.conn.sql("select value from `tabAuthorization Rule` where transaction = %s and value <= %s and based_on = %s and company = %s and docstatus != 2 %s %s" % ('%s', '%s', '%s', '%s', cond, add_cond1), (doctype_name, total, based_on, company))
 			if not itemwise_exists:
-				itemwise_exists = sql("select value from `tabAuthorization Rule` where transaction = %s and value <= %s and based_on = %s and ifnull(company,'') = '' and docstatus != 2 %s %s" % ('%s', '%s', '%s', cond, add_cond1), (doctype_name, total, based_on))
+				itemwise_exists = webnotes.conn.sql("select value from `tabAuthorization Rule` where transaction = %s and value <= %s and based_on = %s and ifnull(company,'') = '' and docstatus != 2 %s %s" % ('%s', '%s', '%s', cond, add_cond1), (doctype_name, total, based_on))
 			if itemwise_exists:
 				self.get_appr_user_role(itemwise_exists, doctype_name, total, based_on, cond+add_cond1, item,company)
 				chk = 0
 		if chk == 1:
 			if based_on == 'Itemwise Discount': add_cond2 += " and ifnull(master_name,'') = ''"
-			appr = sql("select value from `tabAuthorization Rule` where transaction = %s and value <= %s and based_on = %s and company = %s and docstatus != 2 %s %s" % ('%s', '%s', '%s', '%s', cond, add_cond2), (doctype_name, total, based_on, company))
+			appr = webnotes.conn.sql("select value from `tabAuthorization Rule` where transaction = %s and value <= %s and based_on = %s and company = %s and docstatus != 2 %s %s" % ('%s', '%s', '%s', '%s', cond, add_cond2), (doctype_name, total, based_on, company))
 			
 			if not appr:
-				appr = sql("select value from `tabAuthorization Rule` where transaction = %s and value <= %s and based_on = %s and ifnull(company,'') = '' and docstatus != 2 %s %s"% ('%s', '%s', '%s', cond, add_cond2), (doctype_name, total, based_on))
+				appr = webnotes.conn.sql("select value from `tabAuthorization Rule` where transaction = %s and value <= %s and based_on = %s and ifnull(company,'') = '' and docstatus != 2 %s %s"% ('%s', '%s', '%s', cond, add_cond2), (doctype_name, total, based_on))
 			self.get_appr_user_role(appr, doctype_name, total, based_on, cond+add_cond2, item, company)
 			
 			
@@ -112,7 +111,7 @@
 		# ================
 		# Check for authorization set for individual user
 	 
-		based_on = [x[0] for x in sql("select distinct based_on from `tabAuthorization Rule` where transaction = %s and system_user = %s and (company = %s or ifnull(company,'')='') and docstatus != 2", (doctype_name, session['user'], company))]
+		based_on = [x[0] for x in webnotes.conn.sql("select distinct based_on from `tabAuthorization Rule` where transaction = %s and system_user = %s and (company = %s or ifnull(company,'')='') and docstatus != 2", (doctype_name, session['user'], company))]
 
 		for d in based_on:
 			self.bifurcate_based_on_type(doctype_name, total, av_dis, d, doc_obj, 1, company)
@@ -124,7 +123,7 @@
 		# Specific Role
 		# ===============
 		# Check for authorization set on particular roles
-		based_on = [x[0] for x in sql("""select based_on 
+		based_on = [x[0] for x in webnotes.conn.sql("""select based_on 
 			from `tabAuthorization Rule` 
 			where transaction = %s and system_role IN (%s) and based_on IN (%s) 
 			and (company = %s or ifnull(company,'')='') 
@@ -148,9 +147,9 @@
 	# payroll related check
 	def get_value_based_rule(self,doctype_name,employee,total_claimed_amount,company):
 		val_lst =[]
-		val = sql("select value from `tabAuthorization Rule` where transaction=%s and (to_emp=%s or to_designation IN (select designation from `tabEmployee` where name=%s)) and ifnull(value,0)< %s and company = %s and docstatus!=2",(doctype_name,employee,employee,total_claimed_amount,company))
+		val = webnotes.conn.sql("select value from `tabAuthorization Rule` where transaction=%s and (to_emp=%s or to_designation IN (select designation from `tabEmployee` where name=%s)) and ifnull(value,0)< %s and company = %s and docstatus!=2",(doctype_name,employee,employee,total_claimed_amount,company))
 		if not val:
-			val = sql("select value from `tabAuthorization Rule` where transaction=%s and (to_emp=%s or to_designation IN (select designation from `tabEmployee` where name=%s)) and ifnull(value,0)< %s and ifnull(company,'') = '' and docstatus!=2",(doctype_name, employee, employee, total_claimed_amount))
+			val = webnotes.conn.sql("select value from `tabAuthorization Rule` where transaction=%s and (to_emp=%s or to_designation IN (select designation from `tabEmployee` where name=%s)) and ifnull(value,0)< %s and ifnull(company,'') = '' and docstatus!=2",(doctype_name, employee, employee, total_claimed_amount))
 
 		if val:
 			val_lst = [y[0] for y in val]
@@ -158,9 +157,9 @@
 			val_lst.append(0)
 	
 		max_val = max(val_lst)
-		rule = sql("select name, to_emp, to_designation, approving_role, approving_user from `tabAuthorization Rule` where transaction=%s and company = %s and (to_emp=%s or to_designation IN (select designation from `tabEmployee` where name=%s)) and ifnull(value,0)= %s and docstatus!=2",(doctype_name,company,employee,employee,flt(max_val)), as_dict=1)
+		rule = webnotes.conn.sql("select name, to_emp, to_designation, approving_role, approving_user from `tabAuthorization Rule` where transaction=%s and company = %s and (to_emp=%s or to_designation IN (select designation from `tabEmployee` where name=%s)) and ifnull(value,0)= %s and docstatus!=2",(doctype_name,company,employee,employee,flt(max_val)), as_dict=1)
 		if not rule:
-			rule = sql("select name, to_emp, to_designation, approving_role, approving_user from `tabAuthorization Rule` where transaction=%s and ifnull(company,'') = '' and (to_emp=%s or to_designation IN (select designation from `tabEmployee` where name=%s)) and ifnull(value,0)= %s and docstatus!=2",(doctype_name,employee,employee,flt(max_val)), as_dict=1)
+			rule = webnotes.conn.sql("select name, to_emp, to_designation, approving_role, approving_user from `tabAuthorization Rule` where transaction=%s and ifnull(company,'') = '' and (to_emp=%s or to_designation IN (select designation from `tabEmployee` where name=%s)) and ifnull(value,0)= %s and docstatus!=2",(doctype_name,employee,employee,flt(max_val)), as_dict=1)
 
 		return rule
 	
@@ -175,9 +174,9 @@
 			if doctype_name == 'Expense Claim':
 				rule = self.get_value_based_rule(doctype_name,doc_obj.doc.employee,doc_obj.doc.total_claimed_amount, doc_obj.doc.company)
 			elif doctype_name == 'Appraisal':
-				rule = sql("select name, to_emp, to_designation, approving_role, approving_user from `tabAuthorization Rule` where transaction=%s and (to_emp=%s or to_designation IN (select designation from `tabEmployee` where name=%s)) and company = %s and docstatus!=2",(doctype_name,doc_obj.doc.employee, doc_obj.doc.employee, doc_obj.doc.company),as_dict=1)				
+				rule = webnotes.conn.sql("select name, to_emp, to_designation, approving_role, approving_user from `tabAuthorization Rule` where transaction=%s and (to_emp=%s or to_designation IN (select designation from `tabEmployee` where name=%s)) and company = %s and docstatus!=2",(doctype_name,doc_obj.doc.employee, doc_obj.doc.employee, doc_obj.doc.company),as_dict=1)				
 				if not rule:
-					rule = sql("select name, to_emp, to_designation, approving_role, approving_user from `tabAuthorization Rule` where transaction=%s and (to_emp=%s or to_designation IN (select designation from `tabEmployee` where name=%s)) and ifnull(company,'') = '' and docstatus!=2",(doctype_name,doc_obj.doc.employee, doc_obj.doc.employee),as_dict=1)				
+					rule = webnotes.conn.sql("select name, to_emp, to_designation, approving_role, approving_user from `tabAuthorization Rule` where transaction=%s and (to_emp=%s or to_designation IN (select designation from `tabEmployee` where name=%s)) and ifnull(company,'') = '' and docstatus!=2",(doctype_name,doc_obj.doc.employee, doc_obj.doc.employee),as_dict=1)				
 			
 			if rule:
 				for m in rule:
@@ -185,7 +184,7 @@
 						if m['approving_user']:
 							app_specific_user.append(m['approving_user'])
 						elif m['approving_role']:
-							user_lst = [z[0] for z in sql("select distinct t1.name from `tabProfile` t1, `tabUserRole` t2 where t2.role=%s and t2.parent=t1.name and t1.name !='Administrator' and t1.name != 'Guest' and t1.docstatus !=2",m['approving_role'])]
+							user_lst = [z[0] for z in webnotes.conn.sql("select distinct t1.name from `tabProfile` t1, `tabUserRole` t2 where t2.role=%s and t2.parent=t1.name and t1.name !='Administrator' and t1.name != 'Guest' and t1.docstatus !=2",m['approving_role'])]
 							for x in user_lst:
 								if not x in app_user:
 									app_user.append(x)
diff --git a/setup/doctype/authorization_rule/authorization_rule.js b/setup/doctype/authorization_rule/authorization_rule.js
index 00f5260..cdf8ef0 100644
--- a/setup/doctype/authorization_rule/authorization_rule.js
+++ b/setup/doctype/authorization_rule/authorization_rule.js
@@ -1,4 +1,4 @@
-// Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+// Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 // License: GNU General Public License v3. See license.txt
 
  
diff --git a/setup/doctype/authorization_rule/authorization_rule.py b/setup/doctype/authorization_rule/authorization_rule.py
index 3d2de47..319e325 100644
--- a/setup/doctype/authorization_rule/authorization_rule.py
+++ b/setup/doctype/authorization_rule/authorization_rule.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 # License: GNU General Public License v3. See license.txt
 
 from __future__ import unicode_literals
@@ -9,7 +9,6 @@
 from webnotes.model.bean import copy_doclist
 from webnotes import msgprint
 
-sql = webnotes.conn.sql
 	
 
 
@@ -19,7 +18,7 @@
 
 
 	def check_duplicate_entry(self):
-		exists = sql("""select name, docstatus from `tabAuthorization Rule` 
+		exists = webnotes.conn.sql("""select name, docstatus from `tabAuthorization Rule` 
 			where transaction = %s and based_on = %s and system_user = %s 
 			and system_role = %s and approving_user = %s and approving_role = %s 
 			and to_emp =%s and to_designation=%s and name != %s""", 
@@ -39,12 +38,12 @@
 
 	def validate_master_name(self):
 		if self.doc.based_on == 'Customerwise Discount' and \
-				not sql("select name from tabCustomer where name = '%s' and docstatus != 2" % \
+				not webnotes.conn.sql("select name from tabCustomer where name = '%s' and docstatus != 2" % \
 				 	(self.doc.master_name)):
 			msgprint("Please select valid Customer Name for Customerwise Discount", 
 			 	raise_exception=1)
 		elif self.doc.based_on == 'Itemwise Discount' and \
-				not sql("select name from tabItem where name = '%s' and docstatus != 2" % \
+				not webnotes.conn.sql("select name from tabItem where name = '%s' and docstatus != 2" % \
 				 	(self.doc.master_name)):
 			msgprint("Please select valid Item Name for Itemwise Discount", raise_exception=1)
 		elif (self.doc.based_on == 'Grand Total' or \
@@ -65,7 +64,7 @@
 					Applicable To (Role).", raise_exception=1)
 			elif self.doc.system_user and self.doc.approving_role and \
 			 		has_common([self.doc.approving_role], [x[0] for x in \
-					sql("select role from `tabUserRole` where parent = '%s'" % \
+					webnotes.conn.sql("select role from `tabUserRole` where parent = '%s'" % \
 					 	(self.doc.system_user))]):
 				msgprint("System User : %s is assigned role : %s. So rule does not make sense" % 
 				 	(self.doc.system_user,self.doc.approving_role), raise_exception=1)
diff --git a/setup/doctype/backup_manager/backup_dropbox.py b/setup/doctype/backup_manager/backup_dropbox.py
index b4a8f66..f33cc88 100644
--- a/setup/doctype/backup_manager/backup_dropbox.py
+++ b/setup/doctype/backup_manager/backup_dropbox.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 # License: GNU General Public License v3. See license.txt
 
 # SETUP:
@@ -61,8 +61,11 @@
 		allowed = 0
 		message = "Dropbox Access not approved."
 
-	webnotes.message_title = "Dropbox Approval"
-	webnotes.message = "<h3>%s</h3><p>Please close this window.</p>" % message
+	webnotes.local.message_title = "Dropbox Approval"
+	webnotes.local.message = "<h3>%s</h3><p>Please close this window.</p>" % message
+	
+	if allowed:
+		webnotes.local.message_success = True
 	
 	webnotes.conn.commit()
 	webnotes.response['type'] = 'page'
@@ -109,9 +112,9 @@
 		if not found:
 			try:
 				upload_file_to_dropbox(filepath, "/files", dropbox_client)
-			except Exception, e:
+			except Exception:
 				did_not_upload.append(filename)
-				error_log.append(cstr(e))
+				error_log.append(webnotes.getTraceback())
 	
 	webnotes.connect()
 	return did_not_upload, list(set(error_log))
diff --git a/setup/doctype/backup_manager/backup_googledrive.py b/setup/doctype/backup_manager/backup_googledrive.py
index 440d907..1cf616e 100644
--- a/setup/doctype/backup_manager/backup_googledrive.py
+++ b/setup/doctype/backup_manager/backup_googledrive.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 # License: GNU General Public License v3. See license.txt
 
 # SETUP:
@@ -114,9 +114,9 @@
 
 def get_gdrive_flow():
 	from oauth2client.client import OAuth2WebServerFlow
-	import conf
+	from webnotes import conf
 	
-	if not hasattr(conf, "gdrive_client_id"):
+	if not "gdrive_client_id" in conf:
 		webnotes.msgprint(_("Please set Google Drive access keys in") + " conf.py", 
 		raise_exception=True)
 
@@ -170,4 +170,4 @@
 	return database['id']
 
 if __name__=="__main__":
-	backup_to_gdrive()
\ No newline at end of file
+	backup_to_gdrive()
diff --git a/setup/doctype/backup_manager/backup_manager.js b/setup/doctype/backup_manager/backup_manager.js
index f2de49c..c011757 100644
--- a/setup/doctype/backup_manager/backup_manager.js
+++ b/setup/doctype/backup_manager/backup_manager.js
@@ -1,4 +1,4 @@
-// Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+// Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 // License: GNU General Public License v3. See license.txt
 
 $.extend(cur_frm.cscript, {
diff --git a/setup/doctype/backup_manager/backup_manager.py b/setup/doctype/backup_manager/backup_manager.py
index aaf17f5..0a83dea 100644
--- a/setup/doctype/backup_manager/backup_manager.py
+++ b/setup/doctype/backup_manager/backup_manager.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 # License: GNU General Public License v3. See license.txt
 
 # For license information, please see license.txt
@@ -39,6 +39,10 @@
 		file_and_error = [" - ".join(f) for f in zip(did_not_upload, error_log)]
 		error_message = ("\n".join(file_and_error) + "\n" + webnotes.getTraceback())
 		webnotes.errprint(error_message)
+		
+		if not webnotes.conn:
+			webnotes.connect()
+			
 		send_email(False, "Dropbox", error_message)
 
 #backup to gdrive 
diff --git a/setup/doctype/brand/brand.js b/setup/doctype/brand/brand.js
index e8c3c69..6271a16 100644
--- a/setup/doctype/brand/brand.js
+++ b/setup/doctype/brand/brand.js
@@ -1,4 +1,4 @@
-// Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+// Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 // License: GNU General Public License v3. See license.txt
 
  
diff --git a/setup/doctype/brand/brand.py b/setup/doctype/brand/brand.py
index 8002652..576da8e 100644
--- a/setup/doctype/brand/brand.py
+++ b/setup/doctype/brand/brand.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 # License: GNU General Public License v3. See license.txt
 
 from __future__ import unicode_literals
diff --git a/setup/doctype/brand/test_brand.py b/setup/doctype/brand/test_brand.py
index b97f6b0..c66413f 100644
--- a/setup/doctype/brand/test_brand.py
+++ b/setup/doctype/brand/test_brand.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 # License: GNU General Public License v3. See license.txt
 
 test_records = [
diff --git a/setup/doctype/company/charts/import_from_openerp.py b/setup/doctype/company/charts/import_from_openerp.py
index ef80008..f77b02c 100644
--- a/setup/doctype/company/charts/import_from_openerp.py
+++ b/setup/doctype/company/charts/import_from_openerp.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 # License: GNU General Public License v3. See license.txt
 
 """
diff --git a/setup/doctype/company/company.js b/setup/doctype/company/company.js
index d023f8d..856d5e1 100644
--- a/setup/doctype/company/company.js
+++ b/setup/doctype/company/company.js
@@ -1,4 +1,4 @@
-// Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+// Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 // License: GNU General Public License v3. See license.txt
 
 cur_frm.cscript.refresh = function(doc, cdt, cdn) {
@@ -61,7 +61,8 @@
 
 cur_frm.cscript.company_name = function(doc){
   if(doc.company_name && cur_frm.cscript.has_special_chars(doc.company_name)){   
-    msgprint("<font color=red>Special Characters <b>! @ # $ % ^ * + = - [ ] ' ; , / { } | : < > ?</b> are not allowed for</font>\nCompany Name <b>" + doc.company_name +"</b>")        
+    msgprint(("<font color=red>"+wn._("Special Characters")+" <b>! @ # $ % ^ * + = - [ ] ' ; , / { } | : < > ?</b> "+
+    	wn._("are not allowed for ")+"</font>\n"+wn._("Company Name")+" <b> "+ doc.company_name +"</b>"))        
     doc.company_name = '';
     refresh_field('company_name');
   }
@@ -69,7 +70,8 @@
 
 cur_frm.cscript.abbr = function(doc){
   if(doc.abbr && cur_frm.cscript.has_special_chars(doc.abbr)){   
-    msgprint("<font color=red>Special Characters <b>! @ # $ % ^ * + = - [ ] ' ; , / { } | : < > ?</b> are not allowed for</font>\nAbbr <b>" + doc.abbr +"</b>")        
+    msgprint("<font color=red>"+wn._("Special Characters ")+"<b>! @ # $ % ^ * + = - [ ] ' ; , / { } | : < > ?</b>" +
+    	wn._("are not allowed for")+ "</font>\nAbbr <b>" + doc.abbr +"</b>")        
     doc.abbr = '';
     refresh_field('abbr');
   }
diff --git a/setup/doctype/company/company.py b/setup/doctype/company/company.py
index d3f4b22..a5364aa 100644
--- a/setup/doctype/company/company.py
+++ b/setup/doctype/company/company.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 # License: GNU General Public License v3. See license.txt
 
 from __future__ import unicode_literals
@@ -8,7 +8,6 @@
 from webnotes.utils import cstr
 import webnotes.defaults
 
-sql = webnotes.conn.sql
 
 class DocType:
 	def __init__(self,d,dl):
@@ -329,7 +328,7 @@
 	for dt in ["Account", "Cost Center", "Warehouse"]:
 		_rename_record(dt)
 		webnotes.conn.commit()
-		
+
 def get_name_with_abbr(name, company):
 	company_abbr = webnotes.conn.get_value("Company", company, "abbr")		
 	parts = name.split(" - ")
diff --git a/setup/doctype/company/company.txt b/setup/doctype/company/company.txt
index 1ba1dde..8c3860a 100644
--- a/setup/doctype/company/company.txt
+++ b/setup/doctype/company/company.txt
@@ -2,7 +2,7 @@
  {
   "creation": "2013-04-10 08:35:39", 
   "docstatus": 0, 
-  "modified": "2013-08-28 19:15:04", 
+  "modified": "2013-11-02 14:24:11", 
   "modified_by": "Administrator", 
   "owner": "Administrator"
  }, 
@@ -80,7 +80,7 @@
   "fieldtype": "Select", 
   "label": "Domain", 
   "options": "Distribution\nManufacturing\nRetail\nServices", 
-  "reqd": 1
+  "reqd": 0
  }, 
  {
   "doctype": "DocField", 
@@ -157,7 +157,6 @@
   "width": "50%"
  }, 
  {
-  "description": "To enable more currencies go to Setup > Currency", 
   "doctype": "DocField", 
   "fieldname": "default_currency", 
   "fieldtype": "Link", 
diff --git a/setup/doctype/company/test_company.py b/setup/doctype/company/test_company.py
index 915657c..bae6fc9 100644
--- a/setup/doctype/company/test_company.py
+++ b/setup/doctype/company/test_company.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 # License: GNU General Public License v3. See license.txt
 
 test_ignore = ["Account", "Cost Center"]
diff --git a/setup/doctype/contact_control/contact_control.js b/setup/doctype/contact_control/contact_control.js
index 6c3f17d..d857ccd 100755
--- a/setup/doctype/contact_control/contact_control.js
+++ b/setup/doctype/contact_control/contact_control.js
@@ -1,4 +1,4 @@
-// Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+// Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 // License: GNU General Public License v3. See license.txt
 
 // common partner functions
@@ -123,7 +123,7 @@
 	});
 	
 	// css
-	$wrapper.css({ 'padding': '5px 0px' });
+	$wrapper.css({ 'margin': '0px' });
 	$wrapper.find('div.description').css({
 		'padding': '5px 2px',
 		'line-height': '150%',
diff --git a/setup/doctype/contact_control/contact_control.py b/setup/doctype/contact_control/contact_control.py
index 409c663..3b04c10 100644
--- a/setup/doctype/contact_control/contact_control.py
+++ b/setup/doctype/contact_control/contact_control.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 # License: GNU General Public License v3. See license.txt
 
 from __future__ import unicode_literals
diff --git a/setup/doctype/country/country.py b/setup/doctype/country/country.py
index 8002652..576da8e 100644
--- a/setup/doctype/country/country.py
+++ b/setup/doctype/country/country.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 # License: GNU General Public License v3. See license.txt
 
 from __future__ import unicode_literals
diff --git a/setup/doctype/country/test_country.py b/setup/doctype/country/test_country.py
index c2caa3c..27174a1 100644
--- a/setup/doctype/country/test_country.py
+++ b/setup/doctype/country/test_country.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 # License: GNU General Public License v3. See license.txt
 
 test_records = [
diff --git a/setup/doctype/currency/currency.js b/setup/doctype/currency/currency.js
index 58697b0..6d11a8e 100644
--- a/setup/doctype/currency/currency.js
+++ b/setup/doctype/currency/currency.js
@@ -1,4 +1,4 @@
-// Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+// Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 // License: GNU General Public License v3. See license.txt
 
 cur_frm.cscript.refresh = function(doc) {
diff --git a/setup/doctype/currency/currency.py b/setup/doctype/currency/currency.py
index 26d0f76..cb6190f 100644
--- a/setup/doctype/currency/currency.py
+++ b/setup/doctype/currency/currency.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 # License: GNU General Public License v3. See license.txt
 
 from __future__ import unicode_literals
diff --git a/setup/doctype/currency/test_currency.py b/setup/doctype/currency/test_currency.py
index a7ae97b..41a2fab 100644
--- a/setup/doctype/currency/test_currency.py
+++ b/setup/doctype/currency/test_currency.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 # License: GNU General Public License v3. See license.txt
 
 # pre loaded
diff --git a/setup/doctype/currency_exchange/currency_exchange.js b/setup/doctype/currency_exchange/currency_exchange.js
index bf9c516..253b5b1 100644
--- a/setup/doctype/currency_exchange/currency_exchange.js
+++ b/setup/doctype/currency_exchange/currency_exchange.js
@@ -1,4 +1,4 @@
-// Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+// Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 // License: GNU General Public License v3. See license.txt
 
 $.extend(cur_frm.cscript, {
diff --git a/setup/doctype/currency_exchange/currency_exchange.py b/setup/doctype/currency_exchange/currency_exchange.py
index 2a53017..3a52e5d 100644
--- a/setup/doctype/currency_exchange/currency_exchange.py
+++ b/setup/doctype/currency_exchange/currency_exchange.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 # License: GNU General Public License v3. See license.txt
 
 # For license information, please see license.txt
diff --git a/setup/doctype/currency_exchange/test_currency_exchange.py b/setup/doctype/currency_exchange/test_currency_exchange.py
index ea851b4..0f8caed 100644
--- a/setup/doctype/currency_exchange/test_currency_exchange.py
+++ b/setup/doctype/currency_exchange/test_currency_exchange.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 # License: GNU General Public License v3. See license.txt
 
 test_records = [
diff --git a/setup/doctype/customer_group/customer_group.js b/setup/doctype/customer_group/customer_group.js
index 2953de5..3e76986 100644
--- a/setup/doctype/customer_group/customer_group.js
+++ b/setup/doctype/customer_group/customer_group.js
@@ -1,4 +1,4 @@
-// Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+// Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 // License: GNU General Public License v3. See license.txt
  
 cur_frm.cscript.refresh = function(doc, cdt, cdn) {
@@ -9,7 +9,7 @@
 	// read-only for root customer group
 	if(!doc.parent_customer_group) {
 		cur_frm.perm = [[1,0,0], [1,0,0]];
-		cur_frm.set_intro("This is a root customer group and cannot be edited.");
+		cur_frm.set_intro(wn._("This is a root customer group and cannot be edited."));
 	} else {
 		cur_frm.set_intro(null);
 	}
diff --git a/setup/doctype/customer_group/customer_group.py b/setup/doctype/customer_group/customer_group.py
index 0940e1f..6bb0aa6 100644
--- a/setup/doctype/customer_group/customer_group.py
+++ b/setup/doctype/customer_group/customer_group.py
@@ -1,11 +1,10 @@
-# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 # License: GNU General Public License v3. See license.txt
 
 from __future__ import unicode_literals
 import webnotes
 from webnotes import msgprint
 
-sql = webnotes.conn.sql
 	
 from webnotes.utils.nestedset import DocTypeNestedSet
 class DocType(DocTypeNestedSet):
@@ -15,7 +14,7 @@
 		self.nsm_parent_field = 'parent_customer_group';
 
 	def validate(self): 
-		if sql("select name from `tabCustomer Group` where name = %s and docstatus = 2", 
+		if webnotes.conn.sql("select name from `tabCustomer Group` where name = %s and docstatus = 2", 
 		 		(self.doc.customer_group_name)):
 			msgprint("""Another %s record is trashed. 
 				To untrash please go to Setup -> Recycle Bin.""" % 
@@ -33,7 +32,7 @@
 				self.doc.name, raise_exception=1)
 
 	def on_trash(self):
-		cust = sql("select name from `tabCustomer` where ifnull(customer_group, '') = %s", 
+		cust = webnotes.conn.sql("select name from `tabCustomer` where ifnull(customer_group, '') = %s", 
 		 	self.doc.name)
 		cust = [d[0] for d in cust]
 		if cust:
@@ -42,7 +41,7 @@
 				To trash/delete this, remove/change customer group in customer master""" %
 				(self.doc.name, cust or ''), raise_exception=1)
 
-		if sql("select name from `tabCustomer Group` where parent_customer_group = %s \
+		if webnotes.conn.sql("select name from `tabCustomer Group` where parent_customer_group = %s \
 				and docstatus != 2", self.doc.name):
 			msgprint("Child customer group exists for this customer group. \
 				You can not trash/cancel/delete this customer group.", raise_exception=1)
diff --git a/setup/doctype/customer_group/customer_group.txt b/setup/doctype/customer_group/customer_group.txt
index 4f9acc6..f76a2e1 100644
--- a/setup/doctype/customer_group/customer_group.txt
+++ b/setup/doctype/customer_group/customer_group.txt
@@ -2,7 +2,7 @@
  {
   "creation": "2013-01-10 16:34:23", 
   "docstatus": 0, 
-  "modified": "2013-08-05 18:12:57", 
+  "modified": "2013-11-02 16:52:51", 
   "modified_by": "Administrator", 
   "owner": "Administrator"
  }, 
@@ -62,6 +62,7 @@
   "reqd": 1
  }, 
  {
+  "description": "<a href=\"#Sales Browser/Customer Group\">Add / Edit</a>", 
   "doctype": "DocField", 
   "fieldname": "parent_customer_group", 
   "fieldtype": "Link", 
@@ -88,7 +89,6 @@
   "fieldtype": "Column Break"
  }, 
  {
-  "description": "This Price List will be selected as default for all Customers under this Group.", 
   "doctype": "DocField", 
   "fieldname": "default_price_list", 
   "fieldtype": "Link", 
@@ -122,6 +122,7 @@
   "search_index": 1
  }, 
  {
+  "description": "<a href=\"#Sales Browser/Customer Group\">Add / Edit</a>", 
   "doctype": "DocField", 
   "fieldname": "old_parent", 
   "fieldtype": "Link", 
diff --git a/setup/doctype/customer_group/test_customer_group.py b/setup/doctype/customer_group/test_customer_group.py
index 11140d6..e08ec23 100644
--- a/setup/doctype/customer_group/test_customer_group.py
+++ b/setup/doctype/customer_group/test_customer_group.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 # License: GNU General Public License v3. See license.txt
 
 test_ignore = ["Price List"]
diff --git a/setup/doctype/email_digest/email_digest.js b/setup/doctype/email_digest/email_digest.js
index 5521092..3367a72 100644
--- a/setup/doctype/email_digest/email_digest.js
+++ b/setup/doctype/email_digest/email_digest.js
@@ -1,12 +1,12 @@
-// Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+// Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 // License: GNU General Public License v3. See license.txt
 
 cur_frm.cscript.refresh = function(doc, dt, dn) {
 	doc = locals[dt][dn];
-	var save_msg = "You must <b>Save</b> the form before proceeding";
-	var err_msg = "There was an error. One probable reason could be that you haven't saved the form. Please contact support@erpnext.com if the problem persists."
+	var save_msg = wn._("You must ")+ "<b>"+wn._("Save ")+"</b>"+wn._("the form before proceeding");
+	var err_msg = wn._("There was an error. One probable reason could be that you haven't saved the form. Please contact support@erpnext.com if the problem persists.")
 	
-	cur_frm.add_custom_button('View Now', function() {
+	cur_frm.add_custom_button(wn._('View Now'), function() {
 		doc = locals[dt][dn];
 		if(doc.__unsaved != 1) {
 			return $c_obj(make_doclist(dt, dn), 'get_digest_msg', '', function(r, rt) {
@@ -16,7 +16,7 @@
 				} else {
 					//console.log(arguments);
 					var d = new wn.ui.Dialog({
-						title: 'Email Digest: ' + dn,
+						title: wn._('Email Digest: ') + dn,
 						width: 800
 					});
 
@@ -29,7 +29,7 @@
 			msgprint(save_msg);
 		}	
 	}, 1);
-	cur_frm.add_custom_button('Send Now', function() {
+	cur_frm.add_custom_button(wn._('Send Now'), function() {
 		doc = locals[dt][dn];
 		if(doc.__unsaved != 1) {
 			return $c_obj(make_doclist(dt, dn), 'send', '', function(r, rt) {
@@ -38,7 +38,7 @@
 					console.log(r.exc);
 				} else {
 					//console.log(arguments);
-					msgprint('Message Sent');
+					msgprint(wn._('Message Sent'));
 				}
 			});
 		} else {
@@ -56,7 +56,7 @@
 			// Open a dialog and display checkboxes against email addresses
 			doc = locals[dt][dn];
 			var d = new wn.ui.Dialog({
-				title: 'Add/Remove Recipients',
+				title: wn._('Add/Remove Recipients'),
 				width: 400
 			});
 			var dialog_div = $a(d.body, 'div', 'dialog-div', '', '');
diff --git a/setup/doctype/email_digest/email_digest.py b/setup/doctype/email_digest/email_digest.py
index 07efd16..1078d03 100644
--- a/setup/doctype/email_digest/email_digest.py
+++ b/setup/doctype/email_digest/email_digest.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 # License: GNU General Public License v3. See license.txt
 
 from __future__ import unicode_literals
@@ -457,8 +457,8 @@
 	from webnotes.utils import getdate
 	now_date = now_datetime().date()
 	
-	import conf
-	if hasattr(conf, "expires_on") and now_date > getdate(conf.expires_on):
+	from webnotes import conf
+	if "expires_on" in conf and now_date > getdate(conf.expires_on):
 		# do not send email digests to expired accounts
 		return
 	
diff --git a/setup/doctype/email_settings/email_settings.py b/setup/doctype/email_settings/email_settings.py
index 219501e..7183497 100644
--- a/setup/doctype/email_settings/email_settings.py
+++ b/setup/doctype/email_settings/email_settings.py
@@ -1,9 +1,8 @@
-# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 # License: GNU General Public License v3. See license.txt
 
 from __future__ import unicode_literals
 import webnotes
-sql = webnotes.conn.sql
 	
 from webnotes.utils import cint
 
@@ -53,7 +52,7 @@
 				inc_email.password = self.doc.support_password
 			except AttributeError, e:
 				webnotes.msgprint(err_msg)
-				raise e
+				raise
 
 			pop_mb = POP3Mailbox(inc_email)
 			
@@ -62,7 +61,7 @@
 			except _socket.error, e:
 				# Invalid mail server -- due to refusing connection
 				webnotes.msgprint('Invalid POP3 Mail Server. Please rectify and try again.')
-				raise e
+				raise
 			except poplib.error_proto, e:
 				webnotes.msgprint('Invalid User Name or Support Password. Please rectify and try again.')
-				raise e
+				raise
diff --git a/setup/doctype/features_setup/features_setup.py b/setup/doctype/features_setup/features_setup.py
index 3ecefca..f700d8d 100644
--- a/setup/doctype/features_setup/features_setup.py
+++ b/setup/doctype/features_setup/features_setup.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 # License: GNU General Public License v3. See license.txt
 
 from __future__ import unicode_literals
diff --git a/setup/doctype/features_setup/features_setup.txt b/setup/doctype/features_setup/features_setup.txt
index 89c9dd3..3f73ee2 100644
--- a/setup/doctype/features_setup/features_setup.txt
+++ b/setup/doctype/features_setup/features_setup.txt
@@ -2,7 +2,7 @@
  {
   "creation": "2012-12-20 12:50:49", 
   "docstatus": 0, 
-  "modified": "2013-08-22 15:36:43", 
+  "modified": "2013-11-03 14:20:18", 
   "modified_by": "Administrator", 
   "owner": "Administrator"
  }, 
@@ -235,7 +235,6 @@
   "fieldtype": "Column Break"
  }, 
  {
-  "description": "Enables <b>More Info.</b> in all documents", 
   "doctype": "DocField", 
   "fieldname": "fs_more_info", 
   "fieldtype": "Check", 
diff --git a/setup/doctype/global_defaults/global_defaults.js b/setup/doctype/global_defaults/global_defaults.js
index 8856acb..ba31f3c 100644
--- a/setup/doctype/global_defaults/global_defaults.js
+++ b/setup/doctype/global_defaults/global_defaults.js
@@ -1,4 +1,4 @@
-// Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+// Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 // License: GNU General Public License v3. See license.txt
 
 $.extend(cur_frm.cscript, {
diff --git a/setup/doctype/global_defaults/global_defaults.py b/setup/doctype/global_defaults/global_defaults.py
index fb16b13..6d535bf 100644
--- a/setup/doctype/global_defaults/global_defaults.py
+++ b/setup/doctype/global_defaults/global_defaults.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 # License: GNU General Public License v3. See license.txt
 
 from __future__ import unicode_literals
diff --git a/setup/doctype/item_group/item_group.js b/setup/doctype/item_group/item_group.js
index 31edef2..78df609 100644
--- a/setup/doctype/item_group/item_group.js
+++ b/setup/doctype/item_group/item_group.js
@@ -1,19 +1,25 @@
-// Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+// Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 // License: GNU General Public License v3. See license.txt
 
 
 cur_frm.cscript.refresh = function(doc, cdt, cdn) {
 	cur_frm.cscript.set_root_readonly(doc);
-	cur_frm.add_custom_button("Item Group Tree", function() {
+	cur_frm.appframe.add_button(wn._("Item Group Tree"), function() {
 		wn.set_route("Sales Browser", "Item Group");
-	})
+	}, "icon-sitemap")
+
+	if(!doc.__islocal && doc.show_in_website) {
+		cur_frm.appframe.add_button("View In Website", function() {
+			window.open(doc.page_name);
+		}, "icon-globe");
+	}
 }
 
 cur_frm.cscript.set_root_readonly = function(doc) {
 	// read-only for root item group
 	if(!doc.parent_item_group) {
 		cur_frm.perm = [[1,0,0], [1,0,0]];
-		cur_frm.set_intro("This is a root item group and cannot be edited.");
+		cur_frm.set_intro(wn._("This is a root item group and cannot be edited."));
 	} else {
 		cur_frm.set_intro(null);
 	}
diff --git a/setup/doctype/item_group/item_group.py b/setup/doctype/item_group/item_group.py
index 5eae4d1..e2fc7ab 100644
--- a/setup/doctype/item_group/item_group.py
+++ b/setup/doctype/item_group/item_group.py
@@ -1,49 +1,34 @@
-# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 # License: GNU General Public License v3. See license.txt
 
 from __future__ import unicode_literals
 import webnotes
 
-
 from webnotes.utils.nestedset import DocTypeNestedSet
+from webnotes.webutils import WebsiteGenerator
 
-class DocType(DocTypeNestedSet):
+class DocType(DocTypeNestedSet, WebsiteGenerator):
 	def __init__(self, doc, doclist=[]):
 		self.doc = doc
 		self.doclist = doclist
 		self.nsm_parent_field = 'parent_item_group'
 		
 	def on_update(self):
-		super(DocType, self).on_update()
+		DocTypeNestedSet.on_update(self)
+		WebsiteGenerator.on_update(self)
 		
 		self.validate_name_with_item()
 		
 		from selling.utils.product import invalidate_cache_for
-		
-		if self.doc.show_in_website:
-			from webnotes.webutils import update_page_name
-			# webpage updates
-			page_name = self.doc.name
-			update_page_name(self.doc, page_name)
-			invalidate_cache_for(self.doc.name)
-
-		elif self.doc.page_name:
-			# if unchecked show in website
-			
-			from webnotes.webutils import delete_page_cache
-			delete_page_cache(self.doc.page_name)
-			
-			invalidate_cache_for(self.doc.name)
-			
-			webnotes.conn.set(self.doc, "page_name", None)
-		
+		invalidate_cache_for(self.doc.name)
+				
 		self.validate_one_root()
 		
 	def validate_name_with_item(self):
 		if webnotes.conn.exists("Item", self.doc.name):
 			webnotes.msgprint("An item exists with same name (%s), please change the \
 				item group name or rename the item" % self.doc.name, raise_exception=1)
-	
+		
 	def get_context(self):
 		from selling.utils.product import get_product_list_for_group, \
 			get_parent_item_groups, get_group_item_count
diff --git a/setup/doctype/item_group/item_group.txt b/setup/doctype/item_group/item_group.txt
index f573110..b365893 100644
--- a/setup/doctype/item_group/item_group.txt
+++ b/setup/doctype/item_group/item_group.txt
@@ -2,7 +2,7 @@
  {
   "creation": "2013-03-28 10:35:29", 
   "docstatus": 0, 
-  "modified": "2013-08-05 17:21:14", 
+  "modified": "2013-11-02 19:41:37", 
   "modified_by": "Administrator", 
   "owner": "Administrator"
  }, 
@@ -67,6 +67,7 @@
   "fieldtype": "Column Break"
  }, 
  {
+  "description": "<a href=\"#Sales Browser/Item Group\">Add / Edit</a>", 
   "doctype": "DocField", 
   "fieldname": "parent_item_group", 
   "fieldtype": "Link", 
@@ -160,6 +161,7 @@
   "search_index": 1
  }, 
  {
+  "description": "<a href=\"#Sales Browser/Item Group\">Add / Edit</a>", 
   "doctype": "DocField", 
   "fieldname": "old_parent", 
   "fieldtype": "Link", 
diff --git a/setup/doctype/item_group/templates/generators/item_group.html b/setup/doctype/item_group/templates/generators/item_group.html
index 48db596..ba32d5c 100644
--- a/setup/doctype/item_group/templates/generators/item_group.html
+++ b/setup/doctype/item_group/templates/generators/item_group.html
@@ -8,7 +8,7 @@
 	{% include "lib/website/doctype/website_slideshow/templates/includes/slideshow.html" %}
 	{% endif %}
 	{% if description %}<!-- description -->
-	<div>{{ description or ""}}</div>
+	<div itemprop="description">{{ description or ""}}</div>
 	{% else %}
 	<h3>{{ name }}</h3>
 	{% endif %}
@@ -38,5 +38,15 @@
 		<div class="alert alert-warning">No items listed.</div>
 	{% endif %}
 </div>
+<script>
+$(function() {
+	if(window.logged_in && getCookie("system_user")==="yes") {
+		wn.has_permission("Item Group", "{{ name }}", "write", function(r) {
+			wn.require("lib/js/wn/website/editable.js");
+			wn.make_editable($('[itemprop="description"]'), "Item Group", "{{ name }}", "description");
+		});
+	}
+});
+</script>
 
 {% endblock %}
\ No newline at end of file
diff --git a/setup/doctype/item_group/test_item_group.py b/setup/doctype/item_group/test_item_group.py
index 7d7452e..04640b7 100644
--- a/setup/doctype/item_group/test_item_group.py
+++ b/setup/doctype/item_group/test_item_group.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 # License: GNU General Public License v3. See license.txt
 
 test_records = [
diff --git a/setup/doctype/jobs_email_settings/jobs_email_settings.js b/setup/doctype/jobs_email_settings/jobs_email_settings.js
index b970c96..9ef4762 100644
--- a/setup/doctype/jobs_email_settings/jobs_email_settings.js
+++ b/setup/doctype/jobs_email_settings/jobs_email_settings.js
@@ -1,4 +1,4 @@
-// Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+// Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 // License: GNU General Public License v3. See license.txt
 
 // For license information, please see license.txt
diff --git a/setup/doctype/jobs_email_settings/jobs_email_settings.py b/setup/doctype/jobs_email_settings/jobs_email_settings.py
index 87ed621..197dec6 100644
--- a/setup/doctype/jobs_email_settings/jobs_email_settings.py
+++ b/setup/doctype/jobs_email_settings/jobs_email_settings.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 # License: GNU General Public License v3. See license.txt
 
 # For license information, please see license.txt
diff --git a/setup/doctype/naming_series/naming_series.js b/setup/doctype/naming_series/naming_series.js
index 885b5ed..e59756b 100644
--- a/setup/doctype/naming_series/naming_series.js
+++ b/setup/doctype/naming_series/naming_series.js
@@ -1,4 +1,4 @@
-// Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+// Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 // License: GNU General Public License v3. See license.txt
 
 // Settings
diff --git a/setup/doctype/naming_series/naming_series.py b/setup/doctype/naming_series/naming_series.py
index 9cc4de2..234a689 100644
--- a/setup/doctype/naming_series/naming_series.py
+++ b/setup/doctype/naming_series/naming_series.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 # License: GNU General Public License v3. See license.txt
 
 from __future__ import unicode_literals
@@ -8,7 +8,6 @@
 from webnotes import msgprint
 import webnotes.model.doctype
 
-sql = webnotes.conn.sql
 
 class DocType:
 	def __init__(self, d, dl):
@@ -23,7 +22,7 @@
 					where fieldname='naming_series'""")
 				)))),
 			"prefixes": "\n".join([''] + [i[0] for i in 
-				sql("""select name from tabSeries""")])
+				webnotes.conn.sql("""select name from tabSeries""")])
 		}
 	
 	def scrub_options_list(self, ol):
@@ -126,12 +125,43 @@
 	def insert_series(self, series):
 		"""insert series if missing"""
 		if not webnotes.conn.exists('Series', series):
-			sql("insert into tabSeries (name, current) values (%s,0)", (series))			
+			webnotes.conn.sql("insert into tabSeries (name, current) values (%s,0)", (series))			
 
 	def update_series_start(self):
 		if self.doc.prefix:
 			self.insert_series(self.doc.prefix)
-			sql("update `tabSeries` set current = '%s' where name = '%s'" % (self.doc.current_value,self.doc.prefix))
+			webnotes.conn.sql("update `tabSeries` set current = '%s' where name = '%s'" % (self.doc.current_value,self.doc.prefix))
 			msgprint("Series Updated Successfully")
 		else:
 			msgprint("Please select prefix first")
+
+def set_by_naming_series(doctype, fieldname, naming_series, hide_name_field=True):
+	from core.doctype.property_setter.property_setter import make_property_setter
+	if naming_series:
+		make_property_setter(doctype, "naming_series", "hidden", 0, "Check")
+		make_property_setter(doctype, "naming_series", "reqd", 1, "Check")
+
+		# set values for mandatory
+		webnotes.conn.sql("""update `tab{doctype}` set naming_series={s} where 
+			ifnull(naming_series, '')=''""".format(doctype=doctype, s="%s"), get_default_naming_series(doctype))
+
+		if hide_name_field:
+			make_property_setter(doctype, fieldname, "reqd", 0, "Check")
+			make_property_setter(doctype, fieldname, "hidden", 1, "Check")
+	else:
+		make_property_setter(doctype, "naming_series", "reqd", 0, "Check")
+		make_property_setter(doctype, "naming_series", "hidden", 1, "Check")
+
+		if hide_name_field:
+			make_property_setter(doctype, fieldname, "hidden", 0, "Check")
+			make_property_setter(doctype, fieldname, "reqd", 1, "Check")
+			
+			# set values for mandatory
+			webnotes.conn.sql("""update `tab{doctype}` set `{fieldname}`=`name` where 
+				ifnull({fieldname}, '')=''""".format(doctype=doctype, fieldname=fieldname))
+		
+def get_default_naming_series(doctype):
+	from webnotes.model.doctype import get_property
+	naming_series = get_property(doctype, "options", "naming_series")
+	naming_series = naming_series.split("\n")
+	return naming_series[0] or naming_series[1]	
\ No newline at end of file
diff --git a/setup/doctype/notification_control/notification_control.js b/setup/doctype/notification_control/notification_control.js
index 3e16421..9d26496 100644
--- a/setup/doctype/notification_control/notification_control.js
+++ b/setup/doctype/notification_control/notification_control.js
@@ -1,4 +1,4 @@
-// Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+// Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 // License: GNU General Public License v3. See license.txt
 
 cur_frm.cscript.select_transaction = function(doc, cdt, cdn) {
diff --git a/setup/doctype/notification_control/notification_control.py b/setup/doctype/notification_control/notification_control.py
index 6133d9b..22ad51f 100644
--- a/setup/doctype/notification_control/notification_control.py
+++ b/setup/doctype/notification_control/notification_control.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 # License: GNU General Public License v3. See license.txt
 
 from __future__ import unicode_literals
@@ -6,7 +6,6 @@
 
 from webnotes import msgprint
 
-sql = webnotes.conn.sql
 
 class DocType:
 	def __init__(self,d,dl):
@@ -14,7 +13,7 @@
 
 	def get_message(self, arg):
 		fn = arg.lower().replace(' ', '_') + '_message'
-		v = sql("select value from tabSingles where field=%s and doctype=%s", (fn, 'Notification Control'))
+		v = webnotes.conn.sql("select value from tabSingles where field=%s and doctype=%s", (fn, 'Notification Control'))
 		return v and v[0][0] or ''
 
 	def set_message(self, arg = ''):
diff --git a/setup/doctype/print_heading/print_heading.js b/setup/doctype/print_heading/print_heading.js
index e8c3c69..6271a16 100644
--- a/setup/doctype/print_heading/print_heading.js
+++ b/setup/doctype/print_heading/print_heading.js
@@ -1,4 +1,4 @@
-// Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+// Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 // License: GNU General Public License v3. See license.txt
 
  
diff --git a/setup/doctype/print_heading/print_heading.py b/setup/doctype/print_heading/print_heading.py
index ba7114a..6704476 100644
--- a/setup/doctype/print_heading/print_heading.py
+++ b/setup/doctype/print_heading/print_heading.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 # License: GNU General Public License v3. See license.txt
 
 from __future__ import unicode_literals
@@ -7,7 +7,6 @@
 from webnotes.model import db_exists
 from webnotes.model.bean import copy_doclist
 
-sql = webnotes.conn.sql
 	
 
 
diff --git a/setup/doctype/print_heading/test_print_heading.py b/setup/doctype/print_heading/test_print_heading.py
index 927ac66..e9f61c4 100644
--- a/setup/doctype/print_heading/test_print_heading.py
+++ b/setup/doctype/print_heading/test_print_heading.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 # License: GNU General Public License v3. See license.txt
 
 test_records = [[{"print_heading": "_Test Print Heading"}]]
\ No newline at end of file
diff --git a/setup/doctype/quotation_lost_reason/quotation_lost_reason.js b/setup/doctype/quotation_lost_reason/quotation_lost_reason.js
index e8c3c69..6271a16 100644
--- a/setup/doctype/quotation_lost_reason/quotation_lost_reason.js
+++ b/setup/doctype/quotation_lost_reason/quotation_lost_reason.js
@@ -1,4 +1,4 @@
-// Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+// Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 // License: GNU General Public License v3. See license.txt
 
  
diff --git a/setup/doctype/quotation_lost_reason/quotation_lost_reason.py b/setup/doctype/quotation_lost_reason/quotation_lost_reason.py
index 8002652..576da8e 100644
--- a/setup/doctype/quotation_lost_reason/quotation_lost_reason.py
+++ b/setup/doctype/quotation_lost_reason/quotation_lost_reason.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 # License: GNU General Public License v3. See license.txt
 
 from __future__ import unicode_literals
diff --git a/setup/doctype/quotation_lost_reason/test_quotation_lost_reason.py b/setup/doctype/quotation_lost_reason/test_quotation_lost_reason.py
index 4b2bc17..486dd86 100644
--- a/setup/doctype/quotation_lost_reason/test_quotation_lost_reason.py
+++ b/setup/doctype/quotation_lost_reason/test_quotation_lost_reason.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 # License: GNU General Public License v3. See license.txt
 
 test_records = [[{"doctype":"Quotation Lost Reason", "order_lost_reason": "_Test Quotation Lost Reason"}]]
\ No newline at end of file
diff --git a/setup/doctype/sales_email_settings/sales_email_settings.js b/setup/doctype/sales_email_settings/sales_email_settings.js
index b970c96..9ef4762 100644
--- a/setup/doctype/sales_email_settings/sales_email_settings.js
+++ b/setup/doctype/sales_email_settings/sales_email_settings.js
@@ -1,4 +1,4 @@
-// Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+// Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 // License: GNU General Public License v3. See license.txt
 
 // For license information, please see license.txt
diff --git a/setup/doctype/sales_email_settings/sales_email_settings.py b/setup/doctype/sales_email_settings/sales_email_settings.py
index 87ed621..197dec6 100644
--- a/setup/doctype/sales_email_settings/sales_email_settings.py
+++ b/setup/doctype/sales_email_settings/sales_email_settings.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 # License: GNU General Public License v3. See license.txt
 
 # For license information, please see license.txt
diff --git a/setup/doctype/sales_partner/sales_partner.js b/setup/doctype/sales_partner/sales_partner.js
index 86b7712..0576857 100644
--- a/setup/doctype/sales_partner/sales_partner.js
+++ b/setup/doctype/sales_partner/sales_partner.js
@@ -1,4 +1,4 @@
-// Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+// Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 // License: GNU General Public License v3. See license.txt
 
 wn.require('app/setup/doctype/contact_control/contact_control.js');
@@ -39,7 +39,7 @@
 				return "select name, address_type, address_line1, address_line2, city, state, country, pincode, fax, email_id, phone, is_primary_address, is_shipping_address from tabAddress where sales_partner='"+cur_frm.docname+"' and docstatus != 2 order by is_primary_address desc"
 			},
 			as_dict: 1,
-			no_results_message: 'No addresses created',
+			no_results_message: wn._('No addresses created'),
 			render_row: function(wrapper, data) {
 				$(wrapper).css('padding','5px 0px');
 				var link = $ln(wrapper,cstr(data.name), function() { loaddoc("Address", this.dn); }, {fontWeight:'bold'});
@@ -69,7 +69,7 @@
 				return "select name, first_name, last_name, email_id, phone, mobile_no, department, designation, is_primary_contact from tabContact where sales_partner='"+cur_frm.docname+"' and docstatus != 2 order by is_primary_contact desc"
 			},
 			as_dict: 1,
-			no_results_message: 'No contacts created',
+			no_results_message: wn._('No contacts created'),
 			render_row: function(wrapper, data) {
 				$(wrapper).css('padding', '5px 0px');
 				var link = $ln(wrapper, cstr(data.name), function() { loaddoc("Contact", this.dn); }, {fontWeight:'bold'});
diff --git a/setup/doctype/sales_partner/sales_partner.py b/setup/doctype/sales_partner/sales_partner.py
index 0d7e12d..4ab99b1 100644
--- a/setup/doctype/sales_partner/sales_partner.py
+++ b/setup/doctype/sales_partner/sales_partner.py
@@ -1,30 +1,28 @@
-# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 # License: GNU General Public License v3. See license.txt
 
 from __future__ import unicode_literals
 import webnotes
 from webnotes.utils import cint, cstr, filter_strip_join
+from webnotes.webutils import WebsiteGenerator, clear_cache
 
-sql = webnotes.conn.sql
-
-class DocType:
+class DocType(WebsiteGenerator):
 	def __init__(self, doc, doclist=None):
 		self.doc = doc
 		self.doclist = doclist
 
+	def validate(self):
+		if self.doc.partner_website and not self.doc.partner_website.startswith("http"):
+			self.doc.partner_website = "http://" + self.doc.partner_website
+
 	def on_update(self):
-		if cint(self.doc.show_in_website):
-			from webnotes.webutils import update_page_name
-			update_page_name(self.doc, self.doc.partner_name)
-		
+		WebsiteGenerator.on_update(self)
 		if self.doc.page_name:
-			from webnotes.webutils import clear_cache
-			clear_cache(self.doc.page_name)
 			clear_cache("partners")
 		
 	def get_contacts(self,nm):
 		if nm:
-			contact_details =webnotes.conn.convert_to_lists(sql("select name, CONCAT(IFNULL(first_name,''),' ',IFNULL(last_name,'')),contact_no,email_id from `tabContact` where sales_partner = '%s'"%nm))
+			contact_details =webnotes.conn.convert_to_lists(webnotes.conn.sql("select name, CONCAT(IFNULL(first_name,''),' ',IFNULL(last_name,'')),contact_no,email_id from `tabContact` where sales_partner = '%s'"%nm))
 			return contact_details
 		else:
 			return ''
diff --git a/setup/doctype/sales_partner/sales_partner.txt b/setup/doctype/sales_partner/sales_partner.txt
index ab47565..7d0750f 100644
--- a/setup/doctype/sales_partner/sales_partner.txt
+++ b/setup/doctype/sales_partner/sales_partner.txt
@@ -2,7 +2,7 @@
  {
   "creation": "2013-04-12 15:34:06", 
   "docstatus": 0, 
-  "modified": "2013-07-05 14:54:31", 
+  "modified": "2013-11-02 16:59:04", 
   "modified_by": "Administrator", 
   "owner": "Administrator"
  }, 
@@ -64,6 +64,7 @@
   "search_index": 0
  }, 
  {
+  "description": "<a href=\"#Sales Browser/Territory\">Add / Edit</a>", 
   "doctype": "DocField", 
   "fieldname": "territory", 
   "fieldtype": "Link", 
diff --git a/setup/doctype/sales_partner/test_sales_partner.py b/setup/doctype/sales_partner/test_sales_partner.py
index 7ac835d..2dc0006 100644
--- a/setup/doctype/sales_partner/test_sales_partner.py
+++ b/setup/doctype/sales_partner/test_sales_partner.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 # License: GNU General Public License v3. See license.txt
 
 test_records = []
\ No newline at end of file
diff --git a/setup/doctype/sales_person/sales_person.js b/setup/doctype/sales_person/sales_person.js
index 34f267e..55d8684 100644
--- a/setup/doctype/sales_person/sales_person.js
+++ b/setup/doctype/sales_person/sales_person.js
@@ -1,4 +1,4 @@
-// Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+// Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 // License: GNU General Public License v3. See license.txt
 
 cur_frm.cscript.refresh = function(doc, cdt, cdn) {
@@ -9,7 +9,7 @@
 	// read-only for root
 	if(!doc.parent_sales_person) {
 		cur_frm.perm = [[1,0,0], [1,0,0]];
-		cur_frm.set_intro("This is a root sales person and cannot be edited.");
+		cur_frm.set_intro(wn._("This is a root sales person and cannot be edited."));
 	} else {
 		cur_frm.set_intro(null);
 	}
diff --git a/setup/doctype/sales_person/sales_person.py b/setup/doctype/sales_person/sales_person.py
index 6161706..cf20087 100644
--- a/setup/doctype/sales_person/sales_person.py
+++ b/setup/doctype/sales_person/sales_person.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 # License: GNU General Public License v3. See license.txt
 
 from __future__ import unicode_literals
diff --git a/setup/doctype/sales_person/test_sales_person.py b/setup/doctype/sales_person/test_sales_person.py
index d00736b..ebbc25e 100644
--- a/setup/doctype/sales_person/test_sales_person.py
+++ b/setup/doctype/sales_person/test_sales_person.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 # License: GNU General Public License v3. See license.txt
 
 test_dependencies = ["Employee"]
diff --git a/setup/doctype/setup_control/README.md b/setup/doctype/setup_control/README.md
deleted file mode 100644
index 909fea4..0000000
--- a/setup/doctype/setup_control/README.md
+++ /dev/null
@@ -1 +0,0 @@
-Account setup utility on first login.
\ No newline at end of file
diff --git a/setup/doctype/setup_control/__init__.py b/setup/doctype/setup_control/__init__.py
deleted file mode 100644
index baffc48..0000000
--- a/setup/doctype/setup_control/__init__.py
+++ /dev/null
@@ -1 +0,0 @@
-from __future__ import unicode_literals
diff --git a/setup/doctype/setup_control/setup_control.py b/setup/doctype/setup_control/setup_control.py
deleted file mode 100644
index 200ff3c..0000000
--- a/setup/doctype/setup_control/setup_control.py
+++ /dev/null
@@ -1,255 +0,0 @@
-# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
-# License: GNU General Public License v3. See license.txt
-
-from __future__ import unicode_literals
-import webnotes
-
-from webnotes.utils import cint, cstr, getdate, now, nowdate, get_defaults
-from webnotes.model.doc import Document, addchild
-from webnotes.model.code import get_obj
-from webnotes import session, form, msgprint
-
-class DocType:
-	def __init__(self, d, dl):
-		self.doc, self.doclist = d, dl
-	
-	def setup_account(self, args):
-		import webnotes, json
-		if isinstance(args, basestring):
-			args = json.loads(args)
-		webnotes.conn.begin()
-
-		self.update_profile_name(args)
-		add_all_roles_to(webnotes.session.user)
-		self.create_fiscal_year_and_company(args)
-		self.set_defaults(args)
-		create_territories()
-		self.create_price_lists(args)
-		self.create_feed_and_todo()
-		self.create_email_digest()
-
-		webnotes.clear_cache()
-		msgprint("Company setup is complete. This page will be refreshed in a moment.")
-		webnotes.conn.commit()
-
-		return {
-			'sys_defaults': get_defaults(), 
-			'user_fullname': (args.get('first_name') or '') + (args.get('last_name')
-					and (" " + args.get('last_name')) or '')
-		}
-	
-	def update_profile_name(self, args):
-		args['name'] = webnotes.session.get('user')
-
-		# Update Profile
-		if not args.get('last_name') or args.get('last_name')=='None': args['last_name'] = None
-		webnotes.conn.sql("""\
-			UPDATE `tabProfile` SET first_name=%(first_name)s,
-			last_name=%(last_name)s
-			WHERE name=%(name)s AND docstatus<2""", args)
-	
-	def create_fiscal_year_and_company(self, args):
-		curr_fiscal_year, fy_start_date, fy_abbr = self.get_fy_details(args.get('fy_start'), True)
-		webnotes.bean([{
-			"doctype":"Fiscal Year",
-			'year': curr_fiscal_year,
-			'year_start_date': fy_start_date
-		}]).insert()
-
-		curr_fiscal_year, fy_start_date, fy_abbr = self.get_fy_details(args.get('fy_start'))
-		webnotes.bean([{
-			"doctype":"Fiscal Year",
-			'year': curr_fiscal_year,
-			'year_start_date': fy_start_date,
-		}]).insert()
-
-		
-		# Company
-		webnotes.bean([{
-			"doctype":"Company",
-			'domain': args.get("industry"),
-			'company_name':args.get('company_name'),
-			'abbr':args.get('company_abbr'),
-			'default_currency':args.get('currency'),
-		}]).insert()
-		
-		self.curr_fiscal_year = curr_fiscal_year
-	
-	def create_price_lists(self, args):
-		for pl_type in ["Selling", "Buying"]:
-			webnotes.bean([
-				{
-					"doctype": "Price List",
-					"price_list_name": "Standard " + pl_type,
-					"buying_or_selling": pl_type,
-					"currency": args["currency"]
-				},
-				{
-					"doctype": "Applicable Territory",
-					"parentfield": "valid_for_territories",
-					"territory": "All Territories"
-				}
-			]).insert()
-	
-	def set_defaults(self, args):
-		# enable default currency
-		webnotes.conn.set_value("Currency", args.get("currency"), "enabled", 1)
-		
-		global_defaults = webnotes.bean("Global Defaults", "Global Defaults")
-		global_defaults.doc.fields.update({
-			'current_fiscal_year': self.curr_fiscal_year,
-			'default_currency': args.get('currency'),
-			'default_company':args.get('company_name'),
-			'date_format': webnotes.conn.get_value("Country", args.get("country"), "date_format"),
-			"float_precision": 3,
-			"time_zone": args.get("time_zone"),
-			"country": args.get("country")
-		})
-		global_defaults.save()
-		
-		accounts_settings = webnotes.bean("Accounts Settings")
-		accounts_settings.doc.auto_accounting_for_stock = 1
-		accounts_settings.save()
-
-		stock_settings = webnotes.bean("Stock Settings")
-		stock_settings.doc.item_naming_by = "Item Code"
-		stock_settings.doc.valuation_method = "FIFO"
-		stock_settings.doc.stock_uom = "Nos"
-		stock_settings.doc.auto_indent = 1
-		stock_settings.save()
-		
-		selling_settings = webnotes.bean("Selling Settings")
-		selling_settings.doc.cust_master_name = "Customer Name"
-		selling_settings.doc.so_required = "No"
-		selling_settings.doc.dn_required = "No"
-		selling_settings.save()
-
-		buying_settings = webnotes.bean("Buying Settings")
-		buying_settings.doc.supp_master_name = "Supplier Name"
-		buying_settings.doc.po_required = "No"
-		buying_settings.doc.pr_required = "No"
-		buying_settings.doc.maintain_same_rate = 1
-		buying_settings.save()
-
-		notification_control = webnotes.bean("Notification Control")
-		notification_control.doc.quotation = 1
-		notification_control.doc.sales_invoice = 1
-		notification_control.doc.purchase_order = 1
-		notification_control.save()
-
-		hr_settings = webnotes.bean("HR Settings")
-		hr_settings.doc.emp_created_by = "Naming Series"
-		hr_settings.save()
-
-		# control panel
-		cp = webnotes.doc("Control Panel", "Control Panel")
-		cp.company_name = args["company_name"]
-		cp.save()
-			
-	def create_feed_and_todo(self):
-		"""update activty feed and create todo for creation of item, customer, vendor"""
-		import home
-		home.make_feed('Comment', 'ToDo', '', webnotes.session['user'],
-			'<i>"' + 'Setup Complete. Please check your <a href="#!todo">\
-			To Do List</a>' + '"</i>', '#6B24B3')
-
-		d = Document('ToDo')
-		d.description = '<a href="#Setup">Complete ERPNext Setup</a>'
-		d.priority = 'High'
-		d.date = nowdate()
-		d.save(1)
-
-	def create_email_digest(self):
-		"""
-			create a default weekly email digest
-			* Weekly Digest
-			* For all companies
-			* Recipients: System Managers
-			* Full content
-			* Enabled by default
-		"""
-		import webnotes
-		companies_list = webnotes.conn.sql("SELECT company_name FROM `tabCompany`", as_list=1)
-
-		from webnotes.profile import get_system_managers
-		system_managers = get_system_managers()
-		if not system_managers: return
-		
-		from webnotes.model.doc import Document
-		for company in companies_list:
-			if company and company[0]:
-				edigest = webnotes.bean({
-					"doctype": "Email Digest",
-					"name": "Default Weekly Digest - " + company[0],
-					"company": company[0],
-					"frequency": "Weekly",
-					"recipient_list": "\n".join(system_managers)
-				})
-				
-				if webnotes.conn.sql("""select name from `tabEmail Digest` where name=%s""", edigest.doc.name):
-					continue
-				
-				for fieldname in edigest.meta.get_fieldnames({"fieldtype": "Check"}):
-					edigest.doc.fields[fieldname] = 1
-					
-				edigest.insert()
-		
-	# Get Fiscal year Details
-	# ------------------------
-	def get_fy_details(self, fy_start, last_year=False):
-		st = {'1st Jan':'01-01','1st Apr':'04-01','1st Jul':'07-01', '1st Oct': '10-01'}
-		if cint(getdate(nowdate()).month) < cint((st[fy_start].split('-'))[0]):
-			curr_year = getdate(nowdate()).year - 1
-		else:
-			curr_year = getdate(nowdate()).year
-		
-		if last_year:
-			curr_year = curr_year - 1
-		
-		stdt = cstr(curr_year)+'-'+cstr(st[fy_start])
-
-		if(fy_start == '1st Jan'):
-			fy = cstr(curr_year)
-			abbr = cstr(fy)[-2:]
-		else:
-			fy = cstr(curr_year) + '-' + cstr(curr_year+1)
-			abbr = cstr(curr_year)[-2:] + '-' + cstr(curr_year+1)[-2:]
-		return fy, stdt, abbr
-			
-	def create_profile(self, user_email, user_fname, user_lname, pwd=None):
-		pr = Document('Profile')
-		pr.first_name = user_fname
-		pr.last_name = user_lname
-		pr.name = pr.email = user_email
-		pr.enabled = 1
-		pr.save(1)
-		if pwd:
-			webnotes.conn.sql("""insert into __Auth (user, `password`) 
-				values (%s, password(%s)) 
-				on duplicate key update `password`=password(%s)""", 
-				(user_email, pwd, pwd))
-				
-		add_all_roles_to(pr.name)
-				
-def add_all_roles_to(name):
-	profile = webnotes.doc("Profile", name)
-	for role in webnotes.conn.sql("""select name from tabRole"""):
-		if role[0] not in ["Administrator", "Guest", "All", "Customer", "Supplier", "Partner"]:
-			d = profile.addchild("user_roles", "UserRole")
-			d.role = role[0]
-			d.insert()
-			
-def create_territories():
-	"""create two default territories, one for home country and one named Rest of the World"""
-	from setup.utils import get_root_of
-	country = webnotes.conn.get_value("Control Panel", None, "country")
-	root_territory = get_root_of("Territory")
-	for name in (country, "Rest Of The World"):
-		if name and not webnotes.conn.exists("Territory", name):
-			webnotes.bean({
-				"doctype": "Territory",
-				"territory_name": name.replace("'", ""),
-				"parent_territory": root_territory,
-				"is_group": "No"
-			}).insert()
-		
diff --git a/setup/doctype/setup_control/setup_control.txt b/setup/doctype/setup_control/setup_control.txt
deleted file mode 100644
index 7ebed3e..0000000
--- a/setup/doctype/setup_control/setup_control.txt
+++ /dev/null
@@ -1,24 +0,0 @@
-[
- {
-  "creation": "2012-03-27 14:36:25", 
-  "docstatus": 0, 
-  "modified": "2012-03-27 14:36:25", 
-  "modified_by": "Administrator", 
-  "owner": "Administrator"
- }, 
- {
-  "doctype": "DocType", 
-  "in_create": 1, 
-  "issingle": 1, 
-  "istable": 0, 
-  "module": "Setup", 
-  "name": "__common__", 
-  "read_only": 1, 
-  "section_style": "Simple", 
-  "version": 73
- }, 
- {
-  "doctype": "DocType", 
-  "name": "Setup Control"
- }
-]
\ No newline at end of file
diff --git a/setup/doctype/sms_parameter/sms_parameter.py b/setup/doctype/sms_parameter/sms_parameter.py
index 26d0f76..cb6190f 100644
--- a/setup/doctype/sms_parameter/sms_parameter.py
+++ b/setup/doctype/sms_parameter/sms_parameter.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 # License: GNU General Public License v3. See license.txt
 
 from __future__ import unicode_literals
diff --git a/setup/doctype/sms_settings/sms_settings.py b/setup/doctype/sms_settings/sms_settings.py
index 26d0f76..cb6190f 100644
--- a/setup/doctype/sms_settings/sms_settings.py
+++ b/setup/doctype/sms_settings/sms_settings.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 # License: GNU General Public License v3. See license.txt
 
 from __future__ import unicode_literals
diff --git a/setup/doctype/supplier_type/supplier_type.js b/setup/doctype/supplier_type/supplier_type.js
index b65f67c..851aff4 100644
--- a/setup/doctype/supplier_type/supplier_type.js
+++ b/setup/doctype/supplier_type/supplier_type.js
@@ -1,6 +1,6 @@
-// Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+// Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 // License: GNU General Public License v3. See license.txt
 
 cur_frm.cscript.refresh = function(doc) {
-	cur_frm.set_intro(doc.__islocal ? "" : "There is nothing to edit.")
+	cur_frm.set_intro(doc.__islocal ? "" : wn._("There is nothing to edit."))
 }
\ No newline at end of file
diff --git a/setup/doctype/supplier_type/supplier_type.py b/setup/doctype/supplier_type/supplier_type.py
index 8002652..576da8e 100644
--- a/setup/doctype/supplier_type/supplier_type.py
+++ b/setup/doctype/supplier_type/supplier_type.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 # License: GNU General Public License v3. See license.txt
 
 from __future__ import unicode_literals
diff --git a/setup/doctype/supplier_type/test_supplier_type.py b/setup/doctype/supplier_type/test_supplier_type.py
index cb6a8b7..eb49ef4 100644
--- a/setup/doctype/supplier_type/test_supplier_type.py
+++ b/setup/doctype/supplier_type/test_supplier_type.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 # License: GNU General Public License v3. See license.txt
 
 test_records = [
diff --git a/setup/doctype/target_detail/target_detail.py b/setup/doctype/target_detail/target_detail.py
index 26d0f76..cb6190f 100644
--- a/setup/doctype/target_detail/target_detail.py
+++ b/setup/doctype/target_detail/target_detail.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 # License: GNU General Public License v3. See license.txt
 
 from __future__ import unicode_literals
diff --git a/setup/doctype/target_detail/target_detail.txt b/setup/doctype/target_detail/target_detail.txt
index 5d22d88..71debd3 100644
--- a/setup/doctype/target_detail/target_detail.txt
+++ b/setup/doctype/target_detail/target_detail.txt
@@ -2,7 +2,7 @@
  {
   "creation": "2013-02-22 01:27:58", 
   "docstatus": 0, 
-  "modified": "2013-07-10 14:54:24", 
+  "modified": "2013-11-02 19:41:37", 
   "modified_by": "Administrator", 
   "owner": "Administrator"
  }, 
@@ -26,6 +26,7 @@
   "name": "Target Detail"
  }, 
  {
+  "description": "<a href=\"#Sales Browser/Item Group\">Add / Edit</a>", 
   "doctype": "DocField", 
   "fieldname": "item_group", 
   "fieldtype": "Link", 
diff --git a/setup/doctype/terms_and_conditions/terms_and_conditions.js b/setup/doctype/terms_and_conditions/terms_and_conditions.js
index e8c3c69..6271a16 100644
--- a/setup/doctype/terms_and_conditions/terms_and_conditions.js
+++ b/setup/doctype/terms_and_conditions/terms_and_conditions.js
@@ -1,4 +1,4 @@
-// Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+// Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 // License: GNU General Public License v3. See license.txt
 
  
diff --git a/setup/doctype/terms_and_conditions/terms_and_conditions.py b/setup/doctype/terms_and_conditions/terms_and_conditions.py
index 26d0f76..cb6190f 100644
--- a/setup/doctype/terms_and_conditions/terms_and_conditions.py
+++ b/setup/doctype/terms_and_conditions/terms_and_conditions.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 # License: GNU General Public License v3. See license.txt
 
 from __future__ import unicode_literals
diff --git a/setup/doctype/terms_and_conditions/test_terms_and_conditions.py b/setup/doctype/terms_and_conditions/test_terms_and_conditions.py
index 268e9e0..acebf79 100644
--- a/setup/doctype/terms_and_conditions/test_terms_and_conditions.py
+++ b/setup/doctype/terms_and_conditions/test_terms_and_conditions.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 # License: GNU General Public License v3. See license.txt
 
 test_records = [[{"title": "_Test Terms and Conditions", "terms": "_Test Terms"}]]
\ No newline at end of file
diff --git a/setup/doctype/territory/territory.js b/setup/doctype/territory/territory.js
index 7561816..18dbbb3 100644
--- a/setup/doctype/territory/territory.js
+++ b/setup/doctype/territory/territory.js
@@ -1,4 +1,4 @@
-// Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+// Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 // License: GNU General Public License v3. See license.txt
 
 cur_frm.cscript.refresh = function(doc, cdt, cdn) {
@@ -9,7 +9,7 @@
 	// read-only for root territory
 	if(!doc.parent_territory) {
 		cur_frm.perm = [[1,0,0], [1,0,0]];
-		cur_frm.set_intro("This is a root territory and cannot be edited.");
+		cur_frm.set_intro(wn._("This is a root territory and cannot be edited."));
 	} else {
 		cur_frm.set_intro(null);
 	}
diff --git a/setup/doctype/territory/territory.py b/setup/doctype/territory/territory.py
index 13498fc..baddd8b 100644
--- a/setup/doctype/territory/territory.py
+++ b/setup/doctype/territory/territory.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 # License: GNU General Public License v3. See license.txt
 
 from __future__ import unicode_literals
diff --git a/setup/doctype/territory/territory.txt b/setup/doctype/territory/territory.txt
index b647e7b..200f24f 100644
--- a/setup/doctype/territory/territory.txt
+++ b/setup/doctype/territory/territory.txt
@@ -2,7 +2,7 @@
  {
   "creation": "2013-01-10 16:34:24", 
   "docstatus": 0, 
-  "modified": "2013-08-05 18:12:29", 
+  "modified": "2013-11-02 16:59:08", 
   "modified_by": "Administrator", 
   "owner": "Administrator"
  }, 
@@ -64,6 +64,7 @@
   "reqd": 1
  }, 
  {
+  "description": "<a href=\"#Sales Browser/Territory\">Add / Edit</a>", 
   "doctype": "DocField", 
   "fieldname": "parent_territory", 
   "fieldtype": "Link", 
@@ -130,6 +131,7 @@
   "search_index": 1
  }, 
  {
+  "description": "<a href=\"#Sales Browser/Territory\">Add / Edit</a>", 
   "doctype": "DocField", 
   "fieldname": "old_parent", 
   "fieldtype": "Link", 
diff --git a/setup/doctype/territory/test_territory.py b/setup/doctype/territory/test_territory.py
index 1ebcc1e..54d99ed 100644
--- a/setup/doctype/territory/test_territory.py
+++ b/setup/doctype/territory/test_territory.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 # License: GNU General Public License v3. See license.txt
 
 test_records = [
diff --git a/setup/doctype/uom/test_uom.py b/setup/doctype/uom/test_uom.py
index 044cc11..2a7f2ee 100644
--- a/setup/doctype/uom/test_uom.py
+++ b/setup/doctype/uom/test_uom.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 # License: GNU General Public License v3. See license.txt
 
 test_records = [
diff --git a/setup/doctype/uom/uom.js b/setup/doctype/uom/uom.js
index e8c3c69..6271a16 100644
--- a/setup/doctype/uom/uom.js
+++ b/setup/doctype/uom/uom.js
@@ -1,4 +1,4 @@
-// Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+// Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 // License: GNU General Public License v3. See license.txt
 
  
diff --git a/setup/doctype/uom/uom.py b/setup/doctype/uom/uom.py
index 8002652..576da8e 100644
--- a/setup/doctype/uom/uom.py
+++ b/setup/doctype/uom/uom.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 # License: GNU General Public License v3. See license.txt
 
 from __future__ import unicode_literals
diff --git a/setup/doctype/uom/uom.txt b/setup/doctype/uom/uom.txt
index 6577f6c..51d9806 100644
--- a/setup/doctype/uom/uom.txt
+++ b/setup/doctype/uom/uom.txt
@@ -2,7 +2,7 @@
  {
   "creation": "2013-01-10 16:34:24", 
   "docstatus": 0, 
-  "modified": "2013-07-25 16:18:17", 
+  "modified": "2013-10-10 15:06:53", 
   "modified_by": "Administrator", 
   "owner": "Administrator"
  }, 
@@ -40,22 +40,6 @@
  }, 
  {
   "doctype": "DocField", 
-  "fieldname": "trash_reason", 
-  "fieldtype": "Small Text", 
-  "label": "Trash Reason", 
-  "oldfieldname": "trash_reason", 
-  "oldfieldtype": "Small Text", 
-  "read_only": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "uom_details", 
-  "fieldtype": "Section Break", 
-  "label": "UOM Details", 
-  "oldfieldtype": "Section Break"
- }, 
- {
-  "doctype": "DocField", 
   "fieldname": "uom_name", 
   "fieldtype": "Data", 
   "label": "UOM Name", 
diff --git a/setup/doctype/website_item_group/website_item_group.py b/setup/doctype/website_item_group/website_item_group.py
index 3256c80..eaa0f46 100644
--- a/setup/doctype/website_item_group/website_item_group.py
+++ b/setup/doctype/website_item_group/website_item_group.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 # MIT License. See license.txt
 
 # For license information, please see license.txt
diff --git a/setup/doctype/website_item_group/website_item_group.txt b/setup/doctype/website_item_group/website_item_group.txt
index 5753fcf..0a8a3aa 100644
--- a/setup/doctype/website_item_group/website_item_group.txt
+++ b/setup/doctype/website_item_group/website_item_group.txt
@@ -2,7 +2,7 @@
  {
   "creation": "2013-02-22 01:28:09", 
   "docstatus": 0, 
-  "modified": "2013-07-10 14:54:30", 
+  "modified": "2013-11-02 19:41:38", 
   "modified_by": "Administrator", 
   "owner": "Administrator"
  }, 
@@ -15,6 +15,7 @@
   "name": "__common__"
  }, 
  {
+  "description": "<a href=\"#Sales Browser/Item Group\">Add / Edit</a>", 
   "doctype": "DocField", 
   "fieldname": "item_group", 
   "fieldtype": "Link", 
diff --git a/setup/page/setup/setup.js b/setup/page/setup/setup.js
index f396186..fc6afb4 100644
--- a/setup/page/setup/setup.js
+++ b/setup/page/setup/setup.js
@@ -1,18 +1,18 @@
-// Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+// Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 // License: GNU General Public License v3. See license.txt
 
 wn.pages['Setup'].onload = function(wrapper) { 
 	if(msg_dialog && msg_dialog.display) msg_dialog.hide();
 	wn.ui.make_app_page({
 		parent: wrapper,
-		title: 'Setup',
+		title: wn._('Setup'),
 		single_column: true
 	});
 
 	wrapper.appframe.add_module_icon("Setup");
-	wrapper.appframe.add_button("Refresh", function() {
+	wrapper.appframe.set_title_right(wn._("Refresh"), function() {
 		wn.pages.Setup.make(wrapper);
-	}, "icon-refresh");
+	});
 	
 	wn.pages.Setup.make(wrapper);
 	
@@ -55,7 +55,7 @@
 						<a class="data-link">%(title)s</a></b>\
 					</div>', {
 						count: item.count,
-						title: wn._(item.title || item.doctype),
+						title: item.title || wn._(item.doctype),
 						icon: wn.boot.doctype_icons[item.doctype]
 					}))
 				.appendTo(row);
@@ -110,7 +110,7 @@
 			})
 					
 		} else if(item.single) {
-			$('<a class="view-link"><i class="icon-edit"></i> Edit</a>')
+			$('<a class="view-link"><i class="icon-edit"></i>'+wn._('Edit')+'</a>')
 				.appendTo($links)
 
 			$links.find(".view-link")
@@ -119,11 +119,11 @@
 					wn.set_route("Form", $(this).attr("data-doctype"));
 				})
 		} else if(item.type !== "Link"){
-			$('<a class="new-link"><i class="icon-plus"></i> New</a> \
+			$('<a class="new-link"><i class="icon-plus"></i>'+wn._('New')+'</a> \
 				<span class="text-muted">|</span> \
-				<a class="view-link"><i class="icon-list"></i> View</a> \
+				<a class="view-link"><i class="icon-list"></i>'+wn._('View')+'</a> \
 				<span class="text-muted">|</span> \
-				<a class="import-link"><i class="icon-upload"></i> Import</a>')
+				<a class="import-link"><i class="icon-upload"></i>'+wn._('Import')+'</a>')
 				.appendTo($links)
 
 			$links.find(".view-link")
@@ -180,11 +180,11 @@
 			if(r.message) {
 				body.empty();
 				if(wn.boot.expires_on) {
-					$(body).prepend("<div class='text-muted' style='text-align:right'>Account expires on "
+					$(body).prepend("<div class='text-muted' style='text-align:right'>"+wn._("Account expires on") 
 							+ wn.datetime.global_date_format(wn.boot.expires_on) + "</div>");
 				}
 
-				$completed = $('<h4>Setup Completed <span class="completed-percent"></span><h4>\
+				$completed = $('<h4>'+wn._("Setup Completed")+'<span class="completed-percent"></span><h4>\
 					<div class="progress"><div class="progress-bar"></div></div>')
 					.appendTo(body);
 
diff --git a/setup/page/setup/setup.py b/setup/page/setup/setup.py
index 1569ef0..4418f85 100644
--- a/setup/page/setup/setup.py
+++ b/setup/page/setup/setup.py
@@ -1,76 +1,77 @@
-# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 # License: GNU General Public License v3. See license.txt
 
 from __future__ import unicode_literals
 import webnotes
+from webnotes import _
 
 items = [
 	{
 		"type": "Section",
-		"title": "Organization",
+		"title": _("Organization"),
 		"icon": "icon-building"
 	},
-	{"doctype":"Company"}, 
-	{"doctype":"Fiscal Year"}, 
+	{"doctype":"Company"},
+	{"doctype":"Fiscal Year"},
 	{"doctype":"Currency", "filter": {"enabled": 1}},
 	{
 		"type": "Section",
-		"title": "Users and Permissions",
+		"title": _("Users and Permissions"),
 		"icon": "icon-user"
 	},
-	{ 
+	{
 		"doctype":"Profile",
-	}, 
-	{ 
+	},
+	{
 		"doctype":"Role",
-	}, 
-	{ "title": "Permission Manager", 
+	},
+	{ "title": _("Permission Manager"),
 		"route": "permission-manager", "type": "Link", "icon": "icon-shield" },
-	{ "title": "User Properties", 
+	{ "title": _("User Properties"),
 		"route": "user-properties", "type": "Link", "icon": "icon-user" },
 	{
 		"type": "Section",
-		"title": "Master Data",
+		"title": _("Master Data"),
 		"icon": "icon-star"
 	},
 	{
 		"doctype": "Item",
 		"dependencies": [
-			{"doctype":"Item Group", "tree": "Sales Browser"}, 
-			{"doctype":"Warehouse"}, 
-			{"doctype":"UOM"}, 
+			{"doctype":"Item Group", "tree": "Sales Browser"},
+			{"doctype":"Warehouse"},
+			{"doctype":"UOM"},
 			{"doctype":"Brand"},
-			{"doctype":"Price List"}, 
-			{"doctype": "Item Price"}, 
-			{ "title": "Stock Settings", 
+			{"doctype":"Price List"},
+			{"doctype": "Item Price"},
+			{ "title": _("Stock Settings"),
 				"route": "Form/Stock Settings", "type": "Link", "icon": "icon-cog" },
 		],
 	},
 	{
 		"doctype": "Customer",
 		"dependencies": [
-			{"doctype":"Customer Group", "tree": "Sales Browser"}, 
-			{"doctype":"Territory", "tree": "Sales Browser"}, 
-			{"doctype":"Sales Person", "tree": "Sales Browser"}, 
-			{"doctype":"Contact", "query": "select count(*) from `tabContact` where ifnull(customer, '')!=''"}, 
-			{"doctype":"Address", "query": "select count(*) from `tabAddress` where ifnull(customer, '')!=''"}, 
-			{ "title": "Selling Settings", 
+			{"doctype":"Customer Group", "tree": "Sales Browser"},
+			{"doctype":"Territory", "tree": "Sales Browser"},
+			{"doctype":"Sales Person", "tree": "Sales Browser"},
+			{"doctype":"Contact", "query": "select count(*) from `tabContact` where ifnull(customer, '')!=''"},
+			{"doctype":"Address", "query": "select count(*) from `tabAddress` where ifnull(customer, '')!=''"},
+			{ "title": _("Selling Settings"),
 				"route": "Form/Selling Settings", "type": "Link", "icon": "icon-cog" },
 		]
 	},
 	{
 		"doctype": "Supplier",
 		"dependencies": [
-			{"doctype":"Supplier Type"}, 
-			{"doctype":"Contact", "query": "select count(*) from `tabContact` where ifnull(supplier, '')!=''"}, 
-			{"doctype":"Address", "query": "select count(*) from `tabAddress` where ifnull(supplier, '')!=''"}, 
-			{ "title": "Buying Settings", 
+			{"doctype":"Supplier Type"},
+			{"doctype":"Contact", "query": "select count(*) from `tabContact` where ifnull(supplier, '')!=''"},
+			{"doctype":"Address", "query": "select count(*) from `tabAddress` where ifnull(supplier, '')!=''"},
+			{ "title": _("Buying Settings"),
 				"route": "Form/Buying Settings", "type": "Link", "icon": "icon-cog" },
 		]
 	},
 	{
 		"type": "Section",
-		"title": "Accounts",
+		"title": _("Accounts"),
 		"icon": "icon-money"
 	},
 	{
@@ -78,18 +79,18 @@
 		"tree": "Accounts Browser",
 		"dependencies": [
 			{
-				"title": "Bank Accounts",
+				"title": _("Bank Accounts"),
 				"doctype":"Account",
 				"filter": {"account_type": "Bank or Cash"}
-			}, 
+			},
 			{
-				"title": "Tax Accounts",
+				"title": _("Tax Accounts"),
 				"doctype":"Account",
 				"filter": {"account_type": "Tax"}
 			},
 		]
 	},
-	{ 
+	{
 		"doctype": "Cost Center",
 		"tree": "Accounts Browser",
 	},
@@ -97,27 +98,27 @@
 	{ "doctype": "Purchase Taxes and Charges Master" },
 	{ "doctype": "Shipping Rule" },
 	{ "doctype": "Currency Exchange" },
-	{ "title": "Accounts Settings", 
+	{ "title": _("Accounts Settings"),
 		"route": "Form/Accounts Settings", "type": "Link", "icon": "icon-cog" },
 	{
 		"type": "Section",
-		"title": "Opening Accounts and Stock",
+		"title": _("Opening Accounts and Stock"),
 		"icon": "icon-eye-open"
 	},
 	{ "doctype": "Stock Reconciliation" },
-	{ 
+	{
 		"doctype": "Journal Voucher",
-		"title": "Opening Accounting Entries",
+		"title": _("Opening Accounting Entries"),
 		"filter": {
 			"is_opening": "Yes"
 		}
 	},
 	{
 		"type": "Section",
-		"title": "Human Resource",
+		"title": _("Human Resource"),
 		"icon": "icon-group"
 	},
-	{ 
+	{
 		"doctype": "Employee",
 		"dependencies": [
 			{ "doctype": "Employment Type" },
@@ -133,7 +134,7 @@
 	{ "doctype": "Appraisal Template" },
 	{
 		"type": "Section",
-		"title": "Printing",
+		"title": _("Printing"),
 		"icon": "icon-print"
 	},
 	{ "doctype": "Terms and Conditions" },
@@ -142,40 +143,40 @@
 	{ "doctype": "Print Format", "filter": {"standard": "No"} },
 	{
 		"type": "Section",
-		"title": "Email",
+		"title": _("Email"),
 		"icon": "icon-envelope-alt"
 	},
-	{ 
-		"title": "Outgoing Email Settings",
+	{
+		"title": _("Outgoing Email Settings"),
 		"doctype": "Email Settings",
 		"single": 1,
 		"query": "select count(*) from tabSingles where doctype='Email Settings' and field='outgoing_mail_server'"
 	},
-	{ 
-		"title": "Support Email Settings",
+	{
+		"title": _("Support Email Settings"),
 		"doctype": "Email Settings",
 		"single": 1,
 		"query": "select count(*) from tabSingles where doctype='Email Settings' and field='support_host'"
 	},
-	{ 
+	{
 		"doctype": "Sales Email Settings",
 		"single": 1,
 		"query": "select count(*) from tabSingles where doctype='Sales Email Settings' and field='host'"
 	},
-	{ 
+	{
 		"doctype": "Jobs Email Settings",
 		"single": 1,
 		"query": "select count(*) from tabSingles where doctype='Jobs Email Settings' and field='host'"
 	},
-	{ 
+	{
 		"doctype": "Email Digest",
 	},
 	{
 		"type": "Section",
-		"title": "Customization",
+		"title": _("Customization"),
 		"icon": "icon-glass"
 	},
-	{ 
+	{
 		"doctype": "Customize Form",
 		"single": 1,
 		"query": "select count(distinct doc_type) from `tabProperty Setter`"
@@ -186,51 +187,49 @@
 	{ "doctype": "Custom Script" },
 	{
 		"type": "Section",
-		"title": "Tools",
+		"title": _("Tools"),
 		"icon": "icon-wrench"
 	},
-	{ "title": "Global Settings / Default Values", 
+	{ "title": _("Global Settings / Default Values"),
 		"doctype": "Global Defaults", "single": 1,
-	 	"query": """select count(*) from tabSingles where doctype='Global Defaults' 
+	 	"query": """select count(*) from tabSingles where doctype='Global Defaults'
 		and field not in ('owner', 'creation', 'modified', 'modified_by')"""},
-		
-	{ "title": "Show / Hide Features", 
+	
+	{ "title": _("Show / Hide Features"),
 		"doctype": "Features Setup", "single": 1,
-	 	"query": """select count(*) from tabSingles where doctype='Features Setup' 
+	 	"query": """select count(*) from tabSingles where doctype='Features Setup'
 		and field not in ('owner', 'creation', 'modified', 'modified_by')"""},
-
-	{ "title": "Enable / Disable Email Notifications", 
+	
+	{ "title": _("Enable / Disable Email Notifications"),
 		"doctype": "Notification Control", "single": 1,
-	 	"query": """select count(*) from tabSingles where doctype='Notification Control' 
+	 	"query": """select count(*) from tabSingles where doctype='Notification Control'
 		and field in ('quotation', 'sales_order', 'sales_invoice', 'purchase_order', 'purchase_receipt', 'expense_claim', 'delivery_note')"""},
-
-	{ "doctype": "File Data", "title": "Uploaded File Attachments" },
-	{ 
-		"doctype": "SMS Settings", 
+	
+	{ "doctype": "File Data", "title": _("Uploaded File Attachments") },
+	{
+		"doctype": "SMS Settings",
 		"single": 1,
 	 	"query": "select count(*) from tabSingles where doctype='SMS Settings' and field='sms_gateway_url'"
 	},
-
-	{ "title": "Data Import", 
+	
+	{ "title": _("Data Import"),
 		"route": "data-import-tool", "type": "Link", "icon": "icon-upload" },
-	{ "title": "Bulk Rename", 
+	{ "title": _("Bulk Rename"),
 		"route": "Form/Rename Tool", "type": "Link", "icon": "icon-upload" },
-	{ "title": "Update Numbering Series", 
+	{ "title": _("Update Numbering Series"),
 		"route": "Form/Naming Series", "type": "Link", "icon": "icon-sort-by-order" },
-	{ "title": "Show / Hide Modules", 
+	{ "title": _("Show / Hide Modules"),
 		"route": "modules_setup", "type": "Link", "icon": "icon-th" },
-	{ "title": "Send Bulk SMS to Leads / Contacts", 
+	{ "title": _("Send Bulk SMS to Leads / Contacts"),
 		"route": "Form/SMS Center", "type": "Link", "icon": "icon-mobile-phone" },
 	{
 		"type": "Section",
-		"title": "System Administration",
+		"title": _("System Administration"),
 		"icon": "icon-cog"
 	},
-	{ "title": "Update ERPNext", 
-		"route": "update-manager", "type": "Link", "icon": "icon-rss" },
-	{ "title": "Manage 3rd Party Backups", 
+	{ "title": _("Manage 3rd Party Backups"),
 		"route": "Form/Backup Manager", "type": "Link", "icon": "icon-cloud" },
-	{ "title": "System Scheduler Errors", 
+	{ "title": _("System Scheduler Errors"),
 		"route": "Report/Scheduler Log", "type": "Link", "icon": "icon-exclamation-sign" },
 ]
 
@@ -244,9 +243,9 @@
 		if item.get("dependencies"):
 			for d in item["dependencies"]:
 				set_count(d)
-		
-	return items
 	
+	return items
+
 def set_count(item):
 	if "query" in item:
 		item["count"] = webnotes.conn.sql(item["query"])[0][0]
diff --git a/patches/november_2013/__init__.py b/setup/page/setup_wizard/__init__.py
similarity index 100%
copy from patches/november_2013/__init__.py
copy to setup/page/setup_wizard/__init__.py
diff --git a/setup/page/setup_wizard/setup_wizard.css b/setup/page/setup_wizard/setup_wizard.css
new file mode 100644
index 0000000..386715f
--- /dev/null
+++ b/setup/page/setup_wizard/setup_wizard.css
@@ -0,0 +1,12 @@
+#page-setup-wizard .panel {
+	background-color: #fff;
+	position: fixed; top:0; left: 0; width:100%; height:100%;
+	overflow: auto;
+}
+
+#page-setup-wizard .panel-body {
+}
+
+#page-setup-wizard .col-md-6 .control-input .btn {
+	width: 100%;
+}
diff --git a/setup/page/setup_wizard/setup_wizard.js b/setup/page/setup_wizard/setup_wizard.js
new file mode 100644
index 0000000..a706194
--- /dev/null
+++ b/setup/page/setup_wizard/setup_wizard.js
@@ -0,0 +1,498 @@
+wn.pages['setup-wizard'].onload = function(wrapper) { 
+	if(sys_defaults.company) {
+		wn.set_route("desktop");
+		return;
+	}
+	$(".navbar:first").toggle(false);
+	$("body").css({"padding-top":"30px"});
+	
+	erpnext.wiz = new wn.wiz.Wizard({
+		page_name: "setup-wizard",
+		parent: wrapper,
+		on_complete: function(wiz) {
+			var values = wiz.get_values();
+			wiz.show_working();
+			wn.call({
+				method: "setup.page.setup_wizard.setup_wizard.setup_account",
+				args: values,
+				callback: function(r) {
+					if(r.exc) {
+						var d = msgprint(wn._("There were errors."));
+						d.custom_onhide = function() {
+							wn.set_route(erpnext.wiz.page_name, "0");
+						}
+					} else {
+						wiz.show_complete();
+						setTimeout(function() {
+							if(user==="Administrator") {
+								msgprint(wn._("Login with your new User ID") + ":" + values.email);
+								setTimeout(function() {
+									wn.app.logout();
+								}, 2000);
+							} else {
+								window.location = "app.html";
+							}
+						}, 2000);
+					}
+				}
+			})
+		},
+		title: wn._("ERPNext Setup Guide"),
+		welcome_html: '<h1 class="text-muted text-center"><i class="icon-magic"></i></h1>\
+			<h2 class="text-center">'+wn._('ERPNext Setup')+'</h2>\
+			<p class="text-center">' + 
+			wn._('Welcome to ERPNext. Over the next few minutes we will help you setup your ERPNext account. Try and fill in as much information as you have even if it takes a bit longer. It will save you a lot of time later. Good Luck!') + 
+			'</p>',
+		working_html: '<h3 class="text-muted text-center"><i class="icon-refresh icon-spin"></i></h3>\
+			<h2 class="text-center">'+wn._('Setting up...')+'</h2>\
+			<p class="text-center">' + 
+			wn._('Sit tight while your system is being setup. This may take a few moments.') + 
+			'</p>',
+		complete_html: '<h1 class="text-muted text-center"><i class="icon-thumbs-up"></i></h1>\
+			<h2 class="text-center">'+wn._('Setup Complete!')+'</h2>\
+			<p class="text-center">' + 
+			wn._('Your setup is complete. Refreshing...') + 
+			'</p>',
+		slides: [
+			// User
+			{
+				title: wn._("The First User: You"),
+				icon: "icon-user",
+				fields: [
+					{"fieldname": "first_name", "label": wn._("First Name"), "fieldtype": "Data", reqd:1},
+					{"fieldname": "last_name", "label": wn._("Last Name"), "fieldtype": "Data", reqd:1},
+					{"fieldname": "email", "label": wn._("Email Id"), "fieldtype": "Data", reqd:1, "description":"Your Login Id"},
+					{"fieldname": "password", "label": wn._("Password"), "fieldtype": "Password", reqd:1},
+					{fieldtype:"Attach Image", fieldname:"attach_profile", label:"Attach Your Profile..."},
+				],
+				help: wn._('The first user will become the System Manager (you can change that later).'),
+				onload: function(slide) {
+					if(user!=="Administrator") {
+						slide.form.fields_dict.password.$wrapper.toggle(false);
+						slide.form.fields_dict.email.$wrapper.toggle(false);
+						slide.form.fields_dict.first_name.set_input(wn.boot.profile.first_name);
+						slide.form.fields_dict.last_name.set_input(wn.boot.profile.last_name);
+						
+						delete slide.form.fields_dict.email;
+						delete slide.form.fields_dict.password;
+					}
+				}
+			},
+			
+			// Organization
+			{
+				title: wn._("The Organization"),
+				icon: "icon-building",
+				fields: [
+					{fieldname:'company_name', label: wn._('Company Name'), fieldtype:'Data', reqd:1,
+						placeholder: 'e.g. "My Company LLC"'},
+					{fieldname:'company_abbr', label: wn._('Company Abbreviation'), fieldtype:'Data',
+						placeholder:'e.g. "MC"',reqd:1},
+					{fieldname:'fy_start', label:'Financial Year Start Date', fieldtype:'Select',
+						description:'Your financial year begins on', reqd:1,
+						options: ['', '1st Jan', '1st Apr', '1st Jul', '1st Oct'] },
+					{fieldname:'company_tagline', label: wn._('What does it do?'), fieldtype:'Data',
+						placeholder:'e.g. "Build tools for builders"', reqd:1},
+				],
+				help: wn._('The name of your company for which you are setting up this system.'),
+				onload: function(slide) {
+					slide.get_input("company_name").on("change", function() {
+						var parts = slide.get_input("company_name").val().split(" ");
+						var abbr = $.map(parts, function(p) { return p ? p.substr(0,1) : null }).join("");
+						slide.get_input("company_abbr").val(abbr.toUpperCase());
+					}).val(wn.boot.control_panel.company_name || "").trigger("change");
+				}
+			},
+			
+			// Country
+			{
+				title: wn._("Country, Timezone and Currency"),
+				icon: "icon-flag",
+				fields: [
+					{fieldname:'country', label: wn._('Country'), reqd:1,
+						options: "", fieldtype: 'Select'},
+					{fieldname:'currency', label: wn._('Default Currency'), reqd:1,
+						options: "", fieldtype: 'Select'},
+					{fieldname:'timezone', label: wn._('Time Zone'), reqd:1,
+						options: "", fieldtype: 'Select'},
+				],
+				help: wn._('Select your home country and check the timezone and currency.'),
+				onload: function(slide, form) {
+					wn.call({
+						method:"webnotes.country_info.get_country_timezone_info",
+						callback: function(data) {
+							erpnext.country_info = data.message.country_info;
+							erpnext.all_timezones = data.message.all_timezones;
+							slide.get_input("country").empty()
+								.add_options([""].concat(keys(erpnext.country_info).sort()));
+							slide.get_input("currency").empty()
+								.add_options(wn.utils.unique([""].concat($.map(erpnext.country_info, 
+									function(opts, country) { return opts.currency; }))).sort());
+							slide.get_input("timezone").empty()
+								.add_options([""].concat(erpnext.all_timezones));
+						}
+					})
+				
+					slide.get_input("country").on("change", function() {
+						var country = slide.get_input("country").val();
+						var $timezone = slide.get_input("timezone");
+						$timezone.empty();
+						// add country specific timezones first
+						if(country){
+							var timezone_list = erpnext.country_info[country].timezones || [];
+							$timezone.add_options(timezone_list.sort());
+							slide.get_input("currency").val(erpnext.country_info[country].currency);
+						}
+						// add all timezones at the end, so that user has the option to change it to any timezone
+						$timezone.add_options([""].concat(erpnext.all_timezones));
+			
+					});
+				}
+			},
+			
+			// Logo
+			{
+				icon: "icon-bookmark",
+				title: wn._("Logo and Letter Heads"),
+				help: wn._('Upload your letter head and logo - you can edit them later.'),
+				fields: [
+					{fieldtype:"Attach Image", fieldname:"attach_letterhead", label:"Attach Letterhead..."},
+					{fieldtype:"Attach Image", fieldname:"attach_logo", label:"Attach Logo..."},
+				],
+			},
+			
+			// Taxes
+			{
+				icon: "icon-money",
+				"title": wn._("Add Taxes"),
+				"help": wn._("List your tax heads (e.g. VAT, Excise) (upto 3) and their standard rates. This will create a standard template, you can edit and add more later."),
+				"fields": [
+					{fieldtype:"Data", fieldname:"tax_1", label:"Tax 1", placeholder:"e.g. VAT"},
+					{fieldtype:"Column Break"},
+					{fieldtype:"Data", fieldname:"tax_rate_1", label:"Rate (%)", placeholder:"e.g. 5"},
+					{fieldtype:"Section Break"},
+					{fieldtype:"Data", fieldname:"tax_2", label:"Tax 2", placeholder:"e.g. Customs Duty"},
+					{fieldtype:"Column Break"},
+					{fieldtype:"Data", fieldname:"tax_rate_2", label:"Rate (%)", placeholder:"e.g. 5"},
+					{fieldtype:"Section Break"},
+					{fieldtype:"Data", fieldname:"tax_3", label:"Tax 3", placeholder:"e.g. Excise"},
+					{fieldtype:"Column Break"},
+					{fieldtype:"Data", fieldname:"tax_rate_3", label:"Rate (%)", placeholder:"e.g. 5"},
+				],
+			},
+
+			// Customers
+			{
+				icon: "icon-group",
+				"title": wn._("Your Customers"),
+				"help": wn._("List a few of your customers. They could be organizations or individuals."),
+				"fields": [
+					{fieldtype:"Data", fieldname:"customer_1", label:"Customer 1", placeholder:"Customer Name"},
+					{fieldtype:"Column Break"},
+					{fieldtype:"Data", fieldname:"customer_contact_1", label:"", placeholder:"Contact Name"},
+					{fieldtype:"Section Break"},
+					{fieldtype:"Data", fieldname:"customer_2", label:"Customer 2", placeholder:"Customer Name"},
+					{fieldtype:"Column Break"},
+					{fieldtype:"Data", fieldname:"customer_contact_2", label:"", placeholder:"Contact Name"},
+					{fieldtype:"Section Break"},
+					{fieldtype:"Data", fieldname:"customer_3", label:"Customer 3", placeholder:"Customer Name"},
+					{fieldtype:"Column Break"},
+					{fieldtype:"Data", fieldname:"customer_contact_3", label:"", placeholder:"Contact Name"},
+					{fieldtype:"Section Break"},
+					{fieldtype:"Data", fieldname:"customer_4", label:"Customer 4", placeholder:"Customer Name"},
+					{fieldtype:"Column Break"},
+					{fieldtype:"Data", fieldname:"customer_contact_4", label:"", placeholder:"Contact Name"},
+					{fieldtype:"Section Break"},
+					{fieldtype:"Data", fieldname:"customer_5", label:"Customer 5", placeholder:"Customer Name"},
+					{fieldtype:"Column Break"},
+					{fieldtype:"Data", fieldname:"customer_contact_5", label:"", placeholder:"Contact Name"},
+				],
+			},
+			
+			// Items to Sell
+			{
+				icon: "icon-barcode",
+				"title": wn._("Your Products or Services"),
+				"help": wn._("List your products or services that you sell to your customers. Make sure to check the Item Group, Unit of Measure and other properties when you start."),
+				"fields": [
+					{fieldtype:"Data", fieldname:"item_1", label:"Item 1", placeholder:"A Product or Service"},
+					{fieldtype:"Column Break"},
+					{fieldtype:"Attach", fieldname:"item_img_1", label:"Attach Image..."},
+					{fieldtype:"Section Break"},
+					{fieldtype:"Column Break"},
+					{fieldtype:"Select", fieldname:"item_group_1", options:["Products", "Services", "Raw Material", "Sub Assemblies"]},
+					{fieldtype:"Column Break"},
+					{fieldtype:"Select", fieldname:"item_uom_1", options:["Unit", "Nos", "Box", "Pair", "Kg", "Set", "Hour", "Minute"]},
+					{fieldtype:"Section Break"},
+					{fieldtype:"Data", fieldname:"item_2", label:"Item 2", placeholder:"A Product or Service"},
+					{fieldtype:"Column Break"},
+					{fieldtype:"Attach", fieldname:"item_img_2", label:"Attach Image..."},
+					{fieldtype:"Section Break"},
+					{fieldtype:"Column Break"},
+					{fieldtype:"Select", fieldname:"item_group_2", options:["Products", "Services", "Raw Material", "Sub Assemblies"]},
+					{fieldtype:"Column Break"},
+					{fieldtype:"Select", fieldname:"item_uom_2", options:["Unit", "Nos", "Box", "Pair", "Kg", "Set", "Hour", "Minute"]},
+					{fieldtype:"Section Break"},
+					{fieldtype:"Data", fieldname:"item_3", label:"Item 3", placeholder:"A Product or Service"},
+					{fieldtype:"Column Break"},
+					{fieldtype:"Attach", fieldname:"item_img_3", label:"Attach Image..."},
+					{fieldtype:"Section Break"},
+					{fieldtype:"Column Break"},
+					{fieldtype:"Select", fieldname:"item_group_3", options:["Products", "Services", "Raw Material", "Sub Assemblies"]},
+					{fieldtype:"Column Break"},
+					{fieldtype:"Select", fieldname:"item_uom_3", options:["Unit", "Nos", "Box", "Pair", "Kg", "Set", "Hour", "Minute"]},
+					{fieldtype:"Section Break"},
+					{fieldtype:"Data", fieldname:"item_4", label:"Item 4", placeholder:"A Product or Service"},
+					{fieldtype:"Column Break"},
+					{fieldtype:"Attach", fieldname:"item_img_4", label:"Attach Image..."},
+					{fieldtype:"Section Break"},
+					{fieldtype:"Column Break"},
+					{fieldtype:"Select", fieldname:"item_group_4", options:["Products", "Services", "Raw Material", "Sub Assemblies"]},
+					{fieldtype:"Column Break"},
+					{fieldtype:"Select", fieldname:"item_uom_4", options:["Unit", "Nos", "Box", "Pair", "Kg", "Set", "Hour", "Minute"]},
+					{fieldtype:"Section Break"},
+					{fieldtype:"Data", fieldname:"item_5", label:"Item 5", placeholder:"A Product or Service"},
+					{fieldtype:"Column Break"},
+					{fieldtype:"Attach", fieldname:"item_img_5", label:"Attach Image..."},
+					{fieldtype:"Section Break"},
+					{fieldtype:"Column Break"},
+					{fieldtype:"Select", fieldname:"item_group_5", options:["Products", "Services", "Raw Material", "Sub Assemblies"]},
+					{fieldtype:"Column Break"},
+					{fieldtype:"Select", fieldname:"item_uom_5", options:["Unit", "Nos", "Box", "Pair", "Kg", "Set", "Hour", "Minute"]},
+				],
+			},
+
+			// Suppliers
+			{
+				icon: "icon-group",
+				"title": wn._("Your Suppliers"),
+				"help": wn._("List a few of your suppliers. They could be organizations or individuals."),
+				"fields": [
+					{fieldtype:"Data", fieldname:"supplier_1", label:"Supplier 1", placeholder:"Supplier Name"},
+					{fieldtype:"Column Break"},
+					{fieldtype:"Data", fieldname:"supplier_contact_1", label:"", placeholder:"Contact Name"},
+					{fieldtype:"Section Break"},
+					{fieldtype:"Data", fieldname:"supplier_2", label:"Supplier 2", placeholder:"Supplier Name"},
+					{fieldtype:"Column Break"},
+					{fieldtype:"Data", fieldname:"supplier_contact_2", label:"", placeholder:"Contact Name"},
+					{fieldtype:"Section Break"},
+					{fieldtype:"Data", fieldname:"supplier_3", label:"Supplier 3", placeholder:"Supplier Name"},
+					{fieldtype:"Column Break"},
+					{fieldtype:"Data", fieldname:"supplier_contact_3", label:"", placeholder:"Contact Name"},
+					{fieldtype:"Section Break"},
+					{fieldtype:"Data", fieldname:"supplier_4", label:"Supplier 4", placeholder:"Supplier Name"},
+					{fieldtype:"Column Break"},
+					{fieldtype:"Data", fieldname:"supplier_contact_4", label:"", placeholder:"Contact Name"},
+					{fieldtype:"Section Break"},
+					{fieldtype:"Data", fieldname:"supplier_5", label:"Supplier 5", placeholder:"Supplier Name"},
+					{fieldtype:"Column Break"},
+					{fieldtype:"Data", fieldname:"supplier_contact_5", label:"", placeholder:"Contact Name"},
+				],
+			},
+
+			// Items to Buy
+			{
+				icon: "icon-barcode",
+				"title": wn._("Products or Services You Buy"),
+				"help": wn._("List a few products or services you buy from your suppliers or vendors. If these are same as your products, then do not add them."),
+				"fields": [
+					{fieldtype:"Data", fieldname:"item_buy_1", label:"Item 1", placeholder:"A Product or Service"},
+					{fieldtype:"Column Break"},
+					{fieldtype:"Section Break"},
+					{fieldtype:"Column Break"},
+					{fieldtype:"Select", fieldname:"item_buy_group_1", options:["Raw Material", "Consumable", "Sub Assemblies", "Services", "Products"]},
+					{fieldtype:"Column Break"},
+					{fieldtype:"Select", fieldname:"item_buy_uom_1", options:["Unit", "Nos", "Box", "Pair", "Kg", "Set", "Hour", "Minute"]},
+					{fieldtype:"Section Break"},
+					{fieldtype:"Data", fieldname:"item_buy_2", label:"Item 2", placeholder:"A Product or Service"},
+					{fieldtype:"Column Break"},
+					{fieldtype:"Section Break"},
+					{fieldtype:"Column Break"},
+					{fieldtype:"Select", fieldname:"item_buy_group_2", options:["Raw Material", "Consumable", "Sub Assemblies", "Services", "Products"]},
+					{fieldtype:"Column Break"},
+					{fieldtype:"Select", fieldname:"item_buy_uom_2", options:["Unit", "Nos", "Box", "Pair", "Kg", "Set", "Hour", "Minute"]},
+					{fieldtype:"Section Break"},
+					{fieldtype:"Data", fieldname:"item_buy_3", label:"Item 3", placeholder:"A Product or Service"},
+					{fieldtype:"Column Break"},
+					{fieldtype:"Section Break"},
+					{fieldtype:"Column Break"},
+					{fieldtype:"Select", fieldname:"item_buy_group_3", options:["Raw Material", "Consumable", "Sub Assemblies", "Services", "Products"]},
+					{fieldtype:"Column Break"},
+					{fieldtype:"Select", fieldname:"item_buy_uom_3", options:["Unit", "Nos", "Box", "Pair", "Kg", "Set", "Hour", "Minute"]},
+					{fieldtype:"Section Break"},
+					{fieldtype:"Data", fieldname:"item_buy_4", label:"Item 4", placeholder:"A Product or Service"},
+					{fieldtype:"Column Break"},
+					{fieldtype:"Section Break"},
+					{fieldtype:"Column Break"},
+					{fieldtype:"Select", fieldname:"item_buy_group_4", options:["Raw Material", "Consumable", "Sub Assemblies", "Services", "Products"]},
+					{fieldtype:"Column Break"},
+					{fieldtype:"Select", fieldname:"item_buy_uom_4", options:["Unit", "Nos", "Box", "Pair", "Kg", "Set", "Hour", "Minute"]},
+					{fieldtype:"Section Break"},
+					{fieldtype:"Data", fieldname:"item_buy_5", label:"Item 5", placeholder:"A Product or Service"},
+					{fieldtype:"Column Break"},
+					{fieldtype:"Section Break"},
+					{fieldtype:"Column Break"},
+					{fieldtype:"Select", fieldname:"item_buy_group_5", options:["Raw Material", "Consumable", "Sub Assemblies", "Services", "Products"]},
+					{fieldtype:"Column Break"},
+					{fieldtype:"Select", fieldname:"item_buy_uom_5", options:["Unit", "Nos", "Box", "Pair", "Kg", "Set", "Hour", "Minute"]},
+				],
+			},
+
+		]
+		
+	})
+}
+
+wn.pages['setup-wizard'].onshow = function(wrapper) {
+	if(wn.get_route()[1])
+		erpnext.wiz.show(wn.get_route()[1]);
+}
+
+wn.provide("wn.wiz");
+
+wn.wiz.Wizard = Class.extend({
+	init: function(opts) {
+		$.extend(this, opts);
+		this.slides = this.slides;
+		this.slide_dict = {};
+		this.show_welcome();
+	},
+	get_message: function(html) {
+		return $(repl('<div class="panel panel-default">\
+			<div class="panel-body" style="padding: 40px;">%(html)s</div>\
+		</div>', {html:html}))
+	},
+	show_welcome: function() {
+		if(this.$welcome) 
+			return;
+		var me = this;
+		this.$welcome = this.get_message(this.welcome_html + 
+			'<br><p class="text-center"><button class="btn btn-primary">'+wn._("Start")+'</button></p>')
+			.appendTo(this.parent);
+		
+		this.$welcome.find(".btn").click(function() {
+			me.$welcome.toggle(false);
+			me.welcomed = true;
+			wn.set_route(me.page_name, "0");
+		})
+		
+		this.current_slide = {"$wrapper": this.$welcome};
+	},
+	show_working: function() {
+		this.hide_current_slide();
+		wn.set_route(this.page_name);
+		this.current_slide = {"$wrapper": this.get_message(this.working_html).appendTo(this.parent)};
+	},
+	show_complete: function() {
+		this.hide_current_slide();
+		this.current_slide = {"$wrapper": this.get_message(this.complete_html).appendTo(this.parent)};
+	},
+	show: function(id) {
+		if(!this.welcomed) {
+			wn.set_route(this.page_name);
+			return;
+		}
+		id = cint(id);
+		if(this.current_slide && this.current_slide.id===id) 
+			return;
+		if(!this.slide_dict[id]) {
+			this.slide_dict[id] = new wn.wiz.WizardSlide($.extend(this.slides[id], {wiz:this, id:id}));
+			this.slide_dict[id].make();
+		}
+		
+		this.hide_current_slide();
+		
+		this.current_slide = this.slide_dict[id];
+		this.current_slide.$wrapper.toggle(true);
+	},
+	hide_current_slide: function() {
+		if(this.current_slide) {
+			this.current_slide.$wrapper.toggle(false);
+			this.current_slide = null;
+		}
+	},
+	get_values: function() {
+		var values = {};
+		$.each(this.slide_dict, function(id, slide) {
+			$.extend(values, slide.values)
+		})
+		return values;
+	}
+});
+
+wn.wiz.WizardSlide = Class.extend({
+	init: function(opts) {
+		$.extend(this, opts);
+	},
+	make: function() {
+		var me = this;
+		this.$wrapper = $(repl('<div class="panel panel-default">\
+			<div class="panel-heading"><div class="panel-title">%(main_title)s: Step %(step)s</div></div>\
+			<div class="panel-body">\
+				<div class="progress">\
+					<div class="progress-bar" style="width: %(width)s%"></div>\
+				</div>\
+				<br>\
+				<div class="row">\
+					<div class="col-sm-8 form"></div>\
+					<div class="col-sm-4 help">\
+						<h3 style="margin-top: 0px"><i class="%(icon)s text-muted"></i> %(title)s</h3><br>\
+						<p class="text-muted">%(help)s</p>\
+					</div>\
+				</div>\
+				<hr>\
+				<div class="footer"></div>\
+			</div>\
+		</div>', {help:this.help, title:this.title, main_title:this.wiz.title, step: this.id + 1,
+				width: (flt(this.id + 1) / (this.wiz.slides.length+1)) * 100, icon:this.icon}))
+			.appendTo(this.wiz.parent);
+		
+		this.body = this.$wrapper.find(".form")[0];
+		
+		if(this.fields) {
+			this.form = new wn.ui.FieldGroup({
+				fields: this.fields,
+				body: this.body,
+				no_submit_on_enter: true
+			});
+			this.form.make();
+		} else {
+			$(this.body).html(this.html)
+		}
+		
+		if(this.id > 0) {
+			this.$prev = $("<button class='btn btn-default'>Previous</button>")
+				.click(function() { 
+					wn.set_route(me.wiz.page_name, me.id-1 + ""); 
+				})
+				.appendTo(this.$wrapper.find(".footer"))
+				.css({"margin-right": "5px"});
+			}
+		if(this.id+1 < this.wiz.slides.length) {
+			this.$next = $("<button class='btn btn-primary'>Next</button>")
+				.click(function() { 
+					me.values = me.form.get_values();
+					if(me.values===null) 
+						return;
+					wn.set_route(me.wiz.page_name, me.id+1 + ""); 
+				})
+				.appendTo(this.$wrapper.find(".footer"));
+		} else {
+			this.$complete = $("<button class='btn btn-primary'>Complete Setup</button>")
+				.click(function() { 
+					me.values = me.form.get_values();
+					if(me.values===null) 
+						return;
+					me.wiz.on_complete(me.wiz); 
+				}).appendTo(this.$wrapper.find(".footer"));
+		}
+		
+		if(this.onload) {
+			this.onload(this);
+		}
+
+	},
+	get_input: function(fn) {
+		return this.form.get_input(fn);
+	}
+})
\ No newline at end of file
diff --git a/setup/page/setup_wizard/setup_wizard.py b/setup/page/setup_wizard/setup_wizard.py
new file mode 100644
index 0000000..bdf95de
--- /dev/null
+++ b/setup/page/setup_wizard/setup_wizard.py
@@ -0,0 +1,354 @@
+# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
+# License: GNU General Public License v3. See license.txt
+
+from __future__ import unicode_literals
+import webnotes, json, base64
+
+from webnotes.utils import cint, cstr, getdate, now, nowdate, get_defaults
+from webnotes import _
+from webnotes.utils.file_manager import save_file
+
+@webnotes.whitelist()
+def setup_account(args=None):
+	# if webnotes.conn.sql("select name from tabCompany"):
+	# 	webnotes.throw(_("Setup Already Complete!!"))
+		
+	if not args:
+		args = webnotes.local.form_dict
+	if isinstance(args, basestring):
+		args = json.loads(args)
+	args = webnotes._dict(args)
+	
+	update_profile_name(args)
+	create_fiscal_year_and_company(args)
+	set_defaults(args)
+	create_territories()
+	create_price_lists(args)
+	create_feed_and_todo()
+	create_email_digest()
+	create_letter_head(args)
+	create_taxes(args)
+	create_items(args)
+	create_customers(args)
+	create_suppliers(args)
+	webnotes.conn.set_value('Control Panel', None, 'home_page', 'desktop')
+
+	webnotes.clear_cache()
+	webnotes.conn.commit()
+	
+	# suppress msgprints
+	webnotes.local.message_log = []
+
+	return "okay"
+	
+def update_profile_name(args):
+	if args.get("email"):
+		args['name'] = args.get("email")
+		webnotes.flags.mute_emails = True
+		webnotes.bean({
+			"doctype":"Profile",
+			"email": args.get("email"),
+			"first_name": args.get("first_name"),
+			"last_name": args.get("last_name")
+		}).insert()
+		webnotes.flags.mute_emails = False
+		from webnotes.auth import _update_password
+		_update_password(args.get("email"), args.get("password"))
+
+	else:
+		args['name'] = webnotes.session.user
+
+		# Update Profile
+		if not args.get('last_name') or args.get('last_name')=='None': 
+				args['last_name'] = None
+		webnotes.conn.sql("""update `tabProfile` SET first_name=%(first_name)s,
+			last_name=%(last_name)s WHERE name=%(name)s""", args)
+		
+	if args.get("attach_profile"):
+		filename, filetype, content = args.get("attach_profile").split(",")
+		fileurl = save_file(filename, content, "Profile", args.get("name"), decode=True).file_name
+		webnotes.conn.set_value("Profile", args.get("name"), "user_image", fileurl)
+		
+	add_all_roles_to(args.get("name"))
+	
+def create_fiscal_year_and_company(args):
+	curr_fiscal_year, fy_start_date, fy_abbr = get_fy_details(args.get('fy_start'), True)
+	webnotes.bean([{
+		"doctype":"Fiscal Year",
+		'year': curr_fiscal_year,
+		'year_start_date': fy_start_date
+	}]).insert()
+
+	curr_fiscal_year, fy_start_date, fy_abbr = get_fy_details(args.get('fy_start'))
+	webnotes.bean([{
+		"doctype":"Fiscal Year",
+		'year': curr_fiscal_year,
+		'year_start_date': fy_start_date,
+	}]).insert()
+
+	
+	# Company
+	webnotes.bean([{
+		"doctype":"Company",
+		'domain': args.get("industry"),
+		'company_name':args.get('company_name'),
+		'abbr':args.get('company_abbr'),
+		'default_currency':args.get('currency'),
+	}]).insert()
+	
+	args["curr_fiscal_year"] = curr_fiscal_year
+	
+def create_price_lists(args):
+	for pl_type in ["Selling", "Buying"]:
+		webnotes.bean([
+			{
+				"doctype": "Price List",
+				"price_list_name": "Standard " + pl_type,
+				"buying_or_selling": pl_type,
+				"currency": args["currency"]
+			},
+			{
+				"doctype": "Applicable Territory",
+				"parentfield": "valid_for_territories",
+				"territory": "All Territories"
+			}
+		]).insert()
+	
+def set_defaults(args):
+	# enable default currency
+	webnotes.conn.set_value("Currency", args.get("currency"), "enabled", 1)
+	
+	global_defaults = webnotes.bean("Global Defaults", "Global Defaults")
+	global_defaults.doc.fields.update({
+		'current_fiscal_year': args.curr_fiscal_year,
+		'default_currency': args.get('currency'),
+		'default_company':args.get('company_name'),
+		'date_format': webnotes.conn.get_value("Country", args.get("country"), "date_format"),
+		"float_precision": 3,
+		"country": args.get("country"),
+		"time_zone": args.get("time_zone")
+	})
+	global_defaults.save()
+	
+	accounts_settings = webnotes.bean("Accounts Settings")
+	accounts_settings.doc.auto_accounting_for_stock = 1
+	accounts_settings.save()
+
+	stock_settings = webnotes.bean("Stock Settings")
+	stock_settings.doc.item_naming_by = "Item Code"
+	stock_settings.doc.valuation_method = "FIFO"
+	stock_settings.doc.stock_uom = "Nos"
+	stock_settings.doc.auto_indent = 1
+	stock_settings.save()
+	
+	selling_settings = webnotes.bean("Selling Settings")
+	selling_settings.doc.cust_master_name = "Customer Name"
+	selling_settings.doc.so_required = "No"
+	selling_settings.doc.dn_required = "No"
+	selling_settings.save()
+
+	buying_settings = webnotes.bean("Buying Settings")
+	buying_settings.doc.supp_master_name = "Supplier Name"
+	buying_settings.doc.po_required = "No"
+	buying_settings.doc.pr_required = "No"
+	buying_settings.doc.maintain_same_rate = 1
+	buying_settings.save()
+
+	notification_control = webnotes.bean("Notification Control")
+	notification_control.doc.quotation = 1
+	notification_control.doc.sales_invoice = 1
+	notification_control.doc.purchase_order = 1
+	notification_control.save()
+
+	hr_settings = webnotes.bean("HR Settings")
+	hr_settings.doc.emp_created_by = "Naming Series"
+	hr_settings.save()
+
+	# control panel
+	cp = webnotes.doc("Control Panel", "Control Panel")
+	cp.company_name = args["company_name"]
+	cp.save()
+			
+def create_feed_and_todo():
+	"""update activty feed and create todo for creation of item, customer, vendor"""
+	import home
+	home.make_feed('Comment', 'ToDo', '', webnotes.session['user'],
+		'ERNext Setup Complete!', '#6B24B3')
+
+def create_email_digest():
+	from webnotes.profile import get_system_managers
+	system_managers = get_system_managers()
+	if not system_managers: 
+		return
+	
+	for company in webnotes.conn.sql_list("select name FROM `tabCompany`"):
+		if not webnotes.conn.exists("Email Digest", "Default Weekly Digest - " + company):
+			edigest = webnotes.bean({
+				"doctype": "Email Digest",
+				"name": "Default Weekly Digest - " + company,
+				"company": company,
+				"frequency": "Weekly",
+				"recipient_list": "\n".join(system_managers)
+			})
+
+			for fieldname in edigest.meta.get_fieldnames({"fieldtype": "Check"}):
+				edigest.doc.fields[fieldname] = 1
+		
+			edigest.insert()
+		
+def get_fy_details(fy_start, last_year=False):
+	st = {'1st Jan':'01-01','1st Apr':'04-01','1st Jul':'07-01', '1st Oct': '10-01'}
+	if cint(getdate(nowdate()).month) < cint((st[fy_start].split('-'))[0]):
+		curr_year = getdate(nowdate()).year - 1
+	else:
+		curr_year = getdate(nowdate()).year
+	
+	if last_year:
+		curr_year = curr_year - 1
+	
+	stdt = cstr(curr_year)+'-'+cstr(st[fy_start])
+
+	if(fy_start == '1st Jan'):
+		fy = cstr(curr_year)
+		abbr = cstr(fy)[-2:]
+	else:
+		fy = cstr(curr_year) + '-' + cstr(curr_year+1)
+		abbr = cstr(curr_year)[-2:] + '-' + cstr(curr_year+1)[-2:]
+	return fy, stdt, abbr
+
+def create_taxes(args):
+	for i in xrange(1,6):
+		if args.get("tax_" + str(i)):
+			webnotes.bean({
+				"doctype":"Account",
+				"company": args.get("company_name"),
+				"parent_account": "Duties and Taxes - " + args.get("company_abbr"),
+				"account_name": args.get("tax_" + str(i)),
+				"group_or_ledger": "Ledger",
+				"is_pl_account": "No",
+				"account_type": "Tax",
+				"tax_rate": args.get("tax_rate_" + str(i))
+			}).insert()
+
+def create_items(args):
+	for i in xrange(1,6):
+		item = args.get("item_" + str(i))
+		if item:
+			item_group = args.get("item_group_" + str(i))
+			webnotes.bean({
+				"doctype":"Item",
+				"item_code": item,
+				"item_name": item,
+				"description": item,
+				"is_sales_item": "Yes",
+				"is_stock_item": item_group!="Services" and "Yes" or "No",
+				"item_group": item_group,
+				"stock_uom": args.get("item_uom_" + str(i)),
+				"default_warehouse": item_group!="Service" and ("Finished Goods - " + args.get("company_abbr")) or ""
+			}).insert()
+			
+			if args.get("item_img_" + str(i)):
+				filename, filetype, content = args.get("item_img_" + str(i)).split(",")
+				fileurl = save_file(filename, content, "Item", item, decode=True).file_name
+				webnotes.conn.set_value("Item", item, "image", fileurl)
+					
+	for i in xrange(1,6):
+		item = args.get("item_buy_" + str(i))
+		if item:
+			item_group = args.get("item_buy_group_" + str(i))
+			webnotes.bean({
+				"doctype":"Item",
+				"item_code": item,
+				"item_name": item,
+				"description": item,
+				"is_sales_item": "No",
+				"is_stock_item": item_group!="Services" and "Yes" or "No",
+				"item_group": item_group,
+				"stock_uom": args.get("item_buy_uom_" + str(i)),
+				"default_warehouse": item_group!="Service" and ("Stores - " + args.get("company_abbr")) or ""
+			}).insert()
+			
+			if args.get("item_img_" + str(i)):
+				filename, filetype, content = args.get("item_img_" + str(i)).split(",")
+				fileurl = save_file(filename, content, "Item", item, decode=True).file_name
+				webnotes.conn.set_value("Item", item, "image", fileurl)
+
+
+def create_customers(args):
+	for i in xrange(1,6):
+		customer = args.get("customer_" + str(i))
+		if customer:
+			webnotes.bean({
+				"doctype":"Customer",
+				"customer_name": customer,
+				"customer_type": "Company",
+				"customer_group": "Commercial",
+				"territory": args.get("country"),
+				"company": args.get("company_name")
+			}).insert()
+			
+			if args.get("customer_contact_" + str(i)):
+				contact = args.get("customer_contact_" + str(i)).split(" ")
+				webnotes.bean({
+					"doctype":"Contact",
+					"customer": customer,
+					"first_name":contact[0],
+					"last_name": len(contact) > 1 and contact[1] or ""
+				}).insert()
+			
+def create_suppliers(args):
+	for i in xrange(1,6):
+		supplier = args.get("supplier_" + str(i))
+		if supplier:
+			webnotes.bean({
+				"doctype":"Supplier",
+				"supplier_name": supplier,
+				"supplier_type": "Local",
+				"company": args.get("company_name")
+			}).insert()
+
+			if args.get("supplier_contact_" + str(i)):
+				contact = args.get("supplier_contact_" + str(i)).split(" ")
+				webnotes.bean({
+					"doctype":"Contact",
+					"supplier": supplier,
+					"first_name":contact[0],
+					"last_name": len(contact) > 1 and contact[1] or ""
+				}).insert()
+
+
+def create_letter_head(args):
+	if args.get("attach_letterhead"):
+		lh = webnotes.bean({
+			"doctype":"Letter Head",
+			"letter_head_name": "Standard",
+			"is_default": 1
+		}).insert()
+		
+		filename, filetype, content = args.get("attach_letterhead").split(",")
+		fileurl = save_file(filename, content, "Letter Head", "Standard", decode=True).file_name
+		webnotes.conn.set_value("Letter Head", "Standard", "content", "<img src='%s' style='max-width: 100%%;'>" % fileurl)
+		
+		
+				
+def add_all_roles_to(name):
+	profile = webnotes.doc("Profile", name)
+	for role in webnotes.conn.sql("""select name from tabRole"""):
+		if role[0] not in ["Administrator", "Guest", "All", "Customer", "Supplier", "Partner"]:
+			d = profile.addchild("user_roles", "UserRole")
+			d.role = role[0]
+			d.insert()
+			
+def create_territories():
+	"""create two default territories, one for home country and one named Rest of the World"""
+	from setup.utils import get_root_of
+	country = webnotes.conn.get_value("Control Panel", None, "country")
+	root_territory = get_root_of("Territory")
+	for name in (country, "Rest Of The World"):
+		if name and not webnotes.conn.exists("Territory", name):
+			webnotes.bean({
+				"doctype": "Territory",
+				"territory_name": name.replace("'", ""),
+				"parent_territory": root_territory,
+				"is_group": "No"
+			}).insert()
\ No newline at end of file
diff --git a/setup/page/setup_wizard/setup_wizard.txt b/setup/page/setup_wizard/setup_wizard.txt
new file mode 100644
index 0000000..996fd1a
--- /dev/null
+++ b/setup/page/setup_wizard/setup_wizard.txt
@@ -0,0 +1,32 @@
+[
+ {
+  "creation": "2013-10-04 13:49:33", 
+  "docstatus": 0, 
+  "modified": "2013-10-04 13:49:33", 
+  "modified_by": "Administrator", 
+  "owner": "Administrator"
+ }, 
+ {
+  "doctype": "Page", 
+  "module": "Setup", 
+  "name": "__common__", 
+  "page_name": "setup-wizard", 
+  "standard": "Yes", 
+  "title": "Setup Wizard"
+ }, 
+ {
+  "doctype": "Page Role", 
+  "name": "__common__", 
+  "parent": "setup-wizard", 
+  "parentfield": "roles", 
+  "parenttype": "Page", 
+  "role": "System Manager"
+ }, 
+ {
+  "doctype": "Page", 
+  "name": "setup-wizard"
+ }, 
+ {
+  "doctype": "Page Role"
+ }
+]
\ No newline at end of file
diff --git a/setup/page/setup_wizard/test_setup_data.py b/setup/page/setup_wizard/test_setup_data.py
new file mode 100644
index 0000000..b5b6359
--- /dev/null
+++ b/setup/page/setup_wizard/test_setup_data.py
@@ -0,0 +1,53 @@
+
+args = {
+"attach_letterhead": "erpnext.jpg,data:image/jpeg;base64,/9j/4AAQS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oAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgBGZVBZmCgAsxYgAKvLMSeAAOSTwO9AHxV4x/4KU/8E6Ph5rl74Y+IH7ff7FPgbxLps8ttqPh7xj+1R8C/DOuWFzA2ya3vdJ1rx3ZX9rPC/ySxT28ckbHa6g8UAcv/wAPYf8Agln/ANJK/wBgH/xMj9nX8f8Amo1ACf8AD2H/AIJZf9JLP2AP/EyP2de//dRu+f1oAX/h7D/wSz/6SV/sA/8AiZH7Ov8A88agA/4ew/8ABLP/AKSV/sA/+Jkfs7f/ADxqAD/h7D/wSz7/APBSv9gH/wATI/Z1/wDnjUAH/D2H/gln/wBJK/2AeOv/ABmR+zrx/wCZGoAP+HsP/BLP/pJX+wD/AOJkfs6//PGoA+hvg1+1N+zH+0al7J+z3+0b8B/jummxLcai/wAGvi98PviglhA7KqTXreCPEOuC1idnVVknKIzMoDEsMgHvHXmgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAQkKCx6AEn6Dk0Af5wP/B1n/wAFovjN4n/aI8a/8E0v2evHOs+APgv8I7LRtO/aI1jwfqt7pGs/GL4ka/olh4ivPAmra1YPbXx+HHgDSdW03StS8L2s9taeI/Gs2vt4ni1Wz0LQIbUA/iMbnOV/75VRnkf3QM/U89SeaAGjrnB6senXI/yPegAHB6HkL+HH+c/jQApJOcqeAR9ckd/8+tAC55xg9euPf/Jz/wDroARuexPH/sw4/HH5c80AGfvHDc+31/yT7/mAL3A56k5xx/F/n/8AXQB6F8Kfi18TfgZ4/wDDHxU+Dvjvxb8MviN4N1ODV/C/jbwNruoeGfE+h39vIHjnsNY0qa3uowwXy7i3leW0u4Ge2vLe4tpZYmAP9ef/AIN/v+CpWs/8FUP2FdM+JXxLTS7b9oX4P+Kp/g98dl0i1i03T/EviPTdG0zW/DvxM03R7eNLXSbP4heG9St77UdPsUt9MsvGGm+LLPRrKz0a3sLaIA/cmgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgBCMgg9Dwfcd/wA6AP8AFM/4LVzzXH/BWv8A4KLvPI8rr+2J8d4VZzkiK28a6hbW8YP92GCGKJB/CiKO1AH5gc4P178Dkr1B555+vP8AeoAQZz/30Oo3Hjue+P0oAXn+R65PQc8fr/eHSgA556dPoOvcdc46n8KADnrjv3Pqf5eg659aAA5//Wf9rv6jB/DJHegBOfm6Z4789O/9emRmgBecj6nvx1bt6/5NABzx069zk/e556env2oA/wBDj/gx5mmf4Yf8FErdpGMEPjv9mqeKInKRzT+GPi/FPIo7PLHbQI57rEg/hoA/u7oAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKAP8AFF/4LS/8paf+CjPr/wANkfH3/wBTvVPf/wDX60AfmMc4Of8A638PU8H1/wA4oAQZyPXLc8dcc9+oP4GgAGc47kLnt0A98nvnj/64ApyScjsR147d+OvvjjmgAyc49we3r9c/Q9c8HrQAN7+/6sMDr7df60AHPzevGenp356EfzPXFABzkdcZPp1+b3z/AJ9aADnAHvknj+96e/8AkmgD/Q0/4Md/+Sb/APBRf/sdf2ZP/Ub+M1AH939ABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQB/ijf8ABaX/AJS0/wDBRn/s8j4+8/8Ac+ap3/zzQB+Y3+Prx1Ht/TqT60AIM+p/i53c+nPH5dcGgBec9+MdT+PoefXnoe+RQAvPX29ePr06/gaADBz1PXPX8x06fj+XWgBDn3/P1P8AnHXjIoAOeRz25z/9bvxnPqT9QA7g5PUjrx3P+fT8KADkfn1J56/5789OtAH+hn/wY7/8k3/4KL/9jr+zJ/6jfxmoA/u/oAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKAP8UX/AILS/wDKWn/gozxn/jMj4+9s/wDM+ap+fNAH5jEdeP8Ax0H+76/j+vpQAgHPT1/g/L3/AK9jQAd+hxx/APxoAO7cHv8AwD1/X/JoACOenf8AuZH59f8APFACkdePX+EH+L/D9OaAE7Hj0/gH4/8A1/060ALjnoOp/g7c9+n4/ie9ABj2/wDHPf8AT8e3PWgD/Q0/4Md/+Sb/APBRf/sdf2ZP/Ub+M3+fegD+7+gAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoA/xRf+C0v/KWn/goz/2eR8fffr481X/P55oA/Mc85P8AMH1HXuenP/6qAGjqOB1bnB75xn2Pbnp34NAC4Oc46Y7ZPAHTk/j+mTQAYPXA5z29wf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de1Y3xvH+LnxK/tn+0f7b8gWwtdK+yfZvN+0XPneXEAf0Y0AFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAf4ov8AwWk/5Sz/APBRrP8A0eT8f/8A1PdU/pn/ABoA/MY9fTnv/wAB75Pt/XvkATg9x/F+H6jr3yfpgcgAUfUdvqcYOP5YwfqTzQAHHJyffkZHPTOfU/8A1+xADj15znqM56Z69fXtj+HNAB+P5/73+POcYzjoOKADjnnuOhHp9evHHOOmckGgA79ecn69W/n3yMcn2AAAY459OMjHX6k/r168cUAf6Gn/AAY7/wDJN/8Agov/ANjr+zJ/6jfxmoA/u/oAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKAP8AFF/4LSf8pZ/+CjX/AGeT8f8A/wBT3VKAPzFJ5J9+/wBU70AGQe3Zsc+uc8Y/LP60AGf129+eAPbn8+DycA0AGeSe+PUdMj2wP1Pr2oAM8/8AAj375+np+GOPvUABP9T1/wBv/PJ/xoAM8Hp1Hf29+e3f8ehoAUfeHrk/zb/PX0oAQHgDscdSP73p1NAH+hr/AMGO/wDyTf8A4KL/APY6/syf+o38Zs0Af3f0AFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFAH+KL/wWj/5S0f8FGucf8Zk/H/r/wBj7qn/AOv9fqAfmOfbHXp+K+3uT+INADefUfxenb8PXk9c9aAF5yeR2z05yB7c5/CgBeeeRj6j1+n4d+aADnPUYz6j8unX8f8AGgAOfUfp/e+nbpnnmgBMnnkZyOcj0+nft/8AW5AF5yPqf/Zuen659etACc8HIPTPQ9W+n9RyPagD/Q0/4Md/+Sb/APBRf/sdf2ZP/Ub+M1AH939ABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQB/ii/8ABaT/AJSz/wDBRr/s8j4//wDqe6pQB+Yx9D0z9B1Tt+P86ADPvzh/55/+vQAA+uCTjr7qO3Xn2/HHWgBCcgjjvnkdcjnOePofpQAuQfrn27N09f8AH6mgBD156d8+z/8A16AAkHP1/mp/qf1J9aAFB5x7k/q9ACA56nk7fTsx7UAf6Gv/AAY7/wDJN/8Agov/ANjr+zJ/6jfxmoA/u/oAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACg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q/8AgqZ/0Xz9gH8Pil+0T+f/ACat19T3HGKAA/8ABlX/AMFTP+i+fsA/+HT/AGifXP8A0at17n1PoKAD/iCr/wCCpnP/ABf39gLr/wBFT/aJ/wDoVu3bnjjrigA/4gq/+Cpn/RfP2AepOf8Ahaf7ROe//Vqvv+poA+y/2Q/+DKD4oRePNG1r9uf9qz4aQ/DzSr22vNW8Dfsw2/jHxD4k8X28UqPNo6/EL4meEfAtt4MguFDRy6raeBfE995RZLWKxuHS9twD+974LfBj4X/s7/CnwF8EPgr4K0T4d/Cv4Y+G9P8ACXgfwZ4egeHS9C0PTUKwwI80k15fXt1M82oavrOp3N5rGu6vd32s6zfX2qX13dTAHp9ABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFAH/2Q==",
+"attach_logo": "logo-2013-color-small.png,data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAMgAAADICAYAAACtWK6eAAAEJGlDQ1BJQ0MgUHJvZmlsZQAAOBGFVd9v21QUPolvUqQWPyBYR4eKxa9VU1u5GxqtxgZJk6XtShal6dgqJOQ6N4mpGwfb6baqT3uBNwb8AUDZAw9IPCENBmJ72fbAtElThyqqSUh76MQPISbtBVXhu3ZiJ1PEXPX6yznfOec7517bRD1fabWaGVWIlquunc8klZOnFpSeTYrSs9RLA9Sr6U4tkcvNEi7BFffO6+EdigjL7ZHu/k72I796i9zRiSJPwG4VHX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0lvNJBI1rffGD4L2d7bM8TKxgvLO4ntbqEkx3FtPNBMrxSOjfYv/BC9msf+CeHwnt7JjZ28+j+CzNBak28Mxk+EHwwmkMsUWxJC8skkrl1JaSR3bLMxJRWuG/3jA/8AYvf/AKkMxxn+6Zj/ANjOX/qPRPpr9hn/AJFj44f9nGfET/03+F6d+xL/AMeH7Qf/AGcZ4/8A/RWlUUV6FD/mB/w4n9DzcXvmnrg/ziN/Yu/4+/2l/wDs4zx1/wCjIam/Y7/5Dv7U3/ZyXj3/ANLHoop0t8D64n8pBit8z/wYL86R8MeOfFvivwhp37QN94S8TeIfC97dfteeLbS5vPDutalol1cWv2DxJL9mnuNNubaWW382KOXyZHaPzI0fbuRSPnzwz8Xviz4K1LVdY8G/FD4ieEtX128m1HXNV8M+NfEug6lrOoXG/wC0X2q32lanaXWo3k/mP511eSzTy733u245KK8LFfwv/B//ALcfSYT436YT/wBwnLeLPE3iPx74Y+IXgjx14g1vxp4L+Ld9Z6n8VvCPizVb/wAR+GPibqWnalBrOn6h8QtA1i4vNK8aX1jq9ra6rZ3fiS01K4tdStoL6CRLqGOVe28B/HD41fCzwd4d+Hfwx+L/AMUfhx8P/CGmw6N4T8DeA/iB4s8IeDvC+j2xY2+k+HfDPh/VtO0XRdNgLsYbHTbG2tYizbIl3HJRXjPf5R/JHtnW/wDDV/7Uv/Rynx+/8PH8RP8A5o6P+Gr/ANqX/o5T4/f+Hj+In/zR0UUgD/hq/wDal/6OU+P3/h4/iJ/80dFFFAH/2Q==",
+"company_abbr": "WN",
+"company_name": "Web Notes",
+"company_tagline": "Open Source ERP",
+"country": "India",
+"currency": "INR",
+"customer_1": "RIGPL",
+"customer_2": "Mahesh Engg",
+"customer_contact_1": "Aditya Duggal",
+"customer_contact_2": "Mahesh Malani",
+"first_name": "Rushabh",
+"fy_start": "1st Apr",
+"item_1": "Enterprise Plan",
+"item_2": "Small Business",
+"item_3": "Solo",
+"item_4": "Manual",
+"item_buy_1": "Server Hosting",
+"item_buy_2": "Adwords",
+"item_buy_group_1": "Services",
+"item_buy_group_2": "Services",
+"item_buy_group_3": "Raw Material",
+"item_buy_group_4": "Raw Material",
+"item_buy_group_5": "Raw Material",
+"item_buy_uom_1": "Unit",
+"item_buy_uom_2": "Unit",
+"item_buy_uom_3": "Unit",
+"item_buy_uom_4": "Unit",
+"item_buy_uom_5": "Unit",
+"item_group_1": "Services",
+"item_group_2": "Services",
+"item_group_3": "Services",
+"item_group_4": "Products",
+"item_group_5": "Products",
+"item_img_1": "logo-2013-color-small.png,data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAMgAAADICAYAAACtWK6eAAAEJGlDQ1BJQ0MgUHJvZmlsZQAAOBGFVd9v21QUPolvUqQWPyBYR4eKxa9VU1u5GxqtxgZJk6XtShal6dgqJOQ6N4mpGwfb6baqT3uBNwb8AUDZAw9IPCENBmJ72fbAtElThyqqSUh76MQPISbtBVXhu3ZiJ1PEXPX6yznfOec7517bRD1fabWaGVWIlquunc8klZOnFpSeTYrSs9RLA9Sr6U4tkcvNEi7BFffO6+EdigjL7ZHu/k72I796i9zRiSJPwG4VHX0Z+AxRzNRrtksUvwf7+Gm3BtzzHPDTNgQCqwKXfZwSeNHHJz1OIT8JjtAq6xWtCLwGPLzYZi+3YV8DGMiT4VVuG7oiZpGzrZJhcs/hL49xtzH/Dy6bdfTsXYNY+5yluWO4D4neK/ZUvok/17X0HPBLsF+vuUlhfwX4j/rSfAJ4H1H0qZJ9dN7nR19frRTeBt4Fe9FwpwtN+2p1MXscGLHR9SXrmMgjONd1ZxKzpBeA71b4tNhj6JGoyFNp4GHgwUp9qplfmnFW5oTdy7NamcwCI49kv6fN5IAHgD+0rbyoBc3SOjczohbyS1drbq6pQdqumllRC/0ymTtej8gpbbuVwpQfyw66dqEZyxZKxtHpJn+tZnpnEdrYBbueF9qQn93S7HQGGHnYP7w6L+YGHNtd1FJitqPAR+hERCNOFi1i1alKO6RQnjKUxL1GNjwlMsiEhcPLYTEiT9ISbN15OY/j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3MTYk9hIAhSA8Zy4iaPgKGIOljbkrsIQQMQXrIWEbU9BEwBEkfc1NiDyFgCNJDxjKipo+AIUj6mJsSewgBQ5AeMpYRNX0EDEHSx9yU2EMIGIL0kLGMqOkjYAiSPuamxB5CwBCkh4xlRE0fAUOQ9DE3JfYQAoYgPWQsI2r6CBiCpI+5KbGHEDAESTAWpjjjpGp9l6hT+L/vVGurQoYgteAshAeEDOYxKSdWM8CEz+G81LWu6In91IG6UCelG6WOdO0JBVIW0hAkAXBfus+gqj0Ph8pgmt6ejyVKB+hCnZRuCfpv9sMNzpy/ieDiJNlR4+pbV+/+D8zt/H5ofxZ7s73aNEH0gL2tMj4vwfJtX3/PY098SFl0ha6byMJ1qWoiSC2YQI5jh0Q4ubcQdyOCXIB7DYEcJTparct03a/IAdmVDkoX6ISklnnoy7us9ljCRJAEHCex1McEpur/ztW7Pwpa3AVulFELz+EytuNZwehOFs7bzqUGAkQ/riabxe9b3/XYE1+p6pYAwaY+bAiSZP4VzY9vX7PnA7gLuR2XvAS0KIEoWNvb6uoKWEnigwxY+4frEFpcLOdprOVwx7sfffxedd0K3RLz2aQnGILUYfiVNe33r7lij2c574PDvQmhYw8cbriOLLp2Cgg9j2bh4yDyj13L/8afP/rU4xRmpU5dE64HCv5/TkFf8RZsb3gAAAAASUVORK5CYII=",
+"item_uom_1": "Unit",
+"item_uom_2": "Unit",
+"item_uom_3": "Unit",
+"item_uom_4": "Unit",
+"item_uom_5": "Unit",
+"last_name": "Mehta",
+"supplier_1": "Google",
+"supplier_2": "Hetzner",
+"supplier_3": "Digital Ocean",
+"tax_1": "Service Tax",
+"tax_rate_1": "12.5",
+"timezone": "Asia/Calcutta",
+"password": "password",
+"email": "test@erpnext.com",
+}
\ No newline at end of file
diff --git a/setup/page/setup_wizard/test_setup_wizard.py b/setup/page/setup_wizard/test_setup_wizard.py
new file mode 100644
index 0000000..fe0904d
--- /dev/null
+++ b/setup/page/setup_wizard/test_setup_wizard.py
@@ -0,0 +1,14 @@
+# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
+# License: GNU General Public License v3. See license.txt
+
+from __future__ import unicode_literals
+import webnotes
+
+from setup.page.setup_wizard.test_setup_data import args
+from setup.page.setup_wizard.setup_wizard import setup_account
+
+if __name__=="__main__":
+	webnotes.connect()
+	webnotes.local.form_dict = webnotes._dict(args)
+	setup_account()
+	
\ No newline at end of file
diff --git a/setup/utils.py b/setup/utils.py
index 3d0c1ee..0571c15 100644
--- a/setup/utils.py
+++ b/setup/utils.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 # License: GNU General Public License v3. See license.txt
 
 from __future__ import unicode_literals
diff --git a/startup/__init__.py b/startup/__init__.py
index 227846c..1d96323 100644
--- a/startup/__init__.py
+++ b/startup/__init__.py
@@ -27,11 +27,9 @@
 	"Territory": "territory"
 }
 
-application_home_page = "desktop"
-
 # add startup propertes
 mail_footer = """<div style="padding: 7px; text-align: right; color: #888"><small>Sent via 
-	<a style="color: #888" href="https://erpnext.com">ERPNext</a></div>"""
+	<a style="color: #888" href="http://erpnext.org">ERPNext</a></div>"""
 	
 def get_monthly_bulk_mail_limit():
 	import webnotes
diff --git a/startup/bean_handlers.py b/startup/bean_handlers.py
new file mode 100644
index 0000000..06d2734
--- /dev/null
+++ b/startup/bean_handlers.py
@@ -0,0 +1,16 @@
+# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
+# License: GNU General Public License v3. See license.txt
+
+from home import update_feed
+from core.doctype.notification_count.notification_count import clear_doctype_notifications
+from stock.doctype.material_request.material_request import update_completed_qty
+
+def on_method(bean, method):
+	if method in ("on_update", "on_submit"):
+		update_feed(bean.controller, method)
+	
+	if method in ("on_update", "on_cancel", "on_trash"):
+		clear_doctype_notifications(bean.controller, method)
+
+	if bean.doc.doctype=="Stock Entry" and method in ("on_submit", "on_cancel"):
+		update_completed_qty(bean.controller, method)
\ No newline at end of file
diff --git a/startup/boot.py b/startup/boot.py
index 886b805..a8dbf81 100644
--- a/startup/boot.py
+++ b/startup/boot.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 # License: GNU General Public License v3. See license.txt"
 
 
@@ -32,9 +32,9 @@
 		
 		
 		# load subscription info
-		import conf
+		from webnotes import conf
 		for key in ['max_users', 'expires_on', 'max_space', 'status', 'commercial_support']:
-			if hasattr(conf, key): bootinfo[key] = getattr(conf, key)
+			if key in conf: bootinfo[key] = conf.get(key)
 
 		bootinfo['docs'] += webnotes.conn.sql("""select name, default_currency, cost_center
             from `tabCompany`""", as_dict=1, update={"doctype":":Company"})
@@ -53,4 +53,4 @@
 	ret = webnotes.conn.sql("""select name, content from `tabLetter Head` 
 		where ifnull(disabled,0)=0""")
 	return dict(ret)
-	
\ No newline at end of file
+	
diff --git a/startup/event_handlers.py b/startup/event_handlers.py
index 57345f3..f0323ea 100644
--- a/startup/event_handlers.py
+++ b/startup/event_handlers.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 # License: GNU General Public License v3. See license.txt"
 
 
@@ -35,13 +35,13 @@
 		set_cart_count()
 		
 def on_logout(login_manager):
-	webnotes.add_cookies["cart_count"] = ""
+	webnotes._response.set_cookie("cart_count", "")
 		
 def check_if_expired():
 	"""check if account is expired. If expired, do not allow login"""
-	import conf
+	from webnotes import conf
 	# check if expires_on is specified
-	if not hasattr(conf, 'expires_on'): return
+	if not 'expires_on' in conf: return
 	
 	# check if expired
 	from datetime import datetime, date
@@ -65,9 +65,6 @@
 	raise webnotes.AuthenticationError
 
 def on_build():
-	from website.doctype.website_settings.make_web_include_files import make
-	make()
-	
 	from home.page.latest_updates import latest_updates
 	latest_updates.make()
 
@@ -75,4 +72,4 @@
 	"""add comment to feed"""
 	home.make_feed('Comment', doc.comment_doctype, doc.comment_docname, doc.comment_by,
 		'<i>"' + doc.comment + '"</i>', '#6B24B3')
-	
\ No newline at end of file
+	
diff --git a/startup/install.py b/startup/install.py
index d795594..94a3f55 100644
--- a/startup/install.py
+++ b/startup/install.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 # License: GNU General Public License v3. See license.txt
 
 from __future__ import unicode_literals
@@ -13,13 +13,13 @@
 	import_country_and_currency()
 	
 	# home page
-	webnotes.conn.set_value('Control Panel', None, 'home_page', 'desktop')
+	webnotes.conn.set_value('Control Panel', None, 'home_page', 'setup-wizard')
 
 	# features
 	feature_setup()
 	
 	# all roles to Administrator
-	from setup.doctype.setup_control.setup_control import add_all_roles_to
+	from setup.page.setup_wizard.setup_wizard import add_all_roles_to
 	add_all_roles_to("Administrator")
 	
 	webnotes.conn.commit()
@@ -71,6 +71,7 @@
 		{'doctype': 'Item Group', 'item_group_name': 'Raw Material', 'is_group': 'No', 'parent_item_group': 'All Item Groups'},
 		{'doctype': 'Item Group', 'item_group_name': 'Services', 'is_group': 'No', 'parent_item_group': 'All Item Groups'},
 		{'doctype': 'Item Group', 'item_group_name': 'Sub Assemblies', 'is_group': 'No', 'parent_item_group': 'All Item Groups'},
+		{'doctype': 'Item Group', 'item_group_name': 'Consumable', 'is_group': 'No', 'parent_item_group': 'All Item Groups'},
 		
 		# deduction type
 		{'doctype': 'Deduction Type', 'name': 'Income Tax', 'description': 'Income Tax', 'deduction_name': 'Income Tax'},
diff --git a/startup/observers.py b/startup/observers.py
deleted file mode 100644
index df827da..0000000
--- a/startup/observers.py
+++ /dev/null
@@ -1,9 +0,0 @@
-# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
-# License: GNU General Public License v3. See license.txt
-
-observer_map = {
-	"*:on_update": "home.update_feed",
-	"*:on_submit": "home.update_feed",
-	"Stock Entry:on_submit": "stock.doctype.material_request.material_request.update_completed_qty",
-	"Stock Entry:on_cancel": "stock.doctype.material_request.material_request.update_completed_qty",
-}
\ No newline at end of file
diff --git a/startup/open_count.py b/startup/open_count.py
index 431ced9..38034e2 100644
--- a/startup/open_count.py
+++ b/startup/open_count.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 # License: GNU General Public License v3. See license.txt
 
 from __future__ import unicode_literals
@@ -56,6 +56,12 @@
 		AND ifnull(docstatus,0)=0
 		""", webnotes.user.name)[0][0]
 
+for_module_doctypes = {
+	"ToDo": "To Do",
+	"Event": "Calendar",
+	"Comment": "Messages"
+}
+
 for_module = {
 	"To Do": get_things_todo,
 	"Calendar": get_todays_events,
diff --git a/startup/query_handlers.py b/startup/query_handlers.py
index 56c995e..753d088 100644
--- a/startup/query_handlers.py
+++ b/startup/query_handlers.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 # License: GNU General Public License v3. See license.txt
 
 from __future__ import unicode_literals
diff --git a/startup/report_data_map.py b/startup/report_data_map.py
index 12ceae4..c1f9627 100644
--- a/startup/report_data_map.py
+++ b/startup/report_data_map.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 # License: GNU General Public License v3. See license.txt
 
 from __future__ import unicode_literals
diff --git a/startup/schedule_handlers.py b/startup/schedule_handlers.py
index 2ff7b6d..cdb0e5d 100644
--- a/startup/schedule_handlers.py
+++ b/startup/schedule_handlers.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 # License: GNU General Public License v3. See license.txt
 
 from __future__ import unicode_literals
@@ -30,6 +30,10 @@
 	from core.doctype.event.event import send_event_digest
 	run_fn(send_event_digest)
 	
+	# clear daily event notifications
+	from core.doctype.notification_count.notification_count import delete_notification_count_for
+	delete_notification_count_for("Event")
+	
 	# email digest
 	from setup.doctype.email_digest.email_digest import send
 	run_fn(send)
diff --git a/startup/webutils.py b/startup/webutils.py
index 218741b..9e18d4e 100644
--- a/startup/webutils.py
+++ b/startup/webutils.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 # License: GNU General Public License v3. See license.txt
 
 import webnotes
@@ -23,4 +23,7 @@
 	context.update({
 		"shopping_cart_enabled": cart_enabled,
 		"post_login": post_login + context.get("post_login", [])
-	})
\ No newline at end of file
+	})
+	
+	if not context.get("favicon"):
+		context["favicon"] = "app/images/favicon.ico"
\ No newline at end of file
diff --git a/stock/doctype/batch/batch.js b/stock/doctype/batch/batch.js
index ac83b71..51e7470 100644
--- a/stock/doctype/batch/batch.js
+++ b/stock/doctype/batch/batch.js
@@ -1,4 +1,4 @@
-// Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+// Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 // License: GNU General Public License v3. See license.txt
 
 cur_frm.fields_dict['item'].get_query = function(doc, cdt, cdn) {
diff --git a/stock/doctype/batch/batch.py b/stock/doctype/batch/batch.py
index 26d0f76..cb6190f 100644
--- a/stock/doctype/batch/batch.py
+++ b/stock/doctype/batch/batch.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 # License: GNU General Public License v3. See license.txt
 
 from __future__ import unicode_literals
diff --git a/stock/doctype/bin/bin.py b/stock/doctype/bin/bin.py
index c419cad..73b1cac 100644
--- a/stock/doctype/bin/bin.py
+++ b/stock/doctype/bin/bin.py
@@ -1,11 +1,10 @@
-# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 # License: GNU General Public License v3. See license.txt
 
 from __future__ import unicode_literals
 import webnotes
 from webnotes.utils import add_days, cint,flt, nowdate, get_url_to_form, formatdate
 from webnotes import msgprint, _
-sql = webnotes.conn.sql
 
 import webnotes.defaults
 
@@ -61,7 +60,7 @@
 		self.doc.save()
 		
 	def get_first_sle(self):
-		sle = sql("""
+		sle = webnotes.conn.sql("""
 			select * from `tabStock Ledger Entry`
 			where item_code = %s
 			and warehouse = %s
diff --git a/stock/doctype/delivery_note/delivery_note.js b/stock/doctype/delivery_note/delivery_note.js
index 84e65da..69f9d67 100644
--- a/stock/doctype/delivery_note/delivery_note.js
+++ b/stock/doctype/delivery_note/delivery_note.js
@@ -1,4 +1,4 @@
-// Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+// Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 // License: GNU General Public License v3. See license.txt
 
 // Module Material Management
@@ -9,7 +9,7 @@
 
 wn.require('app/accounts/doctype/sales_taxes_and_charges_master/sales_taxes_and_charges_master.js');
 wn.require('app/utilities/doctype/sms_control/sms_control.js');
-wn.require('app/selling/doctype/sales_common/sales_common.js');
+wn.require('app/selling/sales_common.js');
 wn.require('app/accounts/doctype/sales_invoice/pos.js');
 
 wn.provide("erpnext.stock");
@@ -22,24 +22,24 @@
 			var from_sales_invoice = false;
 			from_sales_invoice = cur_frm.get_doclist({parentfield: "delivery_note_details"})
 				.some(function(item) { 
-					return item.prevdoc_doctype==="Sales Invoice" ? true : false; 
+					return item.against_sales_invoice ? true : false; 
 				});
 			
 			if(!from_sales_invoice)
-				cur_frm.add_custom_button('Make Invoice', this.make_sales_invoice);
+				cur_frm.add_custom_button(wn._('Make Invoice'), this.make_sales_invoice);
 		}
 	
 		if(flt(doc.per_installed, 2) < 100 && doc.docstatus==1) 
-			cur_frm.add_custom_button('Make Installation Note', this.make_installation_note);
+			cur_frm.add_custom_button(wn._('Make Installation Note'), this.make_installation_note);
 
 		if (doc.docstatus==1) {
-			cur_frm.add_custom_button('Send SMS', cur_frm.cscript.send_sms);
+			cur_frm.appframe.add_button(wn._('Send SMS'), cur_frm.cscript.send_sms, "icon-mobile-phone");
 			this.show_stock_ledger();
 			this.show_general_ledger();
 		}
 
 		if(doc.docstatus==0 && !doc.__islocal) {
-			cur_frm.add_custom_button('Make Packing Slip', cur_frm.cscript['Make Packing Slip']);
+			cur_frm.add_custom_button(wn._('Make Packing Slip'), cur_frm.cscript['Make Packing Slip']);
 		}
 	
 		set_print_hide(doc, dt, dn);
@@ -113,13 +113,6 @@
 	}
 }
 
-cur_frm.cscript.serial_no = function(doc, cdt, cdn) {
-	var d = locals[cdt][cdn];
-	if (d.serial_no) {
-		 return get_server_fields('get_serial_details',d.serial_no,'delivery_note_details',doc,cdt,cdn,1);
-	}
-}
-
 cur_frm.fields_dict['transporter_name'].get_query = function(doc) {
 	return{
 		filters: { 'supplier_type': "transporter" }
@@ -181,12 +174,12 @@
 	if(cl.length){
 		prevdoc_list = new Array();
 		for(var i=0;i<cl.length;i++){
-			if(cl[i].prevdoc_doctype == 'Sales Order' && cl[i].prevdoc_docname && prevdoc_list.indexOf(cl[i].prevdoc_docname) == -1) {
-				prevdoc_list.push(cl[i].prevdoc_docname);
+			if(cl[i].against_sales_order && prevdoc_list.indexOf(cl[i].against_sales_order) == -1) {
+				prevdoc_list.push(cl[i].against_sales_order);
 				if(prevdoc_list.length ==1)
-					out += make_row(cl[i].prevdoc_doctype, cl[i].prevdoc_docname, cl[i].prevdoc_date,0);
+					out += make_row("Sales Order", cl[i].against_sales_order, null, 0);
 				else
-					out += make_row('', cl[i].prevdoc_docname, cl[i].prevdoc_date,0);
+					out += make_row('', cl[i].against_sales_order, null,0);
 			}
 		}
 	}
diff --git a/stock/doctype/delivery_note/delivery_note.py b/stock/doctype/delivery_note/delivery_note.py
index eb2b204..1089a56 100644
--- a/stock/doctype/delivery_note/delivery_note.py
+++ b/stock/doctype/delivery_note/delivery_note.py
@@ -1,10 +1,10 @@
-# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 # License: GNU General Public License v3. See license.txt
 
 from __future__ import unicode_literals
 import webnotes
 
-from webnotes.utils import cstr, flt, cint, add_days
+from webnotes.utils import cstr, flt, cint
 from webnotes.model.bean import getlist
 from webnotes.model.code import get_obj
 from webnotes import msgprint, _
@@ -28,7 +28,7 @@
 			'target_parent_field': 'per_delivered',
 			'target_ref_field': 'qty',
 			'source_field': 'qty',
-			'percent_join_field': 'prevdoc_docname',
+			'percent_join_field': 'against_sales_order',
 			'status_field': 'delivery_status',
 			'keyword': 'Delivered'
 		}]
@@ -42,14 +42,6 @@
 			
 	def get_portal_page(self):
 		return "shipment" if self.doc.docstatus==1 else None
-		
-	def get_contact_details(self):
-		return get_obj('Sales Common').get_contact_details(self,0)
-
-
-	def get_comm_rate(self, sales_partner):
-		"""Get Commission rate of Sales Partner"""
-		return get_obj('Sales Common').get_comm_rate(sales_partner, self)
 
 	def set_actual_qty(self):
 		for d in getlist(self.doclist, 'delivery_note_details'):
@@ -57,23 +49,11 @@
 				actual_qty = webnotes.conn.sql("select actual_qty from `tabBin` where item_code = '%s' and warehouse = '%s'" % (d.item_code, d.warehouse))
 				d.actual_qty = actual_qty and flt(actual_qty[0][0]) or 0
 
-
-	def get_barcode_details(self, barcode):
-		return get_obj('Sales Common').get_barcode_details(barcode)
-
-
-	def get_adj_percent(self, arg=''):
-		"""Re-calculates Basic Rate & amount based on Price List Selected"""
-		get_obj('Sales Common').get_adj_percent(self)
-
-	def get_rate(self,arg):
-		return get_obj('Sales Common').get_rate(arg)
-
 	def so_required(self):
 		"""check in manage account if sales order required or not"""
 		if webnotes.conn.get_value("Selling Settings", None, 'so_required') == 'Yes':
 			 for d in getlist(self.doclist,'delivery_note_details'):
-				 if not d.prevdoc_docname:
+				 if not d.against_sales_order:
 					 msgprint("Sales Order No. required against item %s"%d.item_code)
 					 raise Exception
 
@@ -86,46 +66,38 @@
 
 		self.so_required()
 		self.validate_proj_cust()
-		sales_com_obj = get_obj(dt = 'Sales Common')
-		sales_com_obj.check_stop_sales_order(self)
-		sales_com_obj.check_active_sales_items(self)
-		sales_com_obj.get_prevdoc_date(self)
+		self.check_stop_sales_order("against_sales_order")
 		self.validate_for_items()
 		self.validate_warehouse()
 		self.validate_uom_is_integer("stock_uom", "qty")
-		
-		sales_com_obj.validate_max_discount(self, 'delivery_note_details')
-		
-
-		# Set actual qty for each item in selected warehouse
-		self.update_current_stock()
-		
+		self.update_current_stock()		
 		self.validate_with_previous_doc()
 		
 		self.doc.status = 'Draft'
 		if not self.doc.installation_status: self.doc.installation_status = 'Not Installed'	
 		
 	def validate_with_previous_doc(self):
-		prev_doctype = [d.prevdoc_doctype for d in self.doclist.get({
-			"parentfield": "delivery_note_details"}) if cstr(d.prevdoc_doctype) != ""]
-			
-		if prev_doctype:
-			super(DocType, self).validate_with_previous_doc(self.tname, {
-				prev_doctype[0]: {
-					"ref_dn_field": "prevdoc_docname",
-					"compare_fields": [["customer", "="], ["company", "="], ["project_name", "="],
-						["currency", "="]],
-				},
-			})
-			if cint(webnotes.defaults.get_global_default('maintain_same_sales_rate')):
+		items = self.doclist.get({"parentfield": "delivery_note_details"})
+		
+		for fn in (("Sales Order", "against_sales_order"), ("Sales Invoice", "against_sales_invoice")):
+			if items.get_distinct_values(fn[1]):
 				super(DocType, self).validate_with_previous_doc(self.tname, {
-					prev_doctype[0] + " Item": {
-						"ref_dn_field": "prevdoc_detail_docname",
-						"compare_fields": [["export_rate", "="]],
-						"is_child_table": True
-					}
+					fn[0]: {
+						"ref_dn_field": fn[1],
+						"compare_fields": [["customer", "="], ["company", "="], ["project_name", "="],
+							["currency", "="]],
+					},
 				})
-			
+
+				if cint(webnotes.defaults.get_global_default('maintain_same_sales_rate')):
+					super(DocType, self).validate_with_previous_doc(self.tname, {
+						fn[0] + " Item": {
+							"ref_dn_field": "prevdoc_detail_docname",
+							"compare_fields": [["export_rate", "="]],
+							"is_child_table": True
+						}
+					})
+						
 	def validate_proj_cust(self):
 		"""check for does customer belong to same project as entered.."""
 		if self.doc.project_name and self.doc.customer:
@@ -137,8 +109,8 @@
 	def validate_for_items(self):
 		check_list, chk_dupl_itm = [], []
 		for d in getlist(self.doclist,'delivery_note_details'):
-			e = [d.item_code, d.description, d.warehouse, d.prevdoc_docname or '', d.batch_no or '']
-			f = [d.item_code, d.description, d.prevdoc_docname or '']
+			e = [d.item_code, d.description, d.warehouse, d.against_sales_order or d.against_sales_invoice, d.batch_no or '']
+			f = [d.item_code, d.description, d.against_sales_order or d.against_sales_invoice]
 
 			if webnotes.conn.get_value("Item", d.item_code, "is_stock_item") == 'Yes':
 				if e in check_list:
@@ -172,7 +144,8 @@
 			d.projected_qty = bin and flt(bin[0]['projected_qty']) or 0
 			
 	def on_update(self):
-		self.doclist = get_obj('Sales Common').make_packing_list(self,'delivery_note_details')
+		from stock.doctype.packed_item.packed_item import make_packing_list
+		self.doclist = make_packing_list(self, 'delivery_note_details')
 
 	def on_submit(self):
 		self.validate_packed_qty()
@@ -195,8 +168,7 @@
 
 
 	def on_cancel(self):
-		sales_com_obj = get_obj(dt = 'Sales Common')
-		sales_com_obj.check_stop_sales_order(self)
+		self.check_stop_sales_order("against_sales_order")
 		self.check_next_docstatus()
 				
 		self.update_prevdoc_status()
@@ -285,18 +257,15 @@
 			}
 			update_bin(args)
 
-	def get_item_list(self):
-	 return get_obj('Sales Common').get_item_list(self)
-
 	def credit_limit(self):
 		"""check credit limit of items in DN Detail which are not fetched from sales order"""
 		amount, total = 0, 0
 		for d in getlist(self.doclist, 'delivery_note_details'):
-			if not d.prevdoc_docname:
+			if not (d.against_sales_order or d.against_sales_invoice):
 				amount += d.amount
 		if amount != 0:
 			total = (amount/self.doc.net_total)*self.doc.grand_total
-			get_obj('Sales Common').check_credit(self, total)
+			self.check_credit(total)
 
 def get_invoiced_qty_map(delivery_note):
 	"""returns a map: {dn_detail: invoiced_qty}"""
@@ -344,7 +313,7 @@
 				"name": "dn_detail", 
 				"parent": "delivery_note", 
 				"prevdoc_detail_docname": "so_detail", 
-				"prevdoc_docname": "sales_order", 
+				"against_sales_order": "sales_order", 
 				"serial_no": "serial_no"
 			},
 			"postprocess": update_item
@@ -368,7 +337,6 @@
 def make_installation_note(source_name, target_doclist=None):
 	def update_item(obj, target, source_parent):
 		target.qty = flt(obj.qty) - flt(obj.installed_qty)
-		target.prevdoc_date = source_parent.posting_date
 		target.serial_no = obj.serial_no
 	
 	doclist = get_mapped_doclist("Delivery Note", source_name, 	{
diff --git a/stock/doctype/delivery_note/delivery_note.txt b/stock/doctype/delivery_note/delivery_note.txt
index 6834365..7fb166e 100644
--- a/stock/doctype/delivery_note/delivery_note.txt
+++ b/stock/doctype/delivery_note/delivery_note.txt
@@ -2,7 +2,7 @@
  {
   "creation": "2013-05-24 19:29:09", 
   "docstatus": 0, 
-  "modified": "2013-10-11 13:19:40", 
+  "modified": "2013-11-03 14:20:19", 
   "modified_by": "Administrator", 
   "owner": "Administrator"
  }, 
@@ -59,11 +59,10 @@
   "width": "50%"
  }, 
  {
-  "description": "To manage multiple series please go to Setup > Manage Series", 
   "doctype": "DocField", 
   "fieldname": "naming_series", 
   "fieldtype": "Select", 
-  "label": "Document Numbering Series", 
+  "label": "Series", 
   "no_copy": 1, 
   "oldfieldname": "naming_series", 
   "oldfieldtype": "Select", 
@@ -119,7 +118,7 @@
   "doctype": "DocField", 
   "fieldname": "shipping_address_name", 
   "fieldtype": "Link", 
-  "label": "Shipping Address Name", 
+  "label": "Shipping Address", 
   "options": "Address", 
   "print_hide": 1
  }, 
@@ -196,7 +195,6 @@
  }, 
  {
   "default": "Today", 
-  "description": "The date at which current entry will get or has actually executed.", 
   "doctype": "DocField", 
   "fieldname": "posting_date", 
   "fieldtype": "Date", 
@@ -250,7 +248,6 @@
   "read_only": 0
  }, 
  {
-  "description": "Customer's Currency", 
   "doctype": "DocField", 
   "fieldname": "currency", 
   "fieldtype": "Link", 
@@ -267,7 +264,7 @@
   "doctype": "DocField", 
   "fieldname": "conversion_rate", 
   "fieldtype": "Float", 
-  "label": "Conversion Rate", 
+  "label": "Exchange Rate", 
   "no_copy": 0, 
   "oldfieldname": "conversion_rate", 
   "oldfieldtype": "Currency", 
@@ -282,7 +279,6 @@
   "read_only": 0
  }, 
  {
-  "description": "Select the price list as entered in \"Price List\" master. This will pull the reference rates of items against this price list as specified in \"Item\" master.", 
   "doctype": "DocField", 
   "fieldname": "selling_price_list", 
   "fieldtype": "Link", 
@@ -295,7 +291,6 @@
   "reqd": 1
  }, 
  {
-  "description": "Select the currency in which price list is maintained", 
   "doctype": "DocField", 
   "fieldname": "price_list_currency", 
   "fieldtype": "Link", 
@@ -310,7 +305,7 @@
   "doctype": "DocField", 
   "fieldname": "plc_conversion_rate", 
   "fieldtype": "Float", 
-  "label": "Price List Currency Conversion Rate", 
+  "label": "Price List Exchange Rate", 
   "print_hide": 1, 
   "read_only": 0, 
   "reqd": 1
@@ -355,7 +350,7 @@
   "label": "Packing Details", 
   "oldfieldname": "packing_details", 
   "oldfieldtype": "Table", 
-  "options": "Delivery Note Packing Item", 
+  "options": "Packed Item", 
   "print_hide": 1, 
   "read_only": 1
  }, 
@@ -414,7 +409,7 @@
   "doctype": "DocField", 
   "fieldname": "charge", 
   "fieldtype": "Link", 
-  "label": "Apply Taxes and Charges Master", 
+  "label": "Tax Master", 
   "oldfieldname": "charge", 
   "oldfieldtype": "Link", 
   "options": "Sales Taxes and Charges Master", 
@@ -430,7 +425,7 @@
   "doctype": "DocField", 
   "fieldname": "shipping_rule", 
   "fieldtype": "Link", 
-  "label": "Apply Shipping Rule", 
+  "label": "Shipping Rule", 
   "oldfieldtype": "Button", 
   "options": "Shipping Rule", 
   "print_hide": 1, 
@@ -608,7 +603,7 @@
   "doctype": "DocField", 
   "fieldname": "tc_name", 
   "fieldtype": "Link", 
-  "label": "Select Terms and Conditions", 
+  "label": "Terms", 
   "oldfieldname": "tc_name", 
   "oldfieldtype": "Link", 
   "options": "Terms and Conditions", 
@@ -695,6 +690,7 @@
   "read_only": 0
  }, 
  {
+  "description": "<a href=\"#Sales Browser/Territory\">Add / Edit</a>", 
   "doctype": "DocField", 
   "fieldname": "territory", 
   "fieldtype": "Link", 
@@ -708,6 +704,7 @@
   "search_index": 1
  }, 
  {
+  "description": "<a href=\"#Sales Browser/Customer Group\">Add / Edit</a>", 
   "doctype": "DocField", 
   "fieldname": "customer_group", 
   "fieldtype": "Link", 
@@ -737,7 +734,6 @@
   "read_only": 0
  }, 
  {
-  "description": "Filling in Additional Information about the Delivery Note will help you analyze your data better.", 
   "doctype": "DocField", 
   "fieldname": "more_info", 
   "fieldtype": "Section Break", 
@@ -842,7 +838,7 @@
   "doctype": "DocField", 
   "fieldname": "select_print_heading", 
   "fieldtype": "Link", 
-  "label": "Select Print Heading", 
+  "label": "Print Heading", 
   "no_copy": 1, 
   "oldfieldname": "select_print_heading", 
   "oldfieldtype": "Link", 
diff --git a/stock/doctype/delivery_note/templates/pages/shipment.py b/stock/doctype/delivery_note/templates/pages/shipment.py
index a33203b..760ffe0 100644
--- a/stock/doctype/delivery_note/templates/pages/shipment.py
+++ b/stock/doctype/delivery_note/templates/pages/shipment.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 # License: GNU General Public License v3. See license.txt
 
 from __future__ import unicode_literals
diff --git a/stock/doctype/delivery_note/templates/pages/shipments.py b/stock/doctype/delivery_note/templates/pages/shipments.py
index 8b29149..b8fe65a 100644
--- a/stock/doctype/delivery_note/templates/pages/shipments.py
+++ b/stock/doctype/delivery_note/templates/pages/shipments.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 # License: GNU General Public License v3. See license.txt
 
 from __future__ import unicode_literals
diff --git a/stock/doctype/delivery_note/test_delivery_note.py b/stock/doctype/delivery_note/test_delivery_note.py
index ca95a50..64ddff8 100644
--- a/stock/doctype/delivery_note/test_delivery_note.py
+++ b/stock/doctype/delivery_note/test_delivery_note.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 # License: GNU General Public License v3. See license.txt
 
 
@@ -9,20 +9,22 @@
 from webnotes.utils import cint
 from stock.doctype.purchase_receipt.test_purchase_receipt import get_gl_entries, set_perpetual_inventory, test_records as pr_test_records
 
+def _insert_purchase_receipt(item_code=None):
+	if not item_code:
+		item_code = pr_test_records[0][1]["item_code"]
+	
+	pr = webnotes.bean(copy=pr_test_records[0])
+	pr.doclist[1].item_code = item_code
+	pr.insert()
+	pr.submit()
+	
 class TestDeliveryNote(unittest.TestCase):
-	def _insert_purchase_receipt(self, item_code=None):
-		pr = webnotes.bean(copy=pr_test_records[0])
-		if item_code:
-			pr.doclist[1].item_code = item_code
-		pr.insert()
-		pr.submit()
-		
 	def test_over_billing_against_dn(self):
 		self.clear_stock_account_balance()
-		self._insert_purchase_receipt()
+		_insert_purchase_receipt()
 		
 		from stock.doctype.delivery_note.delivery_note import make_sales_invoice
-		self._insert_purchase_receipt()
+		_insert_purchase_receipt()
 		dn = webnotes.bean(copy=test_records[0]).insert()
 		
 		self.assertRaises(webnotes.ValidationError, make_sales_invoice, 
@@ -44,7 +46,7 @@
 		set_perpetual_inventory(0)
 		self.assertEqual(cint(webnotes.defaults.get_global_default("auto_accounting_for_stock")), 0)
 		
-		self._insert_purchase_receipt()
+		_insert_purchase_receipt()
 		
 		dn = webnotes.bean(copy=test_records[0])
 		dn.insert()
@@ -69,7 +71,7 @@
 		self.assertEqual(cint(webnotes.defaults.get_global_default("auto_accounting_for_stock")), 1)
 		webnotes.conn.set_value("Item", "_Test Item", "valuation_method", "FIFO")
 		
-		self._insert_purchase_receipt()
+		_insert_purchase_receipt()
 		
 		dn = webnotes.bean(copy=test_records[0])
 		dn.doclist[1].expense_account = "Cost of Goods Sold - _TC"
@@ -123,8 +125,8 @@
 		self.clear_stock_account_balance()
 		set_perpetual_inventory()
 		
-		self._insert_purchase_receipt()
-		self._insert_purchase_receipt("_Test Item Home Desktop 100")
+		_insert_purchase_receipt()
+		_insert_purchase_receipt("_Test Item Home Desktop 100")
 		
 		dn = webnotes.bean(copy=test_records[0])
 		dn.doclist[1].item_code = "_Test Sales BOM Item"
diff --git a/stock/doctype/delivery_note_item/delivery_note_item.py b/stock/doctype/delivery_note_item/delivery_note_item.py
index 26d0f76..cb6190f 100644
--- a/stock/doctype/delivery_note_item/delivery_note_item.py
+++ b/stock/doctype/delivery_note_item/delivery_note_item.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 # License: GNU General Public License v3. See license.txt
 
 from __future__ import unicode_literals
diff --git a/stock/doctype/delivery_note_item/delivery_note_item.txt b/stock/doctype/delivery_note_item/delivery_note_item.txt
index b74c33a..a118715 100644
--- a/stock/doctype/delivery_note_item/delivery_note_item.txt
+++ b/stock/doctype/delivery_note_item/delivery_note_item.txt
@@ -2,7 +2,7 @@
  {
   "creation": "2013-04-22 13:15:44", 
   "docstatus": 0, 
-  "modified": "2013-08-29 16:58:16", 
+  "modified": "2013-11-02 19:41:38", 
   "modified_by": "Administrator", 
   "owner": "Administrator"
  }, 
@@ -297,6 +297,7 @@
   "width": "120px"
  }, 
  {
+  "description": "<a href=\"#Sales Browser/Item Group\">Add / Edit</a>", 
   "doctype": "DocField", 
   "fieldname": "item_group", 
   "fieldtype": "Link", 
@@ -350,48 +351,17 @@
  }, 
  {
   "doctype": "DocField", 
-  "fieldname": "prevdoc_doctype", 
-  "fieldtype": "Data", 
-  "hidden": 1, 
-  "in_filter": 1, 
-  "label": "Document Type", 
-  "no_copy": 1, 
-  "oldfieldname": "prevdoc_doctype", 
-  "oldfieldtype": "Data", 
-  "print_hide": 1, 
-  "print_width": "150px", 
-  "read_only": 1, 
-  "search_index": 1, 
-  "width": "150px"
+  "fieldname": "against_sales_order", 
+  "fieldtype": "Link", 
+  "label": "Against Sales Order", 
+  "options": "Sales Order"
  }, 
  {
   "doctype": "DocField", 
-  "fieldname": "prevdoc_docname", 
-  "fieldtype": "Data", 
-  "hidden": 0, 
-  "in_filter": 1, 
-  "label": "Against Document No", 
-  "no_copy": 1, 
-  "oldfieldname": "prevdoc_docname", 
-  "oldfieldtype": "Data", 
-  "print_hide": 1, 
-  "print_width": "150px", 
-  "read_only": 1, 
-  "search_index": 1, 
-  "width": "150px"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "prevdoc_date", 
-  "fieldtype": "Date", 
-  "hidden": 1, 
-  "in_filter": 1, 
-  "label": "Against Document Date", 
-  "no_copy": 1, 
-  "oldfieldname": "prevdoc_date", 
-  "oldfieldtype": "Date", 
-  "print_hide": 1, 
-  "read_only": 1
+  "fieldname": "against_sales_invoice", 
+  "fieldtype": "Link", 
+  "label": "Against Sales Invoice", 
+  "options": "Sales Invoice"
  }, 
  {
   "doctype": "DocField", 
@@ -421,6 +391,17 @@
   "read_only": 1
  }, 
  {
+  "doctype": "DocField", 
+  "fieldname": "buying_amount", 
+  "fieldtype": "Currency", 
+  "hidden": 1, 
+  "label": "Buying Amount", 
+  "no_copy": 1, 
+  "options": "Company:company:default_currency", 
+  "print_hide": 1, 
+  "read_only": 1
+ }, 
+ {
   "allow_on_submit": 1, 
   "doctype": "DocField", 
   "fieldname": "page_break", 
diff --git a/stock/doctype/delivery_note_packing_item/README.md b/stock/doctype/delivery_note_packing_item/README.md
deleted file mode 100644
index 20c343a..0000000
--- a/stock/doctype/delivery_note_packing_item/README.md
+++ /dev/null
@@ -1 +0,0 @@
-Item packed in parent Delivery Note. If shipped Items are of type Sales BOM, then this table contains the exploded list of Items shipped.
\ No newline at end of file
diff --git a/stock/doctype/delivery_note_packing_item/__init__.py b/stock/doctype/delivery_note_packing_item/__init__.py
deleted file mode 100644
index baffc48..0000000
--- a/stock/doctype/delivery_note_packing_item/__init__.py
+++ /dev/null
@@ -1 +0,0 @@
-from __future__ import unicode_literals
diff --git a/stock/doctype/delivery_note_packing_item/delivery_note_packing_item.py b/stock/doctype/delivery_note_packing_item/delivery_note_packing_item.py
deleted file mode 100644
index 26d0f76..0000000
--- a/stock/doctype/delivery_note_packing_item/delivery_note_packing_item.py
+++ /dev/null
@@ -1,9 +0,0 @@
-# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
-# License: GNU General Public License v3. See license.txt
-
-from __future__ import unicode_literals
-import webnotes
-
-class DocType:
-	def __init__(self, d, dl):
-		self.doc, self.doclist = d, dl
\ No newline at end of file
diff --git a/stock/doctype/item/item.js b/stock/doctype/item/item.js
index ecd4612..c9aa75e 100644
--- a/stock/doctype/item/item.js
+++ b/stock/doctype/item/item.js
@@ -1,4 +1,4 @@
-// Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+// Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 // License: GNU General Public License v3. See license.txt
 
 cur_frm.cscript.refresh = function(doc) {
@@ -6,20 +6,18 @@
 	// read only if any stock ledger entry exists
 
 	cur_frm.cscript.make_dashboard()
+	erpnext.hide_naming_series();
+		
+	if(!doc.__islocal && doc.show_in_website) {
+		cur_frm.appframe.add_button("View In Website", function() {
+			window.open(doc.page_name);
+		}, "icon-globe");
+	}
 	cur_frm.cscript.edit_prices_button();
 
-	cur_frm.toggle_display("naming_series", sys_defaults.item_naming_by=="Naming Series" 
-		&& doc.__islocal)
-	cur_frm.toggle_display("item_code", sys_defaults.item_naming_by!="Naming Series"
-		&& doc.__islocal)
-
-
-	if ((!doc.__islocal) && (doc.is_stock_item == 'Yes')) {
-		var callback = function(r, rt) {
-			var enabled = (r.message == 'exists') ? false : true;
-			cur_frm.toggle_enable(['has_serial_no', 'is_stock_item', 'valuation_method'], enabled);
-		}
-		return $c_obj(make_doclist(doc.doctype, doc.name),'check_if_sle_exists','',callback);
+	if (!doc.__islocal && doc.is_stock_item == 'Yes') {
+		cur_frm.toggle_enable(['has_serial_no', 'is_stock_item', 'valuation_method'],
+			doc.__sle_exists=="exists" ? false : true);
 	}
 }
 
@@ -126,7 +124,7 @@
 // in the "alternate_description" field
 cur_frm.cscript.add_image = function(doc, dt, dn) {
 	if(!doc.image) {
-		msgprint('Please select an "Image" first');
+		msgprint(wn._('Please select an "Image" first'));
 		return;
 	}
 
@@ -142,7 +140,7 @@
 
   if((doc.nett_weight || doc.gross_weight) && !doc.weight_uom)
   {
-    alert('Weight is mentioned,\nPlease mention "Weight UOM" too');
+    alert(wn._('Weight is mentioned,\nPlease mention "Weight UOM" too'));
     validated=0;
   }
 }
diff --git a/stock/doctype/item/item.py b/stock/doctype/item/item.py
index ca03089..121226a 100644
--- a/stock/doctype/item/item.py
+++ b/stock/doctype/item/item.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 # License: GNU General Public License v3. See license.txt
 
 from __future__ import unicode_literals
@@ -8,12 +8,16 @@
 from webnotes.model.doc import addchild
 from webnotes.model.bean import getlist
 from webnotes import msgprint, _
+from webnotes.webutils import WebsiteGenerator
 
 from webnotes.model.controller import DocListController
 
 class WarehouseNotSet(Exception): pass
 
-class DocType(DocListController):
+class DocType(DocListController, WebsiteGenerator):
+	def onload(self):
+		self.doc.fields["__sle_exists"] = self.check_if_sle_exists()
+	
 	def autoname(self):
 		if webnotes.conn.get_default("item_naming_by")=="Naming Series":
 			from webnotes.model.doc import make_autoname
@@ -209,34 +213,21 @@
 				self.doc.name, raise_exception=1)
 
 	def update_website(self):
-		def _invalidate_cache():
-			from selling.utils.product import invalidate_cache_for
-			
-			invalidate_cache_for(self.doc.item_group)
+		from selling.utils.product import invalidate_cache_for
+		invalidate_cache_for(self.doc.item_group)
+		[invalidate_cache_for(d.item_group) for d in \
+			self.doclist.get({"doctype":"Website Item Group"})]
 
-			[invalidate_cache_for(d.item_group) for d in \
-				self.doclist.get({"doctype":"Website Item Group"})]
+		WebsiteGenerator.on_update(self)
+
+	def get_page_title(self):
+		if self.doc.name==self.doc.item_name:
+			page_name_from = self.doc.name
+		else:
+			page_name_from = self.doc.name + " " + self.doc.item_name
 		
-		if self.doc.show_in_website:
-			from webnotes.webutils import update_page_name
-			if self.doc.name==self.doc.item_name:
-				page_name_from = self.doc.name
-			else:
-				page_name_from = self.doc.name + " " + self.doc.item_name
-
-			update_page_name(self.doc, page_name_from)
-			
-			_invalidate_cache()
+		return page_name_from
 		
-		elif self.doc.page_name:
-			# if unchecked show in website
-			from webnotes.webutils import delete_page_cache
-			delete_page_cache(self.doc.page_name)
-			
-			_invalidate_cache()
-			
-			webnotes.conn.set(self.doc, "page_name", None)
-
 	def get_tax_rate(self, tax_type):
 		return { "tax_rate": webnotes.conn.get_value("Account", tax_type, "tax_rate") }
 
@@ -260,11 +251,8 @@
 		
 	def on_trash(self):
 		webnotes.conn.sql("""delete from tabBin where item_code=%s""", self.doc.item_code)
+		WebsiteGenerator.on_trash(self)
 
-		if self.doc.page_name:
-			from webnotes.webutils import clear_cache
-			clear_cache(self.doc.page_name)
-			
 	def before_rename(self, olddn, newdn, merge=False):
 		if merge:
 			# Validate properties before merging
@@ -305,4 +293,4 @@
 		
 		webnotes.conn.set_default("allow_negative_stock", 
 			webnotes.conn.get_value("Stock Settings", None, "allow_negative_stock"))
-		webnotes.conn.auto_commit_on_many_writes = 0
\ No newline at end of file
+		webnotes.conn.auto_commit_on_many_writes = 0
diff --git a/stock/doctype/item/item.txt b/stock/doctype/item/item.txt
index c70b991..22c5dcc 100644
--- a/stock/doctype/item/item.txt
+++ b/stock/doctype/item/item.txt
@@ -2,7 +2,7 @@
  {
   "creation": "2013-05-03 10:45:46", 
   "docstatus": 0, 
-  "modified": "2013-09-11 11:50:10", 
+  "modified": "2013-11-02 19:41:40", 
   "modified_by": "Administrator", 
   "owner": "Administrator"
  }, 
@@ -57,7 +57,7 @@
   "doctype": "DocField", 
   "fieldname": "naming_series", 
   "fieldtype": "Select", 
-  "label": "Document Numbering Series", 
+  "label": "Series", 
   "options": "\nITEM", 
   "read_only": 0
  }, 
@@ -89,7 +89,7 @@
   "search_index": 1
  }, 
  {
-  "description": "<a href=\"#!Sales Browser/Item Group\">Manage Item Groups</a>", 
+  "description": "<a href=\"#Sales Browser/Item Group\">Add / Edit</a>", 
   "doctype": "DocField", 
   "fieldname": "item_group", 
   "fieldtype": "Link", 
diff --git a/stock/doctype/item/templates/generators/item.html b/stock/doctype/item/templates/generators/item.html
index 7056068..a89eada 100644
--- a/stock/doctype/item/templates/generators/item.html
+++ b/stock/doctype/item/templates/generators/item.html
@@ -3,6 +3,15 @@
 {% block javascript %}
 <script>
 	{% include "app/stock/doctype/item/templates/includes/product_page.js" %}
+	
+	$(function() {
+		if(window.logged_in && getCookie("system_user")==="yes") {
+			wn.has_permission("Item", "{{ name }}", "write", function(r) {
+				wn.require("lib/js/wn/website/editable.js");
+				wn.make_editable($('[itemprop="description"]'), "Item", "{{ name }}", "web_long_description");
+			});
+		}
+	});
 </script>
 {% endblock %}
 
diff --git a/stock/doctype/item/templates/includes/product_list.js b/stock/doctype/item/templates/includes/product_list.js
index 2856bde..268760d 100644
--- a/stock/doctype/item/templates/includes/product_list.js
+++ b/stock/doctype/item/templates/includes/product_list.js
@@ -1,4 +1,4 @@
-// Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+// Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 // License: GNU General Public License v3. See license.txt
 
 window.get_product_list = function() {
@@ -12,7 +12,7 @@
 	
 	$.ajax({
 		method: "GET",
-		url: "server.py",
+		url: "/",
 		dataType: "json",
 		data: {
 			cmd: "selling.utils.product.get_product_list",
diff --git a/stock/doctype/item/templates/includes/product_page.js b/stock/doctype/item/templates/includes/product_page.js
index 6caa71d..df842cc 100644
--- a/stock/doctype/item/templates/includes/product_page.js
+++ b/stock/doctype/item/templates/includes/product_page.js
@@ -1,4 +1,4 @@
-// Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+// Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 // License: GNU General Public License v3. See license.txt
 
 $(document).ready(function() {
diff --git a/stock/doctype/item/templates/includes/product_search_box.html b/stock/doctype/item/templates/includes/product_search_box.html
index 96e571f..00c001b 100644
--- a/stock/doctype/item/templates/includes/product_search_box.html
+++ b/stock/doctype/item/templates/includes/product_search_box.html
@@ -13,17 +13,18 @@
 	<script>
 		// redirect to product search page
 		$(document).ready(function() {
-			$('.dropdown-toggle').dropdown()
+			$('.dropdown-toggle').dropdown();
 			$("#btn-product-search").click(function() {
 				var txt = $("#product-search").val();
 				if(txt) {
-					window.location.href="product_search.html?q=" + txt;
+					window.location.href="product_search?q=" + txt;
 				}
 				return false;
 			});
 			$("#product-search").keypress(function(e) {
-				if(e.which==13)	$("#btn-product-search").click();
-			})
-		})
+				if(e.which==13) $("#btn-product-search").click();
+			});
+			$(".form-search").on("submit", function() { return false; });
+		});
 	</script>
 </div>
\ No newline at end of file
diff --git a/stock/doctype/item/templates/pages/product_search.py b/stock/doctype/item/templates/pages/product_search.py
index 24b474a..41f6b56 100644
--- a/stock/doctype/item/templates/pages/product_search.py
+++ b/stock/doctype/item/templates/pages/product_search.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 # License: GNU General Public License v3. See license.txt
 
 from __future__ import unicode_literals
diff --git a/stock/doctype/item/test_item.py b/stock/doctype/item/test_item.py
index 12bb4e0..b8f6f9e 100644
--- a/stock/doctype/item/test_item.py
+++ b/stock/doctype/item/test_item.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 # License: GNU General Public License v3. See license.txt
 
 from __future__ import unicode_literals
@@ -31,7 +31,7 @@
 		"is_sales_item": "Yes",
 		"is_service_item": "No",
 		"inspection_required": "No",
-		"is_pro_applicable": "No",
+		"is_pro_applicable": "Yes",
 		"is_sub_contracted_item": "No",
 		"stock_uom": "_Test UOM",
 		"default_income_account": "Sales - _TC",
@@ -47,6 +47,26 @@
 	],
 	[{
 		"doctype": "Item",
+		"item_code": "_Test Item 2",
+		"item_name": "_Test Item 2",
+		"description": "_Test Item 2",
+		"item_group": "_Test Item Group",
+		"is_stock_item": "Yes",
+		"is_asset_item": "No",
+		"has_batch_no": "No",
+		"has_serial_no": "No",
+		"is_purchase_item": "Yes",
+		"is_sales_item": "Yes",
+		"is_service_item": "No",
+		"inspection_required": "No",
+		"is_pro_applicable": "Yes",
+		"is_sub_contracted_item": "No",
+		"stock_uom": "_Test UOM",
+		"default_income_account": "Sales - _TC",
+		"default_warehouse": "_Test Warehouse - _TC",
+	}],	
+	[{
+		"doctype": "Item",
 		"item_code": "_Test Item Home Desktop 100",
 		"item_name": "_Test Item Home Desktop 100",
 		"description": "_Test Item Home Desktop 100",
@@ -63,6 +83,7 @@
 		"inspection_required": "No",
 		"is_pro_applicable": "No",
 		"is_sub_contracted_item": "No",
+		"is_manufactured_item": "No",
 		"stock_uom": "_Test UOM"
 	},
 	{
@@ -88,6 +109,7 @@
 		"inspection_required": "No",
 		"is_pro_applicable": "No",
 		"is_sub_contracted_item": "No",
+		"is_manufactured_item": "No",
 		"stock_uom": "_Test UOM"
 	}],
 	[{
@@ -182,8 +204,49 @@
 		"is_sales_item": "Yes",
 		"is_service_item": "No",
 		"inspection_required": "No",
-		"is_pro_applicable": "No",
+		"is_pro_applicable": "Yes",
 		"is_sub_contracted_item": "No",
 		"stock_uom": "_Test UOM"
 	}],
+	[{
+		"doctype": "Item",
+		"item_code": "_Test Item Home Desktop Manufactured",
+		"item_name": "_Test Item Home Desktop Manufactured",
+		"description": "_Test Item Home Desktop Manufactured",
+		"item_group": "_Test Item Group Desktops",
+		"default_warehouse": "_Test Warehouse - _TC",
+		"default_income_account": "Sales - _TC",
+		"is_stock_item": "Yes",
+		"is_asset_item": "No",
+		"has_batch_no": "No",
+		"has_serial_no": "No",
+		"is_purchase_item": "Yes",
+		"is_sales_item": "Yes",
+		"is_service_item": "No",
+		"inspection_required": "No",
+		"is_pro_applicable": "Yes",
+		"is_sub_contracted_item": "No",
+		"is_manufactured_item": "Yes",
+		"stock_uom": "_Test UOM"
+	}],
+	[{
+		"doctype": "Item",
+		"item_code": "_Test FG Item 2",
+		"item_name": "_Test FG Item 2",
+		"description": "_Test FG Item 2",
+		"item_group": "_Test Item Group Desktops",
+		"is_stock_item": "Yes",
+		"default_warehouse": "_Test Warehouse - _TC",
+		"default_income_account": "Sales - _TC",
+		"is_asset_item": "No",
+		"has_batch_no": "No",
+		"has_serial_no": "No",
+		"is_purchase_item": "Yes",
+		"is_sales_item": "Yes",
+		"is_service_item": "No",
+		"inspection_required": "No",
+		"is_pro_applicable": "Yes",
+		"is_sub_contracted_item": "Yes",
+		"stock_uom": "_Test UOM"
+	}],
 ]
\ No newline at end of file
diff --git a/stock/doctype/item_customer_detail/item_customer_detail.py b/stock/doctype/item_customer_detail/item_customer_detail.py
index 26d0f76..cb6190f 100644
--- a/stock/doctype/item_customer_detail/item_customer_detail.py
+++ b/stock/doctype/item_customer_detail/item_customer_detail.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 # License: GNU General Public License v3. See license.txt
 
 from __future__ import unicode_literals
diff --git a/stock/doctype/item_price/item_price.js b/stock/doctype/item_price/item_price.js
index 0a08c98..bece26c 100644
--- a/stock/doctype/item_price/item_price.js
+++ b/stock/doctype/item_price/item_price.js
@@ -1,4 +1,4 @@
-// Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+// Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 // License: GNU General Public License v3. See license.txt
 
 $.extend(cur_frm.cscript, {
diff --git a/stock/doctype/item_price/item_price.py b/stock/doctype/item_price/item_price.py
index b398326..072d700 100644
--- a/stock/doctype/item_price/item_price.py
+++ b/stock/doctype/item_price/item_price.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 # MIT License. See license.txt
 
 # For license information, please see license.txt
diff --git a/stock/doctype/item_price/test_item_price.py b/stock/doctype/item_price/test_item_price.py
index 73b8a8c..583b3de 100644
--- a/stock/doctype/item_price/test_item_price.py
+++ b/stock/doctype/item_price/test_item_price.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 # License: GNU General Public License v3. See license.txt
 
 from __future__ import unicode_literals
diff --git a/stock/doctype/item_quality_inspection_parameter/item_quality_inspection_parameter.py b/stock/doctype/item_quality_inspection_parameter/item_quality_inspection_parameter.py
index 26d0f76..cb6190f 100644
--- a/stock/doctype/item_quality_inspection_parameter/item_quality_inspection_parameter.py
+++ b/stock/doctype/item_quality_inspection_parameter/item_quality_inspection_parameter.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 # License: GNU General Public License v3. See license.txt
 
 from __future__ import unicode_literals
diff --git a/stock/doctype/item_reorder/item_reorder.py b/stock/doctype/item_reorder/item_reorder.py
index 784339d..e5468e5 100644
--- a/stock/doctype/item_reorder/item_reorder.py
+++ b/stock/doctype/item_reorder/item_reorder.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 # License: GNU General Public License v3. See license.txt
 
 # For license information, please see license.txt
diff --git a/stock/doctype/item_supplier/item_supplier.py b/stock/doctype/item_supplier/item_supplier.py
index 26d0f76..cb6190f 100644
--- a/stock/doctype/item_supplier/item_supplier.py
+++ b/stock/doctype/item_supplier/item_supplier.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 # License: GNU General Public License v3. See license.txt
 
 from __future__ import unicode_literals
diff --git a/stock/doctype/item_tax/item_tax.py b/stock/doctype/item_tax/item_tax.py
index 26d0f76..cb6190f 100644
--- a/stock/doctype/item_tax/item_tax.py
+++ b/stock/doctype/item_tax/item_tax.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 # License: GNU General Public License v3. See license.txt
 
 from __future__ import unicode_literals
diff --git a/stock/doctype/item_website_specification/item_website_specification.py b/stock/doctype/item_website_specification/item_website_specification.py
index 784339d..e5468e5 100644
--- a/stock/doctype/item_website_specification/item_website_specification.py
+++ b/stock/doctype/item_website_specification/item_website_specification.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 # License: GNU General Public License v3. See license.txt
 
 # For license information, please see license.txt
diff --git a/stock/doctype/landed_cost_item/landed_cost_item.py b/stock/doctype/landed_cost_item/landed_cost_item.py
index 26d0f76..cb6190f 100644
--- a/stock/doctype/landed_cost_item/landed_cost_item.py
+++ b/stock/doctype/landed_cost_item/landed_cost_item.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 # License: GNU General Public License v3. See license.txt
 
 from __future__ import unicode_literals
diff --git a/stock/doctype/landed_cost_purchase_receipt/landed_cost_purchase_receipt.py b/stock/doctype/landed_cost_purchase_receipt/landed_cost_purchase_receipt.py
index 26d0f76..cb6190f 100644
--- a/stock/doctype/landed_cost_purchase_receipt/landed_cost_purchase_receipt.py
+++ b/stock/doctype/landed_cost_purchase_receipt/landed_cost_purchase_receipt.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 # License: GNU General Public License v3. See license.txt
 
 from __future__ import unicode_literals
diff --git a/stock/doctype/landed_cost_wizard/landed_cost_wizard.js b/stock/doctype/landed_cost_wizard/landed_cost_wizard.js
index 542acbe..68f1bd0 100644
--- a/stock/doctype/landed_cost_wizard/landed_cost_wizard.js
+++ b/stock/doctype/landed_cost_wizard/landed_cost_wizard.js
@@ -1,4 +1,4 @@
-// Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+// Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 // License: GNU General Public License v3. See license.txt
 
 
diff --git a/stock/doctype/landed_cost_wizard/landed_cost_wizard.py b/stock/doctype/landed_cost_wizard/landed_cost_wizard.py
index 071e1dd..95026ad 100644
--- a/stock/doctype/landed_cost_wizard/landed_cost_wizard.py
+++ b/stock/doctype/landed_cost_wizard/landed_cost_wizard.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 # License: GNU General Public License v3. See license.txt
 
 from __future__ import unicode_literals
diff --git a/stock/doctype/material_request/material_request.js b/stock/doctype/material_request/material_request.js
index 6931181..3ca95a4 100644
--- a/stock/doctype/material_request/material_request.js
+++ b/stock/doctype/material_request/material_request.js
@@ -1,4 +1,4 @@
-// Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+// Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 // License: GNU General Public License v3. See license.txt
 
 cur_frm.cscript.tname = "Material Request Item";
@@ -21,23 +21,27 @@
 				+ wn._("Fulfilled"), cint(doc.per_ordered));
 		}
 		
-		if(doc.docstatus == 1 && doc.status != 'Stopped'){
+		if(doc.docstatus==0) {
+			cur_frm.add_custom_button(wn._("Get Items from BOM"), cur_frm.cscript.get_items_from_bom, "icon-sitemap");
+		}
+		
+		if(doc.docstatus == 1 && doc.status != 'Stopped') {
 			if(doc.material_request_type === "Purchase")
-				cur_frm.add_custom_button("Make Supplier Quotation", 
+				cur_frm.add_custom_button(wn._("Make Supplier Quotation"), 
 					this.make_supplier_quotation);
 				
 			if(doc.material_request_type === "Transfer" && doc.status === "Submitted")
-				cur_frm.add_custom_button("Transfer Material", this.make_stock_entry);
+				cur_frm.add_custom_button(wn._("Transfer Material"), this.make_stock_entry);
 			
 			if(flt(doc.per_ordered, 2) < 100) {
 				if(doc.material_request_type === "Purchase")
-					cur_frm.add_custom_button('Make Purchase Order', 
+					cur_frm.add_custom_button(wn._('Make Purchase Order'), 
 						this.make_purchase_order);
 				
-				cur_frm.add_custom_button('Stop Material Request', 
-					cur_frm.cscript['Stop Material Request']);
+				cur_frm.add_custom_button(wn._('Stop Material Request'), 
+					cur_frm.cscript['Stop Material Request'], "icon-exclamation");
 			}
-			cur_frm.add_custom_button('Send SMS', cur_frm.cscript.send_sms);
+			cur_frm.add_custom_button(wn._('Send SMS'), cur_frm.cscript.send_sms, "icon-mobile-phone");
 
 		} 
 		
@@ -58,11 +62,58 @@
 		}
 
 		if(doc.docstatus == 1 && doc.status == 'Stopped')
-			cur_frm.add_custom_button('Unstop Material Request', 
-				cur_frm.cscript['Unstop Material Request']);
+			cur_frm.add_custom_button(wn._('Unstop Material Request'), 
+				cur_frm.cscript['Unstop Material Request'], "icon-check");
 		
 	},
 	
+	schedule_date: function(doc, cdt, cdn) {
+		var val = locals[cdt][cdn].schedule_date;
+		if(val) {
+			$.each(wn.model.get("Material Request Item", { parent: cur_frm.doc.name }), function(i, d) {
+				if(!d.schedule_date) {
+					d.schedule_date = val;
+				}
+			});
+			refresh_field("indent_details");
+		}
+	},
+	
+	get_items_from_bom: function() {
+		var d = new wn.ui.Dialog({
+			title: wn._("Get Items from BOM"),
+			fields: [
+				{"fieldname":"bom", "fieldtype":"Link", "label":wn._("BOM"), 
+					options:"BOM"},
+				{"fieldname":"fetch_exploded", "fieldtype":"Check", 
+					"label":wn._("Fetch exploded BOM (including sub-assemblies)"), "default":1},
+				{fieldname:"fetch", "label":wn._("Get Items from BOM"), "fieldtype":"Button"}
+			]
+		});
+		d.get_input("fetch").on("click", function() {
+			var values = d.get_values();
+			if(!values) return;
+			
+			wn.call({
+				method:"manufacturing.doctype.bom.bom.get_bom_items",
+				args: values,
+				callback: function(r) {
+					$.each(r.message, function(i, item) {
+						var d = wn.model.add_child(cur_frm.doc, "Material Request Item", "indent_details");
+						d.item_code = item.item_code;
+						d.description = item.description;
+						d.warehouse = item.default_warehouse;
+						d.uom = item.stock_uom;
+						d.qty = item.qty;
+					});
+					d.hide();
+					refresh_field("indent_details");
+				}
+			});
+		});
+		d.show();
+	},
+	
 	tc_name: function() {
 		this.get_terms();
 	},
@@ -103,12 +154,12 @@
 cur_frm.cscript.qty = function(doc, cdt, cdn) {
 	var d = locals[cdt][cdn];
 	if (flt(d.qty) < flt(d.min_order_qty))
-		alert("Warning: Material Requested Qty is less than Minimum Order Qty");
+		alert(wn._("Warning: Material Requested Qty is less than Minimum Order Qty"));
 };
 
 cur_frm.cscript['Stop Material Request'] = function() {
 	var doc = cur_frm.doc;
-	var check = confirm("Do you really want to STOP this Material Request?");
+	var check = confirm(wn._("Do you really want to STOP this Material Request?"));
 
 	if (check) {
 		return $c('runserverobj', args={'method':'update_status', 'arg': 'Stopped', 'docs': wn.model.compress(make_doclist(doc.doctype, doc.name))}, function(r,rt) {
@@ -119,7 +170,7 @@
 
 cur_frm.cscript['Unstop Material Request'] = function(){
 	var doc = cur_frm.doc;
-	var check = confirm("Do you really want to UNSTOP this Material Request?");
+	var check = confirm(wn._("Do you really want to UNSTOP this Material Request?"));
 	
 	if (check) {
 		return $c('runserverobj', args={'method':'update_status', 'arg': 'Submitted','docs': wn.model.compress(make_doclist(doc.doctype, doc.name))}, function(r,rt) {
diff --git a/stock/doctype/material_request/material_request.py b/stock/doctype/material_request/material_request.py
index d1672ba..f340cca 100644
--- a/stock/doctype/material_request/material_request.py
+++ b/stock/doctype/material_request/material_request.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 # License: GNU General Public License v3. See license.txt
 
 # ERPNext - web based ERP (http://erpnext.com)
@@ -8,7 +8,7 @@
 import webnotes
 
 from webnotes.utils import cstr, flt
-from webnotes.model.bean import getlist
+from webnotes.model.utils import getlist
 from webnotes.model.code import get_obj
 from webnotes import msgprint, _
 
@@ -20,10 +20,6 @@
 		self.tname = 'Material Request Item'
 		self.fname = 'indent_details'
 
-	# get available qty at warehouse
-	def get_bin_details(self, arg = ''):
-		return get_obj(dt='Purchase Common').get_bin_details(arg)
-
 	def check_if_already_pulled(self):
 		pass#if self.[d.sales_order_no for d in getlist(self.doclist, 'indent_details')]
 
@@ -100,9 +96,6 @@
 				update_bin(args)		
 		
 	def on_submit(self):
-		purchase_controller = webnotes.get_obj("Purchase Common")
-		purchase_controller.is_item_table_empty(self)
-		
 		webnotes.conn.set(self.doc,'status','Submitted')
 		self.update_bin(is_submit = 1, is_stopped = 0)
 	
diff --git a/stock/doctype/material_request/material_request.txt b/stock/doctype/material_request/material_request.txt
index a5f092d..1330c45 100644
--- a/stock/doctype/material_request/material_request.txt
+++ b/stock/doctype/material_request/material_request.txt
@@ -2,12 +2,13 @@
  {
   "creation": "2013-03-07 14:48:38", 
   "docstatus": 0, 
-  "modified": "2013-08-08 14:22:27", 
+  "modified": "2013-11-03 15:29:49", 
   "modified_by": "Administrator", 
   "owner": "Administrator"
  }, 
  {
   "allow_attach": 1, 
+  "allow_import": 1, 
   "allow_print": 0, 
   "autoname": "naming_series:", 
   "doctype": "DocType", 
@@ -49,7 +50,7 @@
   "doctype": "DocField", 
   "fieldname": "type_section", 
   "fieldtype": "Section Break", 
-  "label": "Type", 
+  "label": "Basic Info", 
   "options": "icon-pushpin"
  }, 
  {
@@ -57,7 +58,7 @@
   "fieldname": "material_request_type", 
   "fieldtype": "Select", 
   "in_list_view": 1, 
-  "label": "Material Request Type", 
+  "label": "Type", 
   "options": "Purchase\nTransfer", 
   "reqd": 1
  }, 
@@ -67,11 +68,10 @@
   "fieldtype": "Column Break"
  }, 
  {
-  "description": "To manage multiple series please go to Setup > Manage Series", 
   "doctype": "DocField", 
   "fieldname": "naming_series", 
   "fieldtype": "Select", 
-  "label": "Document Numbering Series", 
+  "label": "Series", 
   "no_copy": 1, 
   "oldfieldname": "naming_series", 
   "oldfieldtype": "Select", 
@@ -128,7 +128,6 @@
   "options": "Material Request Item"
  }, 
  {
-  "description": "Give additional details about the indent.", 
   "doctype": "DocField", 
   "fieldname": "more_info", 
   "fieldtype": "Section Break", 
@@ -145,7 +144,12 @@
   "width": "50%"
  }, 
  {
-  "description": "The date at which current entry is made in system.", 
+  "doctype": "DocField", 
+  "fieldname": "requested_by", 
+  "fieldtype": "Data", 
+  "label": "Requested For"
+ }, 
+ {
   "doctype": "DocField", 
   "fieldname": "transaction_date", 
   "fieldtype": "Date", 
@@ -175,19 +179,6 @@
   "width": "150px"
  }, 
  {
-  "description": "Name of the entity who has requested for the Material Request", 
-  "doctype": "DocField", 
-  "fieldname": "requested_by", 
-  "fieldtype": "Data", 
-  "in_list_view": 0, 
-  "label": "Requested By", 
-  "no_copy": 1, 
-  "oldfieldname": "requested_by", 
-  "oldfieldtype": "Data", 
-  "print_width": "100px", 
-  "width": "100px"
- }, 
- {
   "doctype": "DocField", 
   "fieldname": "column_break2", 
   "fieldtype": "Column Break", 
@@ -196,17 +187,6 @@
   "width": "50%"
  }, 
  {
-  "allow_on_submit": 1, 
-  "doctype": "DocField", 
-  "fieldname": "letter_head", 
-  "fieldtype": "Select", 
-  "label": "Letter Head", 
-  "oldfieldname": "letter_head", 
-  "oldfieldtype": "Select", 
-  "options": "link:Letter Head", 
-  "print_hide": 1
- }, 
- {
   "doctype": "DocField", 
   "fieldname": "status", 
   "fieldtype": "Select", 
@@ -225,6 +205,26 @@
   "width": "100px"
  }, 
  {
+  "allow_on_submit": 1, 
+  "doctype": "DocField", 
+  "fieldname": "letter_head", 
+  "fieldtype": "Select", 
+  "label": "Letter Head", 
+  "oldfieldname": "letter_head", 
+  "oldfieldtype": "Select", 
+  "options": "link:Letter Head", 
+  "print_hide": 1
+ }, 
+ {
+  "allow_on_submit": 1, 
+  "doctype": "DocField", 
+  "fieldname": "select_print_heading", 
+  "fieldtype": "Link", 
+  "label": "Print Heading", 
+  "options": "Print Heading", 
+  "print_hide": 1
+ }, 
+ {
   "description": "% of materials ordered against this Material Request", 
   "doctype": "DocField", 
   "fieldname": "per_ordered", 
@@ -239,20 +239,6 @@
  }, 
  {
   "doctype": "DocField", 
-  "fieldname": "remark", 
-  "fieldtype": "Small Text", 
-  "in_list_view": 0, 
-  "label": "Remarks", 
-  "no_copy": 1, 
-  "oldfieldname": "remark", 
-  "oldfieldtype": "Small Text", 
-  "print_hide": 0, 
-  "print_width": "150px", 
-  "width": "150px"
- }, 
- {
-  "description": "Add Terms and Conditions for the Material Request. You can also prepare a Terms and Conditions Master and use the Template", 
-  "doctype": "DocField", 
   "fieldname": "terms_section_break", 
   "fieldtype": "Section Break", 
   "label": "Terms and Conditions", 
@@ -263,7 +249,7 @@
   "doctype": "DocField", 
   "fieldname": "tc_name", 
   "fieldtype": "Link", 
-  "label": "Select Terms and Conditions", 
+  "label": "Terms", 
   "oldfieldname": "tc_name", 
   "oldfieldtype": "Link", 
   "options": "Terms and Conditions", 
@@ -279,15 +265,6 @@
   "oldfieldtype": "Text Editor"
  }, 
  {
-  "allow_on_submit": 1, 
-  "doctype": "DocField", 
-  "fieldname": "select_print_heading", 
-  "fieldtype": "Link", 
-  "label": "Select Print Heading", 
-  "options": "Print Heading", 
-  "print_hide": 1
- }, 
- {
   "doctype": "DocPerm", 
   "role": "Purchase Manager"
  }, 
diff --git a/stock/doctype/material_request/test_material_request.py b/stock/doctype/material_request/test_material_request.py
index 13fdd02..c19bfd3 100644
--- a/stock/doctype/material_request/test_material_request.py
+++ b/stock/doctype/material_request/test_material_request.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 # License: GNU General Public License v3. See license.txt
 
 # ERPNext - web based ERP (http://erpnext.com)
diff --git a/stock/doctype/material_request_item/material_request_item.py b/stock/doctype/material_request_item/material_request_item.py
index 784339d..e5468e5 100644
--- a/stock/doctype/material_request_item/material_request_item.py
+++ b/stock/doctype/material_request_item/material_request_item.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 # License: GNU General Public License v3. See license.txt
 
 # For license information, please see license.txt
diff --git a/stock/doctype/material_request_item/material_request_item.txt b/stock/doctype/material_request_item/material_request_item.txt
index dae97e0..15884a3 100644
--- a/stock/doctype/material_request_item/material_request_item.txt
+++ b/stock/doctype/material_request_item/material_request_item.txt
@@ -2,7 +2,7 @@
  {
   "creation": "2013-02-22 01:28:02", 
   "docstatus": 0, 
-  "modified": "2013-08-07 14:45:11", 
+  "modified": "2013-11-03 20:36:45", 
   "modified_by": "Administrator", 
   "owner": "Administrator"
  }, 
@@ -76,20 +76,6 @@
  }, 
  {
   "doctype": "DocField", 
-  "fieldname": "warehouse", 
-  "fieldtype": "Link", 
-  "in_list_view": 1, 
-  "label": "Warehouse", 
-  "oldfieldname": "warehouse", 
-  "oldfieldtype": "Link", 
-  "options": "Warehouse", 
-  "print_hide": 0, 
-  "print_width": "100px", 
-  "reqd": 0, 
-  "width": "100px"
- }, 
- {
-  "doctype": "DocField", 
   "fieldname": "qty", 
   "fieldtype": "Float", 
   "in_list_view": 1, 
@@ -118,6 +104,26 @@
  }, 
  {
   "doctype": "DocField", 
+  "fieldname": "warehouse", 
+  "fieldtype": "Link", 
+  "in_list_view": 1, 
+  "label": "For Warehouse", 
+  "oldfieldname": "warehouse", 
+  "oldfieldtype": "Link", 
+  "options": "Warehouse", 
+  "print_hide": 0, 
+  "print_width": "100px", 
+  "reqd": 0, 
+  "width": "100px"
+ }, 
+ {
+  "doctype": "DocField", 
+  "fieldname": "more_info", 
+  "fieldtype": "Section Break", 
+  "label": "More Info"
+ }, 
+ {
+  "doctype": "DocField", 
   "fieldname": "lead_time_date", 
   "fieldtype": "Date", 
   "in_list_view": 0, 
@@ -138,11 +144,12 @@
   "oldfieldname": "item_name", 
   "oldfieldtype": "Data", 
   "print_width": "100px", 
-  "reqd": 1, 
+  "reqd": 0, 
   "search_index": 1, 
   "width": "100px"
  }, 
  {
+  "description": "<a href=\"#Sales Browser/Item Group\">Add / Edit</a>", 
   "doctype": "DocField", 
   "fieldname": "item_group", 
   "fieldtype": "Link", 
diff --git a/patches/november_2013/__init__.py b/stock/doctype/packed_item/__init__.py
similarity index 100%
copy from patches/november_2013/__init__.py
copy to stock/doctype/packed_item/__init__.py
diff --git a/stock/doctype/packed_item/packed_item.py b/stock/doctype/packed_item/packed_item.py
new file mode 100644
index 0000000..a58444d
--- /dev/null
+++ b/stock/doctype/packed_item/packed_item.py
@@ -0,0 +1,105 @@
+# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
+# MIT License. See license.txt
+
+# For license information, please see license.txt
+
+from __future__ import unicode_literals
+import webnotes
+from webnotes.utils import cstr, flt
+from webnotes.model.doc import addchild
+from webnotes.model.bean import getlist
+
+class DocType:
+	def __init__(self, d, dl):
+		self.doc, self.doclist = d, dl
+		
+def get_sales_bom_items(item_code):
+	return webnotes.conn.sql("""select t1.item_code, t1.qty, t1.uom 
+		from `tabSales BOM Item` t1, `tabSales BOM` t2 
+		where t2.new_item_code=%s and t1.parent = t2.name""", item_code, as_dict=1)
+
+def get_packing_item_details(item):
+	return webnotes.conn.sql("""select item_name, description, stock_uom from `tabItem` 
+		where name = %s""", item, as_dict = 1)[0]
+
+def get_bin_qty(item, warehouse):
+	det = webnotes.conn.sql("""select actual_qty, projected_qty from `tabBin` 
+		where item_code = %s and warehouse = %s""", (item, warehouse), as_dict = 1)
+	return det and det[0] or ''
+
+def update_packing_list_item(obj, packing_item_code, qty, warehouse, line, packing_list_idx):
+	bin = get_bin_qty(packing_item_code, warehouse)
+	item = get_packing_item_details(packing_item_code)
+
+	# check if exists
+	exists = 0
+	for d in getlist(obj.doclist, 'packing_details'):
+		if d.parent_item == line.item_code and d.item_code == packing_item_code and d.parent_detail_docname == line.name:
+			pi, exists = d, 1
+			break
+
+	if not exists:
+		pi = addchild(obj.doc, 'packing_details', 'Packed Item', obj.doclist)
+
+	pi.parent_item = line.item_code
+	pi.item_code = packing_item_code
+	pi.item_name = item['item_name']
+	pi.parent_detail_docname = line.name
+	pi.description = item['description']
+	pi.uom = item['stock_uom']
+	pi.qty = flt(qty)
+	pi.actual_qty = bin and flt(bin['actual_qty']) or 0
+	pi.projected_qty = bin and flt(bin['projected_qty']) or 0
+	if not pi.warehouse:
+		pi.warehouse = warehouse
+	if not pi.batch_no:
+		pi.batch_no = cstr(line.batch_no)
+	pi.idx = packing_list_idx
+	
+	# saved, since this function is called on_update of delivery note
+	pi.save()
+	
+	packing_list_idx += 1
+
+
+def make_packing_list(obj, item_table_fieldname):
+	"""make packing list for sales bom item"""
+	packing_list_idx = 0
+	parent_items = []
+	for d in obj.doclist.get({"parentfield": item_table_fieldname}):
+		warehouse = (item_table_fieldname == "sales_order_details") \
+			and d.reserved_warehouse or d.warehouse
+		if webnotes.conn.get_value("Sales BOM", {"new_item_code": d.item_code}):
+			for i in get_sales_bom_items(d.item_code):
+				update_packing_list_item(obj, i['item_code'], flt(i['qty'])*flt(d.qty), 
+					warehouse, d, packing_list_idx)
+
+			if [d.item_code, d.name] not in parent_items:
+				parent_items.append([d.item_code, d.name])
+			
+	obj.doclist = cleanup_packing_list(obj, parent_items)
+	
+	return obj.doclist
+	
+def cleanup_packing_list(obj, parent_items):
+	"""Remove all those child items which are no longer present in main item table"""
+	delete_list = []
+	for d in obj.doclist.get({"parentfield": "packing_details"}):
+		if [d.parent_item, d.parent_detail_docname] not in parent_items:
+			# mark for deletion from doclist
+			delete_list.append(d.name)
+
+	if not delete_list:
+		return obj.doclist
+	
+	# delete from doclist
+	obj.doclist = webnotes.doclist(filter(lambda d: d.name not in delete_list, obj.doclist))
+	
+	# delete from db
+	webnotes.conn.sql("""\
+		delete from `tabPacked Item`
+		where name in (%s)"""
+		% (", ".join(["%s"] * len(delete_list))),
+		tuple(delete_list))
+		
+	return obj.doclist
\ No newline at end of file
diff --git a/stock/doctype/delivery_note_packing_item/delivery_note_packing_item.txt b/stock/doctype/packed_item/packed_item.txt
similarity index 95%
rename from stock/doctype/delivery_note_packing_item/delivery_note_packing_item.txt
rename to stock/doctype/packed_item/packed_item.txt
index 441b13a..8320502 100644
--- a/stock/doctype/delivery_note_packing_item/delivery_note_packing_item.txt
+++ b/stock/doctype/packed_item/packed_item.txt
@@ -2,7 +2,7 @@
  {
   "creation": "2013-02-22 01:28:00", 
   "docstatus": 0, 
-  "modified": "2013-07-10 14:54:08", 
+  "modified": "2013-10-16 16:37:31", 
   "modified_by": "Administrator", 
   "owner": "Administrator"
  }, 
@@ -15,14 +15,14 @@
  {
   "doctype": "DocField", 
   "name": "__common__", 
-  "parent": "Delivery Note Packing Item", 
+  "parent": "Packed Item", 
   "parentfield": "fields", 
   "parenttype": "DocType", 
   "permlevel": 0
  }, 
  {
   "doctype": "DocType", 
-  "name": "Delivery Note Packing Item"
+  "name": "Packed Item"
  }, 
  {
   "doctype": "DocField", 
diff --git a/stock/doctype/packing_slip/packing_slip.js b/stock/doctype/packing_slip/packing_slip.js
index eba20c5..a0e82e7 100644
--- a/stock/doctype/packing_slip/packing_slip.js
+++ b/stock/doctype/packing_slip/packing_slip.js
@@ -1,4 +1,4 @@
-// Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+// Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 // License: GNU General Public License v3. See license.txt
 
 cur_frm.fields_dict['delivery_note'].get_query = function(doc, cdt, cdn) {
@@ -45,13 +45,13 @@
 cur_frm.cscript.validate_case_nos = function(doc) {
 	doc = locals[doc.doctype][doc.name];
 	if(cint(doc.from_case_no)==0) {
-		msgprint("Case No. cannot be 0")
+		msgprint(wn._("Case No. cannot be 0"))
 		validated = false;
 	} else if(!cint(doc.to_case_no)) {
 		doc.to_case_no = doc.from_case_no;
 		refresh_field('to_case_no');
 	} else if(cint(doc.to_case_no) < cint(doc.from_case_no)) {
-		msgprint("'To Case No.' cannot be less than 'From Case No.'");
+		msgprint(wn._("'To Case No.' cannot be less than 'From Case No.'"));
 		validated = false;
 	}	
 }
@@ -72,14 +72,14 @@
 	for(var i=0; i<ps_detail.length; i++) {
 		for(var j=0; j<ps_detail.length; j++) {
 			if(i!=j && ps_detail[i].item_code && ps_detail[i].item_code==ps_detail[j].item_code) {
-				msgprint("You have entered duplicate items. Please rectify and try again.");
+				msgprint(wn._("You have entered duplicate items. Please rectify and try again."));
 				validated = false;
 				return;
 			}
 		}
 		if(flt(ps_detail[i].qty)<=0) {
-			msgprint("Invalid quantity specified for item " + ps_detail[i].item_code +
-				". Quantity should be greater than 0.");
+			msgprint(wn._("Invalid quantity specified for item ") + ps_detail[i].item_code +
+				"."+wn._(" Quantity should be greater than 0."));
 			validated = false;
 		}
 	}
@@ -95,9 +95,9 @@
 	for(var i=0; i<ps_detail.length; i++) {
 		var item = ps_detail[i];
 		if(item.weight_uom != doc.net_weight_uom) {
-			msgprint("Different UOM for items will lead to incorrect \
-			(Total) Net Weight value. Make sure that Net Weight of each item is \
-			in the same UOM.")
+			msgprint(wn._("Different UOM for items will lead to incorrect")+
+			wn._("(Total) Net Weight value. Make sure that Net Weight of each item is")+
+			wn._("in the same UOM."))
 			validated = false;
 		}
 		net_weight_pkg += flt(item.net_weight) * flt(item.qty);
diff --git a/stock/doctype/packing_slip/packing_slip.py b/stock/doctype/packing_slip/packing_slip.py
index 50cdab9..8501b2b 100644
--- a/stock/doctype/packing_slip/packing_slip.py
+++ b/stock/doctype/packing_slip/packing_slip.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 # License: GNU General Public License v3. See license.txt
 
 from __future__ import unicode_literals
diff --git a/stock/doctype/packing_slip/packing_slip.txt b/stock/doctype/packing_slip/packing_slip.txt
index 08e71ec..c86e90f 100644
--- a/stock/doctype/packing_slip/packing_slip.txt
+++ b/stock/doctype/packing_slip/packing_slip.txt
@@ -2,7 +2,7 @@
  {
   "creation": "2013-04-11 15:32:24", 
   "docstatus": 0, 
-  "modified": "2013-08-08 14:22:28", 
+  "modified": "2013-11-02 14:05:59", 
   "modified_by": "Administrator", 
   "owner": "Administrator"
  }, 
@@ -78,7 +78,7 @@
   "doctype": "DocField", 
   "fieldname": "naming_series", 
   "fieldtype": "Select", 
-  "label": "Document Numbering Series", 
+  "label": "Series", 
   "no_copy": 0, 
   "options": "PS", 
   "print_hide": 1, 
diff --git a/stock/doctype/packing_slip_item/packing_slip_item.py b/stock/doctype/packing_slip_item/packing_slip_item.py
index 784339d..e5468e5 100644
--- a/stock/doctype/packing_slip_item/packing_slip_item.py
+++ b/stock/doctype/packing_slip_item/packing_slip_item.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 # License: GNU General Public License v3. See license.txt
 
 # For license information, please see license.txt
diff --git a/stock/doctype/price_list/price_list.js b/stock/doctype/price_list/price_list.js
index be3aeaa..4615e13 100644
--- a/stock/doctype/price_list/price_list.js
+++ b/stock/doctype/price_list/price_list.js
@@ -1,4 +1,4 @@
-// Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+// Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 // License: GNU General Public License v3. See license.txt
 
 $.extend(cur_frm.cscript, {
diff --git a/stock/doctype/price_list/price_list.py b/stock/doctype/price_list/price_list.py
index 993f4ea..226b9da 100644
--- a/stock/doctype/price_list/price_list.py
+++ b/stock/doctype/price_list/price_list.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 # License: GNU General Public License v3. See license.txt
 
 from __future__ import unicode_literals
diff --git a/stock/doctype/price_list/test_price_list.py b/stock/doctype/price_list/test_price_list.py
index e3fa791..86dcd1a 100644
--- a/stock/doctype/price_list/test_price_list.py
+++ b/stock/doctype/price_list/test_price_list.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 # License: GNU General Public License v3. See license.txt
 
 from __future__ import unicode_literals
diff --git a/stock/doctype/purchase_receipt/purchase_receipt.js b/stock/doctype/purchase_receipt/purchase_receipt.js
index 9f9aa15..c647305 100644
--- a/stock/doctype/purchase_receipt/purchase_receipt.js
+++ b/stock/doctype/purchase_receipt/purchase_receipt.js
@@ -1,4 +1,4 @@
-// Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+// Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 // License: GNU General Public License v3. See license.txt
 
 cur_frm.cscript.tname = "Purchase Receipt Item";
@@ -17,7 +17,7 @@
 		
 		if(this.frm.doc.docstatus == 1) {
 			if(!this.frm.doc.__billing_complete) {
-				cur_frm.add_custom_button('Make Purchase Invoice', 
+				cur_frm.add_custom_button(wn._('Make Purchase Invoice'), 
 					this.make_purchase_invoice);
 			}
 			cur_frm.add_custom_button('Send SMS', cur_frm.cscript.send_sms);
@@ -25,7 +25,7 @@
 			this.show_stock_ledger();
 			this.show_general_ledger();
 		} else {
-			cur_frm.add_custom_button(wn._('From Purchase Order'), 
+			cur_frm.add_custom_button(wn._(wn._('From Purchase Order')), 
 				function() {
 					wn.model.map_current_doc({
 						method: "buying.doctype.purchase_order.purchase_order.make_purchase_receipt",
@@ -140,7 +140,7 @@
 		}
 	}
 	else{
-		alert("Please enter Item Code.");
+		alert(wn._("Please enter Item Code."));
 	}
 }
 
diff --git a/stock/doctype/purchase_receipt/purchase_receipt.py b/stock/doctype/purchase_receipt/purchase_receipt.py
index 1d91c4b..f8173bf 100644
--- a/stock/doctype/purchase_receipt/purchase_receipt.py
+++ b/stock/doctype/purchase_receipt/purchase_receipt.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 # License: GNU General Public License v3. See license.txt
 
 from __future__ import unicode_literals
@@ -38,10 +38,6 @@
 			total_qty = sum((item.qty for item in self.doclist.get({"parentfield": "purchase_receipt_details"})))
 			self.doc.fields["__billing_complete"] = billed_qty[0][0] == total_qty
 
-	# get available qty at warehouse
-	def get_bin_details(self, arg = ''):
-		return get_obj(dt='Purchase Common').get_bin_details(arg)
-
 	def validate(self):
 		super(DocType, self).validate()
 		
@@ -63,7 +59,6 @@
 
 		pc_obj = get_obj(dt='Purchase Common')
 		pc_obj.validate_for_items(self)
-		pc_obj.get_prevdoc_date(self)
 		self.check_for_stopped_status(pc_obj)
 
 		# sub-contracting
@@ -232,7 +227,6 @@
 	# on submit
 	def on_submit(self):
 		purchase_controller = webnotes.get_obj("Purchase Common")
-		purchase_controller.is_item_table_empty(self)
 
 		# Check for Approving Authority
 		get_obj('Authorization Control').validate_approving_authority(self.doc.doctype, self.doc.company, self.doc.grand_total)
@@ -290,7 +284,6 @@
 				bin = webnotes.conn.sql("select actual_qty from `tabBin` where item_code = %s and warehouse = %s", (d.rm_item_code, self.doc.supplier_warehouse), as_dict = 1)
 				d.current_stock = bin and flt(bin[0]['actual_qty']) or 0
 
-
 	def get_rate(self,arg):
 		return get_obj('Purchase Common').get_rate(arg,self)
 		
diff --git a/stock/doctype/purchase_receipt/purchase_receipt.txt b/stock/doctype/purchase_receipt/purchase_receipt.txt
index f228a14..6035b71 100755
--- a/stock/doctype/purchase_receipt/purchase_receipt.txt
+++ b/stock/doctype/purchase_receipt/purchase_receipt.txt
@@ -2,7 +2,7 @@
  {
   "creation": "2013-05-21 16:16:39", 
   "docstatus": 0, 
-  "modified": "2013-10-11 13:20:13", 
+  "modified": "2013-11-03 14:20:21", 
   "modified_by": "Administrator", 
   "owner": "Administrator"
  }, 
@@ -56,11 +56,10 @@
   "width": "50%"
  }, 
  {
-  "description": "To manage multiple series please go to Setup > Manage Series", 
   "doctype": "DocField", 
   "fieldname": "naming_series", 
   "fieldtype": "Select", 
-  "label": "Document Numbering Series", 
+  "label": "Series", 
   "no_copy": 1, 
   "oldfieldname": "naming_series", 
   "oldfieldtype": "Select", 
@@ -136,7 +135,6 @@
   "width": "50%"
  }, 
  {
-  "description": "The date at which current entry will get or has actually executed.", 
   "doctype": "DocField", 
   "fieldname": "posting_date", 
   "fieldtype": "Date", 
@@ -203,7 +201,6 @@
   "options": "icon-tag"
  }, 
  {
-  "description": "Supplier's currency", 
   "doctype": "DocField", 
   "fieldname": "currency", 
   "fieldtype": "Link", 
@@ -234,7 +231,6 @@
   "width": "50%"
  }, 
  {
-  "description": "Consider this Price List for fetching rate. (only which have \"For Buying\" as checked)", 
   "doctype": "DocField", 
   "fieldname": "buying_price_list", 
   "fieldtype": "Link", 
@@ -489,7 +485,6 @@
   "read_only": 1
  }, 
  {
-  "description": "Add Terms and Conditions for the Purchase Receipt. You can also prepare a Terms and Conditions Master and use the Template.", 
   "doctype": "DocField", 
   "fieldname": "terms_section_break", 
   "fieldtype": "Section Break", 
@@ -501,7 +496,7 @@
   "doctype": "DocField", 
   "fieldname": "tc_name", 
   "fieldtype": "Link", 
-  "label": "Select Terms and Conditions", 
+  "label": "Terms", 
   "oldfieldname": "tc_name", 
   "oldfieldtype": "Link", 
   "options": "Terms and Conditions", 
@@ -545,7 +540,6 @@
   "print_hide": 1
  }, 
  {
-  "description": "Filing in Additional Information about the Purchase Receipt will help you analyze your data better.", 
   "doctype": "DocField", 
   "fieldname": "more_info", 
   "fieldtype": "Section Break", 
@@ -632,7 +626,7 @@
   "doctype": "DocField", 
   "fieldname": "select_print_heading", 
   "fieldtype": "Link", 
-  "label": "Select Print Heading", 
+  "label": "Print Heading", 
   "no_copy": 1, 
   "oldfieldname": "select_print_heading", 
   "oldfieldtype": "Link", 
diff --git a/stock/doctype/purchase_receipt/test_purchase_receipt.py b/stock/doctype/purchase_receipt/test_purchase_receipt.py
index 010c29b..96d1a13 100644
--- a/stock/doctype/purchase_receipt/test_purchase_receipt.py
+++ b/stock/doctype/purchase_receipt/test_purchase_receipt.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 # License: GNU General Public License v3. See license.txt
 
 
@@ -104,6 +104,7 @@
 		pr.doclist[1].received_qty = 1
 		pr.insert()
 		pr.submit()
+		
 		self.assertEquals(webnotes.conn.get_value("Serial No", pr.doclist[1].serial_no, 
 			"supplier"), pr.doc.supplier)
 			
@@ -112,7 +113,7 @@
 	def test_serial_no_cancel(self):
 		pr = self.test_serial_no_supplier()
 		pr.cancel()
-
+		
 		self.assertFalse(webnotes.conn.get_value("Serial No", pr.doclist[1].serial_no, 
 			"warehouse"))
 			
diff --git a/stock/doctype/purchase_receipt_item/purchase_receipt_item.py b/stock/doctype/purchase_receipt_item/purchase_receipt_item.py
index 26d0f76..cb6190f 100644
--- a/stock/doctype/purchase_receipt_item/purchase_receipt_item.py
+++ b/stock/doctype/purchase_receipt_item/purchase_receipt_item.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 # License: GNU General Public License v3. See license.txt
 
 from __future__ import unicode_literals
diff --git a/stock/doctype/purchase_receipt_item/purchase_receipt_item.txt b/stock/doctype/purchase_receipt_item/purchase_receipt_item.txt
index ce49168..22ded6d 100755
--- a/stock/doctype/purchase_receipt_item/purchase_receipt_item.txt
+++ b/stock/doctype/purchase_receipt_item/purchase_receipt_item.txt
@@ -2,7 +2,7 @@
  {
   "creation": "2013-05-24 19:29:10", 
   "docstatus": 0, 
-  "modified": "2013-09-20 11:36:55", 
+  "modified": "2013-11-02 19:41:45", 
   "modified_by": "Administrator", 
   "owner": "Administrator"
  }, 
@@ -369,6 +369,7 @@
   "read_only": 1
  }, 
  {
+  "description": "<a href=\"#Sales Browser/Item Group\">Add / Edit</a>", 
   "doctype": "DocField", 
   "fieldname": "item_group", 
   "fieldtype": "Link", 
@@ -426,19 +427,6 @@
  }, 
  {
   "doctype": "DocField", 
-  "fieldname": "prevdoc_date", 
-  "fieldtype": "Date", 
-  "hidden": 1, 
-  "in_filter": 1, 
-  "label": "Purchase Order Date", 
-  "no_copy": 1, 
-  "oldfieldname": "prevdoc_date", 
-  "oldfieldtype": "Date", 
-  "print_hide": 1, 
-  "read_only": 1
- }, 
- {
-  "doctype": "DocField", 
   "fieldname": "rm_supp_cost", 
   "fieldtype": "Currency", 
   "hidden": 1, 
diff --git a/stock/doctype/serial_no/serial_no.js b/stock/doctype/serial_no/serial_no.js
index 83631cd..67eb779 100644
--- a/stock/doctype/serial_no/serial_no.js
+++ b/stock/doctype/serial_no/serial_no.js
@@ -1,4 +1,4 @@
-// Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+// Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 // License: GNU General Public License v3. See license.txt
 
 cur_frm.add_fetch("customer", "customer_name", "customer_name")
diff --git a/stock/doctype/serial_no/serial_no.py b/stock/doctype/serial_no/serial_no.py
index db32ca0..c7a10ed 100644
--- a/stock/doctype/serial_no/serial_no.py
+++ b/stock/doctype/serial_no/serial_no.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 # License: GNU General Public License v3. See license.txt
 
 from __future__ import unicode_literals
@@ -22,9 +22,9 @@
 class SerialNoDuplicateError(ValidationError): pass
 
 class DocType(StockController):
-	def __init__(self, doc, doclist=[]):
+	def __init__(self, doc, doclist=None):
 		self.doc = doc
-		self.doclist = doclist
+		self.doclist = doclist or []
 		self.via_stock_ledger = False
 
 	def validate(self):
@@ -36,7 +36,6 @@
 		self.validate_amc_status()
 		self.validate_warehouse()
 		self.validate_item()
-		
 		self.on_stock_ledger_entry()
 
 	def validate_amc_status(self):
@@ -181,6 +180,15 @@
 			self.set_purchase_details()
 			self.set_sales_details()
 
+	def on_stock_ledger_entry(self):
+		if self.via_stock_ledger and not self.doc.fields.get("__islocal"):
+			self.set_status()
+			self.set_purchase_details()
+			self.set_sales_details()
+			
+	def on_communication(self):
+		return
+
 def process_serial_no(sle):
 	item_det = get_item_details(sle.item_code)
 	validate_serial_no(sle, item_det)
@@ -237,7 +245,6 @@
 		serial_nos = []
 		for i in xrange(cint(sle.actual_qty)):
 			serial_nos.append(make_autoname(item_det.serial_no_series))
-
 		webnotes.conn.set(sle, "serial_no", "\n".join(serial_nos))
 		
 	if sle.serial_no:
@@ -287,4 +294,4 @@
 
 		if d.serial_no != serial_no:
 			d.serial_no = serial_no
-			webnotes.conn.set_value(d.doctype, d.name, "serial_no", serial_no)
\ No newline at end of file
+			webnotes.conn.set_value(d.doctype, d.name, "serial_no", serial_no)
diff --git a/stock/doctype/serial_no/serial_no.txt b/stock/doctype/serial_no/serial_no.txt
index 8500303..b29a1a8 100644
--- a/stock/doctype/serial_no/serial_no.txt
+++ b/stock/doctype/serial_no/serial_no.txt
@@ -2,7 +2,7 @@
  {
   "creation": "2013-05-16 10:59:15", 
   "docstatus": 0, 
-  "modified": "2013-08-28 19:13:09", 
+  "modified": "2013-11-02 19:41:52", 
   "modified_by": "Administrator", 
   "owner": "Administrator"
  }, 
@@ -143,6 +143,7 @@
   "width": "300px"
  }, 
  {
+  "description": "<a href=\"#Sales Browser/Item Group\">Add / Edit</a>", 
   "doctype": "DocField", 
   "fieldname": "item_group", 
   "fieldtype": "Link", 
diff --git a/stock/doctype/serial_no/test_serial_no.py b/stock/doctype/serial_no/test_serial_no.py
index de82449..8ce36cd 100644
--- a/stock/doctype/serial_no/test_serial_no.py
+++ b/stock/doctype/serial_no/test_serial_no.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 # License: GNU General Public License v3. See license.txt
 
 # ERPNext - web based ERP (http://erpnext.com)
diff --git a/stock/doctype/stock_entry/stock_entry.js b/stock/doctype/stock_entry/stock_entry.js
index b471256..ed41d7d 100644
--- a/stock/doctype/stock_entry/stock_entry.js
+++ b/stock/doctype/stock_entry/stock_entry.js
@@ -1,4 +1,4 @@
-// Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+// Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 // License: GNU General Public License v3. See license.txt
 
 cur_frm.cscript.tname = "Stock Entry Detail";
@@ -70,10 +70,10 @@
 		if(this.frm.doc.docstatus === 1 && 
 				wn.boot.profile.can_create.indexOf("Journal Voucher")!==-1) {
 			if(this.frm.doc.purpose === "Sales Return") {
-				this.frm.add_custom_button("Make Credit Note", function() { me.make_return_jv(); });
+				this.frm.add_custom_button(wn._("Make Credit Note"), function() { me.make_return_jv(); });
 				this.add_excise_button();
 			} else if(this.frm.doc.purpose === "Purchase Return") {
-				this.frm.add_custom_button("Make Debit Note", function() { me.make_return_jv(); });
+				this.frm.add_custom_button(wn._("Make Debit Note"), function() { me.make_return_jv(); });
 				this.add_excise_button();
 			}
 		}
@@ -195,7 +195,7 @@
 	
 	add_excise_button: function() {
 		if(wn.boot.control_panel.country === "India")
-			this.frm.add_custom_button("Make Excise Invoice", function() {
+			this.frm.add_custom_button(wn._("Make Excise Invoice"), function() {
 				var excise = wn.model.make_new_doc_and_get_name('Journal Voucher');
 				excise = locals['Journal Voucher'][excise];
 				excise.voucher_type = 'Excise Voucher';
@@ -318,7 +318,7 @@
 			}
 		}			
 	} else {
-		msgprint("Please enter Item Code to get batch no");
+		msgprint(wn._("Please enter Item Code to get batch no"));
 	}
 }
 
@@ -372,7 +372,7 @@
 cur_frm.cscript.validate_items = function(doc) {
 	cl = getchildren('Stock Entry Detail', doc.name, 'mtn_details');
 	if (!cl.length) {
-		alert("Item table can not be blank");
+		alert(wn._("Item table can not be blank"));
 		validated = false;
 	}
 }
@@ -391,4 +391,4 @@
 
 cur_frm.fields_dict.supplier.get_query = function(doc, cdt, cdn) {
 	return{	query:"controllers.queries.supplier_query" }
-}
\ No newline at end of file
+}
diff --git a/stock/doctype/stock_entry/stock_entry.py b/stock/doctype/stock_entry/stock_entry.py
index c91239d..919d6b2 100644
--- a/stock/doctype/stock_entry/stock_entry.py
+++ b/stock/doctype/stock_entry/stock_entry.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 # License: GNU General Public License v3. See license.txt
 
 from __future__ import unicode_literals
@@ -15,7 +15,6 @@
 from controllers.queries import get_match_cond
 import json
 
-sql = webnotes.conn.sql
 
 class NotUpdateStockError(webnotes.ValidationError): pass
 class StockOverReturnError(webnotes.ValidationError): pass
@@ -56,7 +55,6 @@
 
 		from stock.doctype.serial_no.serial_no import update_serial_nos_after_submit
 		update_serial_nos_after_submit(self, "mtn_details")
-		
 		self.update_production_order()
 		self.make_gl_entries()
 
@@ -368,8 +366,7 @@
 					
 	def get_item_details(self, arg):
 		arg = json.loads(arg)
-		
-		item = sql("""select stock_uom, description, item_name, 
+		item = webnotes.conn.sql("""select stock_uom, description, item_name, 
 			purchase_account, cost_center from `tabItem` 
 			where name = %s and (ifnull(end_of_life,'')='' or end_of_life ='0000-00-00' 
 			or end_of_life > now())""", (arg.get('item_code')), as_dict = 1)
@@ -397,7 +394,7 @@
 
 	def get_uom_details(self, arg = ''):
 		arg, ret = eval(arg), {}
-		uom = sql("""select conversion_factor from `tabUOM Conversion Detail` 
+		uom = webnotes.conn.sql("""select conversion_factor from `tabUOM Conversion Detail` 
 			where parent = %s and uom = %s""", (arg['item_code'], arg['uom']), as_dict = 1)
 		if not uom or not flt(uom[0].conversion_factor):
 			msgprint("There is no Conversion Factor for UOM '%s' in Item '%s'" % (arg['uom'],
@@ -496,77 +493,16 @@
 		self.get_stock_and_rate()
 	
 	def get_bom_raw_materials(self, qty):
-		""" 
-			get all items from flat bom except 
-			child items of sub-contracted and sub assembly items 
-			and sub assembly items itself.
-		"""
+		from manufacturing.doctype.bom.bom import get_bom_items_as_dict
+		
 		# item dict = { item_code: {qty, description, stock_uom} }
-		item_dict = {}
+		item_dict = get_bom_items_as_dict(self.doc.bom_no, qty=qty, fetch_exploded = self.doc.use_multi_level_bom)
 		
-		def _make_items_dict(items_list):
-			"""makes dict of unique items with it's qty"""
-			for item in items_list:
-				if item_dict.has_key(item.item_code):
-					item_dict[item.item_code]["qty"] += flt(item.qty)
-				else:
-					item_dict[item.item_code] = {
-						"qty": flt(item.qty), 
-						"item_name": item.item_name, 
-						"description": item.description, 
-						"stock_uom": item.stock_uom,
-						"from_warehouse": item.default_warehouse,
-						"expense_account": item.purchase_account,
-						"cost_center": item.cost_center
-					}
-		
-		if self.doc.use_multi_level_bom:
-			# get all raw materials with sub assembly childs					
-			fl_bom_sa_child_item = sql("""select 
-					fb.item_code, 
-					ifnull(sum(fb.qty_consumed_per_unit),0)*%s as qty, 
-					fb.description, 
-					fb.stock_uom,
-					it.item_name,
-					it.default_warehouse,
-					it.purchase_account,
-					it.cost_center
-				from 
-					`tabBOM Explosion Item` fb,`tabItem` it 
-				where 
-					it.name = fb.item_code 
-					and ifnull(it.is_pro_applicable, 'No') = 'No'
-					and ifnull(it.is_sub_contracted_item, 'No') = 'No' 
-					and fb.docstatus < 2 
-					and fb.parent=%s group by item_code, stock_uom""", 
-				(qty, self.doc.bom_no), as_dict=1)
-			
-			if fl_bom_sa_child_item:
-				_make_items_dict(fl_bom_sa_child_item)
-		else:
-			# get only BOM items
-			fl_bom_sa_items = sql("""select 
-					`tabItem`.item_code,
-					`tabItem`.item_name,
-					ifnull(sum(`tabBOM Item`.qty_consumed_per_unit), 0) *%s as qty,
-					`tabItem`.description, 
-					`tabItem`.stock_uom,
-					`tabItem`.default_warehouse,
-					`tabItem`.purchase_account,
-					`tabItem`.cost_center
-				from 
-					`tabBOM Item`, `tabItem`
-				where 
-					`tabBOM Item`.parent = %s and 
-					`tabBOM Item`.item_code = tabItem.name and
-					`tabBOM Item`.docstatus < 2 
-				group by item_code""", (qty, self.doc.bom_no), as_dict=1)
-			
-			if fl_bom_sa_items:
-				_make_items_dict(fl_bom_sa_items)
+		for item in item_dict.values():
+			item.from_warehouse = item.default_warehouse
 			
 		return item_dict
-	
+			
 	def get_pending_raw_materials(self, pro_obj):
 		"""
 			issue (item quantity) that is pending to issue or desire to transfer,
@@ -606,7 +542,7 @@
 
 	def get_issued_qty(self):
 		issued_item_qty = {}
-		result = sql("""select t1.item_code, sum(t1.qty)
+		result = webnotes.conn.sql("""select t1.item_code, sum(t1.qty)
 			from `tabStock Entry Detail` t1, `tabStock Entry` t2
 			where t1.parent = t2.name and t2.production_order = %s and t2.docstatus = 1
 			and t2.purpose = 'Material Transfer'
@@ -664,7 +600,7 @@
 		
 	def get_cust_addr(self):
 		from utilities.transaction_base import get_default_address, get_address_display
-		res = sql("select customer_name from `tabCustomer` where name = '%s'"%self.doc.customer)
+		res = webnotes.conn.sql("select customer_name from `tabCustomer` where name = '%s'"%self.doc.customer)
 		address_display = None
 		customer_address = get_default_address("customer", self.doc.customer)
 		if customer_address:
@@ -685,7 +621,7 @@
 		
 	def get_supp_addr(self):
 		from utilities.transaction_base import get_default_address, get_address_display
-		res = sql("""select supplier_name from `tabSupplier`
+		res = webnotes.conn.sql("""select supplier_name from `tabSupplier`
 			where name=%s""", self.doc.supplier)
 		address_display = None
 		supplier_address = get_default_address("customer", self.doc.customer)
@@ -924,8 +860,7 @@
 		ref.doclist[0].name)
 	
 	if not invoices_against_delivery:
-		sales_orders_against_delivery = [d.prevdoc_docname for d in 
-			ref.doclist.get({"prevdoc_doctype": "Sales Order"}) if d.prevdoc_docname]
+		sales_orders_against_delivery = [d.against_sales_order for d in ref.doclist if d.against_sales_order]
 		
 		if sales_orders_against_delivery:
 			invoices_against_delivery = get_invoice_list("Sales Invoice Item", "sales_order",
diff --git a/stock/doctype/stock_entry/stock_entry.txt b/stock/doctype/stock_entry/stock_entry.txt
index 204ebfa..ca9b5f2 100644
--- a/stock/doctype/stock_entry/stock_entry.txt
+++ b/stock/doctype/stock_entry/stock_entry.txt
@@ -2,7 +2,7 @@
  {
   "creation": "2013-04-09 11:43:55", 
   "docstatus": 0, 
-  "modified": "2013-08-24 15:16:34", 
+  "modified": "2013-11-03 14:11:42", 
   "modified_by": "Administrator", 
   "owner": "Administrator"
  }, 
@@ -66,13 +66,12 @@
  }, 
  {
   "allow_on_submit": 0, 
-  "description": "To manage multiple series please go to Setup > Manage Series", 
   "doctype": "DocField", 
   "fieldname": "naming_series", 
   "fieldtype": "Select", 
   "hidden": 0, 
   "in_filter": 0, 
-  "label": "Document Numbering Series", 
+  "label": "Series", 
   "no_copy": 1, 
   "oldfieldname": "naming_series", 
   "oldfieldtype": "Select", 
@@ -165,7 +164,6 @@
  {
   "allow_on_submit": 0, 
   "default": "Today", 
-  "description": "The date at which current entry will get or has actually executed.", 
   "doctype": "DocField", 
   "fieldname": "posting_date", 
   "fieldtype": "Date", 
@@ -535,7 +533,7 @@
   "fieldtype": "Link", 
   "hidden": 0, 
   "in_filter": 0, 
-  "label": "Select Print Heading", 
+  "label": "Print Heading", 
   "no_copy": 0, 
   "oldfieldname": "select_print_heading", 
   "oldfieldtype": "Link", 
diff --git a/stock/doctype/stock_entry/test_stock_entry.py b/stock/doctype/stock_entry/test_stock_entry.py
index 3a18c69..d6f34f6 100644
--- a/stock/doctype/stock_entry/test_stock_entry.py
+++ b/stock/doctype/stock_entry/test_stock_entry.py
@@ -1,9 +1,6 @@
-# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 # License: GNU General Public License v3. See license.txt
 
-# ERPNext - web based ERP (http://erpnext.com)
-# For license information, please see license.txt
-
 from __future__ import unicode_literals
 import webnotes, unittest
 from webnotes.utils import flt
@@ -47,7 +44,6 @@
 		self._clear_stock_account_balance()
 		webnotes.bean("Profile", "test2@example.com").get_controller()\
 			.add_roles("Sales User", "Sales Manager", "Material User", "Material Manager")
-		
 		webnotes.session.user = "test2@example.com"
 
 		from stock.utils import InvalidWarehouseCompany
@@ -67,7 +63,6 @@
 
 		webnotes.bean("Profile", "test2@example.com").get_controller()\
 			.add_roles("Sales User", "Sales Manager", "Material User", "Material Manager")
-		
 		webnotes.session.user = "test@example.com"
 		st1 = webnotes.bean(copy=test_records[0])
 		st1.doc.company = "_Test Company 1"
diff --git a/stock/doctype/stock_entry_detail/stock_entry_detail.py b/stock/doctype/stock_entry_detail/stock_entry_detail.py
index 26d0f76..cb6190f 100644
--- a/stock/doctype/stock_entry_detail/stock_entry_detail.py
+++ b/stock/doctype/stock_entry_detail/stock_entry_detail.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 # License: GNU General Public License v3. See license.txt
 
 from __future__ import unicode_literals
diff --git a/stock/doctype/stock_entry_detail/stock_entry_detail.txt b/stock/doctype/stock_entry_detail/stock_entry_detail.txt
index 5218c1a..b97928b 100644
--- a/stock/doctype/stock_entry_detail/stock_entry_detail.txt
+++ b/stock/doctype/stock_entry_detail/stock_entry_detail.txt
@@ -2,7 +2,7 @@
  {
   "creation": "2013-03-29 18:22:12", 
   "docstatus": 0, 
-  "modified": "2013-10-23 14:35:46", 
+  "modified": "2013-11-08 16:15:44", 
   "modified_by": "Administrator", 
   "owner": "Administrator"
  }, 
@@ -110,25 +110,9 @@
  }, 
  {
   "doctype": "DocField", 
-  "fieldname": "incoming_rate", 
-  "fieldtype": "Currency", 
-  "in_list_view": 1, 
-  "label": "Valuation Rate", 
-  "oldfieldname": "incoming_rate", 
-  "oldfieldtype": "Currency", 
-  "options": "Company:company:default_currency", 
-  "read_only": 0, 
-  "reqd": 0
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "amount", 
-  "fieldtype": "Currency", 
-  "label": "Amount", 
-  "oldfieldname": "amount", 
-  "oldfieldtype": "Currency", 
-  "options": "Company:company:default_currency", 
-  "read_only": 1
+  "fieldname": "serial_no_batch", 
+  "fieldtype": "Section Break", 
+  "label": "Serial No / Batch"
  }, 
  {
   "doctype": "DocField", 
@@ -153,6 +137,34 @@
   "read_only": 0
  }, 
  {
+  "doctype": "DocField", 
+  "fieldname": "accounting", 
+  "fieldtype": "Section Break", 
+  "label": "Accounting"
+ }, 
+ {
+  "doctype": "DocField", 
+  "fieldname": "incoming_rate", 
+  "fieldtype": "Currency", 
+  "in_list_view": 1, 
+  "label": "Valuation Rate", 
+  "oldfieldname": "incoming_rate", 
+  "oldfieldtype": "Currency", 
+  "options": "Company:company:default_currency", 
+  "read_only": 0, 
+  "reqd": 0
+ }, 
+ {
+  "doctype": "DocField", 
+  "fieldname": "amount", 
+  "fieldtype": "Currency", 
+  "label": "Amount", 
+  "oldfieldname": "amount", 
+  "oldfieldtype": "Currency", 
+  "options": "Company:company:default_currency", 
+  "read_only": 1
+ }, 
+ {
   "depends_on": "eval:sys_defaults.auto_accounting_for_stock", 
   "doctype": "DocField", 
   "fieldname": "expense_account", 
@@ -176,6 +188,12 @@
  }, 
  {
   "doctype": "DocField", 
+  "fieldname": "more_info", 
+  "fieldtype": "Section Break", 
+  "label": "More Info"
+ }, 
+ {
+  "doctype": "DocField", 
   "fieldname": "actual_qty", 
   "fieldtype": "Float", 
   "in_filter": 1, 
diff --git a/stock/doctype/stock_ledger/stock_ledger.py b/stock/doctype/stock_ledger/stock_ledger.py
new file mode 100644
index 0000000..062d70f
--- /dev/null
+++ b/stock/doctype/stock_ledger/stock_ledger.py
@@ -0,0 +1,57 @@
+# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
+# License: GNU General Public License v3. See license.txt
+
+from __future__ import unicode_literals
+import webnotes
+
+from webnotes.utils import add_days, cstr, flt, nowdate, cint, now
+from webnotes.model.doc import Document
+from webnotes.model.bean import getlist
+from webnotes.model.code import get_obj
+from webnotes import session, msgprint
+from stock.utils import get_valid_serial_nos
+
+
+class DocType:
+	def __init__(self, doc, doclist=[]):
+		self.doc = doc
+		self.doclist = doclist
+		
+	def update_stock(self, values, is_amended = 'No'):
+		for v in values:
+			sle_id = ''
+			
+			# reverse quantities for cancel
+			if v.get('is_cancelled') == 'Yes':
+				v['actual_qty'] = -flt(v['actual_qty'])
+				# cancel matching entry
+				webnotes.conn.sql("""update `tabStock Ledger Entry` set is_cancelled='Yes',
+					modified=%s, modified_by=%s
+					where voucher_no=%s and voucher_type=%s""", 
+					(now(), webnotes.session.user, v['voucher_no'], v['voucher_type']))
+
+			if v.get("actual_qty"):
+				sle_id = self.make_entry(v)
+				
+			args = v.copy()
+			args.update({
+				"sle_id": sle_id,
+				"is_amended": is_amended
+			})
+			
+			get_obj('Warehouse', v["warehouse"]).update_bin(args)
+
+
+	def make_entry(self, args):
+		args.update({"doctype": "Stock Ledger Entry"})
+		sle = webnotes.bean([args])
+		sle.ignore_permissions = 1
+		sle.insert()
+		return sle.doc.name
+	
+	def repost(self):
+		"""
+		Repost everything!
+		"""
+		for wh in webnotes.conn.sql("select name from tabWarehouse"):
+			get_obj('Warehouse', wh[0]).repost_stock()
diff --git a/stock/doctype/stock_ledger_entry/stock_ledger_entry.py b/stock/doctype/stock_ledger_entry/stock_ledger_entry.py
index 1738efc..f059451 100644
--- a/stock/doctype/stock_ledger_entry/stock_ledger_entry.py
+++ b/stock/doctype/stock_ledger_entry/stock_ledger_entry.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 # License: GNU General Public License v3. See license.txt
 
 from __future__ import unicode_literals
@@ -14,7 +14,6 @@
 
 	def validate(self):
 		from stock.utils import validate_warehouse_user, validate_warehouse_company
-
 		self.validate_mandatory()
 		self.validate_item()
 		validate_warehouse_user(self.doc.warehouse)
diff --git a/stock/doctype/stock_ledger_entry/stock_ledger_entry.txt b/stock/doctype/stock_ledger_entry/stock_ledger_entry.txt
index a5ea161..641a68c 100644
--- a/stock/doctype/stock_ledger_entry/stock_ledger_entry.txt
+++ b/stock/doctype/stock_ledger_entry/stock_ledger_entry.txt
@@ -2,7 +2,7 @@
  {
   "creation": "2013-01-29 19:25:42", 
   "docstatus": 0, 
-  "modified": "2013-08-23 12:23:18", 
+  "modified": "2013-11-03 14:11:43", 
   "modified_by": "Administrator", 
   "owner": "Administrator"
  }, 
@@ -92,7 +92,6 @@
   "width": "100px"
  }, 
  {
-  "description": "The date at which current entry will get or has actually executed.", 
   "doctype": "DocField", 
   "fieldname": "posting_date", 
   "fieldtype": "Date", 
diff --git a/stock/doctype/stock_reconciliation/stock_reconciliation.js b/stock/doctype/stock_reconciliation/stock_reconciliation.js
index 7373648..fc50246 100644
--- a/stock/doctype/stock_reconciliation/stock_reconciliation.js
+++ b/stock/doctype/stock_reconciliation/stock_reconciliation.js
@@ -1,4 +1,4 @@
-// Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+// Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 // License: GNU General Public License v3. See license.txt
 
 wn.require("public/app/js/controllers/stock_controller.js");
@@ -48,13 +48,13 @@
 			this.show_download_template();
 			this.show_upload();
 			if(this.frm.doc.reconciliation_json) {
-				this.frm.set_intro("You can submit this Stock Reconciliation.");
+				this.frm.set_intro(wn._("You can submit this Stock Reconciliation."));
 			} else {
-				this.frm.set_intro("Download the Template, fill appropriate data and \
-					attach the modified file.");
+				this.frm.set_intro(wn._("Download the Template, fill appropriate data and \
+					attach the modified file."));
 			}
 		} else if(this.frm.doc.docstatus == 1) {
-			this.frm.set_intro("Cancelling this Stock Reconciliation will nullify its effect.");
+			this.frm.set_intro(wn._("Cancelling this Stock Reconciliation will nullify its effect."));
 			this.show_stock_ledger();
 			this.show_general_ledger();
 		} else {
@@ -66,20 +66,20 @@
 	
 	show_download_template: function() {
 		var me = this;
-		this.frm.add_custom_button("Download Template", function() {
-			this.title = "Stock Reconcilation Template";
-			wn.tools.downloadify([["Stock Reconciliation"],
+		this.frm.add_custom_button(wn._("Download Template"), function() {
+			this.title = wn._("Stock Reconcilation Template");
+			wn.tools.downloadify([[wn._("Stock Reconciliation")],
 				["----"],
-				["Stock Reconciliation can be used to update the stock on a particular date,"
-					+ " usually as per physical inventory."],
-				["When submitted, the system creates difference entries"
-					+ " to set the given stock and valuation on this date."],
-				["It can also be used to create opening stock entries and to fix stock value."],
+				[wn._("Stock Reconciliation can be used to update the stock on a particular date, ")
+					+ wn._("usually as per physical inventory.")],
+				[wn._("When submitted, the system creates difference entries ")
+					+ wn._("to set the given stock and valuation on this date.")],
+				[wn._("It can also be used to create opening stock entries and to fix stock value.")],
 				["----"],
-				["Notes:"],
-				["Item Code and Warehouse should already exist."],
-				["You can update either Quantity or Valuation Rate or both."],
-				["If no change in either Quantity or Valuation Rate, leave the cell blank."],
+				[wn._("Notes:")],
+				[wn._("Item Code and Warehouse should already exist.")],
+				[wn._("You can update either Quantity or Valuation Rate or both.")],
+				[wn._("If no change in either Quantity or Valuation Rate, leave the cell blank.")],
 				["----"],
 				["Item Code", "Warehouse", "Quantity", "Valuation Rate"]], null, this);
 			return false;
@@ -113,8 +113,8 @@
 	show_download_reconciliation_data: function() {
 		var me = this;
 		if(this.frm.doc.reconciliation_json) {
-			this.frm.add_custom_button("Download Reconcilation Data", function() {
-				this.title = "Stock Reconcilation Data";
+			this.frm.add_custom_button(wn._("Download Reconcilation Data"), function() {
+				this.title = wn._("Stock Reconcilation Data");
 				wn.tools.downloadify(JSON.parse(me.frm.doc.reconciliation_json), null, this);
 				return false;
 			}, "icon-download");
diff --git a/stock/doctype/stock_reconciliation/stock_reconciliation.py b/stock/doctype/stock_reconciliation/stock_reconciliation.py
index 22d0117..01ded1a 100644
--- a/stock/doctype/stock_reconciliation/stock_reconciliation.py
+++ b/stock/doctype/stock_reconciliation/stock_reconciliation.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 # License: GNU General Public License v3. See license.txt
 
 from __future__ import unicode_literals
diff --git a/stock/doctype/stock_reconciliation/test_stock_reconciliation.py b/stock/doctype/stock_reconciliation/test_stock_reconciliation.py
index 0434f82..984e508 100644
--- a/stock/doctype/stock_reconciliation/test_stock_reconciliation.py
+++ b/stock/doctype/stock_reconciliation/test_stock_reconciliation.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 # License: GNU General Public License v3. See license.txt
 
 # ERPNext - web based ERP (http://erpnext.com)
diff --git a/stock/doctype/stock_settings/stock_settings.py b/stock/doctype/stock_settings/stock_settings.py
index bc7dcba..48e1ee1 100644
--- a/stock/doctype/stock_settings/stock_settings.py
+++ b/stock/doctype/stock_settings/stock_settings.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 # License: GNU General Public License v3. See license.txt
 
 # For license information, please see license.txt
@@ -6,6 +6,7 @@
 from __future__ import unicode_literals
 import webnotes
 
+
 class DocType:
 	def __init__(self, d, dl):
 		self.doc, self.doclist = d, dl
@@ -14,3 +15,8 @@
 		for key in ["item_naming_by", "item_group", "stock_uom", 
 			"allow_negative_stock"]:
 			webnotes.conn.set_default(key, self.doc.fields.get(key, ""))
+			
+		from setup.doctype.naming_series.naming_series import set_by_naming_series
+		set_by_naming_series("Item", "item_code", 
+			self.doc.get("item_naming_by")=="Naming Series", hide_name_field=True)
+			
diff --git a/stock/doctype/stock_settings/stock_settings.txt b/stock/doctype/stock_settings/stock_settings.txt
index e8edd03..634ee3a 100644
--- a/stock/doctype/stock_settings/stock_settings.txt
+++ b/stock/doctype/stock_settings/stock_settings.txt
@@ -2,7 +2,7 @@
  {
   "creation": "2013-06-24 16:37:54", 
   "docstatus": 0, 
-  "modified": "2013-07-05 14:56:41", 
+  "modified": "2013-11-02 19:41:56", 
   "modified_by": "Administrator", 
   "owner": "Administrator"
  }, 
@@ -46,7 +46,7 @@
   "options": "Item Code\nNaming Series"
  }, 
  {
-  "description": "<a href=\"#Sales Browser/Item Group\">Manage Item Groups</a>", 
+  "description": "<a href=\"#Sales Browser/Item Group\">Add / Edit</a>", 
   "doctype": "DocField", 
   "fieldname": "item_group", 
   "fieldtype": "Link", 
diff --git a/stock/doctype/stock_uom_replace_utility/stock_uom_replace_utility.js b/stock/doctype/stock_uom_replace_utility/stock_uom_replace_utility.js
index 65e10dd..77e8dcf 100644
--- a/stock/doctype/stock_uom_replace_utility/stock_uom_replace_utility.js
+++ b/stock/doctype/stock_uom_replace_utility/stock_uom_replace_utility.js
@@ -1,4 +1,4 @@
-// Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+// Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 // License: GNU General Public License v3. See license.txt
 
 $.extend(cur_frm.cscript, {
diff --git a/stock/doctype/stock_uom_replace_utility/stock_uom_replace_utility.py b/stock/doctype/stock_uom_replace_utility/stock_uom_replace_utility.py
index 321e3c9..5441c24 100644
--- a/stock/doctype/stock_uom_replace_utility/stock_uom_replace_utility.py
+++ b/stock/doctype/stock_uom_replace_utility/stock_uom_replace_utility.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 # License: GNU General Public License v3. See license.txt
 
 from __future__ import unicode_literals
@@ -10,7 +10,6 @@
 from webnotes.model.code import get_obj
 from webnotes import msgprint, _
 
-sql = webnotes.conn.sql
 
 class DocType:
 	def __init__(self, d, dl=[]):
@@ -34,7 +33,7 @@
 			msgprint("Please Enter Conversion Factor.")
 			raise Exception
 		
-		stock_uom = sql("select stock_uom from `tabItem` where name = '%s'" % self.doc.item_code)
+		stock_uom = webnotes.conn.sql("select stock_uom from `tabItem` where name = '%s'" % self.doc.item_code)
 		stock_uom = stock_uom and stock_uom[0][0]
 		if cstr(self.doc.new_stock_uom) == cstr(stock_uom):
 			msgprint("Item Master is already updated with New Stock UOM " + cstr(self.doc.new_stock_uom))
@@ -50,9 +49,9 @@
 	def update_bin(self):
 		# update bin
 		if flt(self.doc.conversion_factor) != flt(1):
-			sql("update `tabBin` set stock_uom = '%s' , indented_qty = ifnull(indented_qty,0) * %s, ordered_qty = ifnull(ordered_qty,0) * %s, reserved_qty = ifnull(reserved_qty,0) * %s, planned_qty = ifnull(planned_qty,0) * %s, projected_qty = actual_qty + ordered_qty + indented_qty + planned_qty - reserved_qty	where item_code = '%s'" % (self.doc.new_stock_uom, self.doc.conversion_factor, self.doc.conversion_factor, self.doc.conversion_factor, self.doc.conversion_factor, self.doc.item_code) )
+			webnotes.conn.sql("update `tabBin` set stock_uom = '%s' , indented_qty = ifnull(indented_qty,0) * %s, ordered_qty = ifnull(ordered_qty,0) * %s, reserved_qty = ifnull(reserved_qty,0) * %s, planned_qty = ifnull(planned_qty,0) * %s, projected_qty = actual_qty + ordered_qty + indented_qty + planned_qty - reserved_qty	where item_code = '%s'" % (self.doc.new_stock_uom, self.doc.conversion_factor, self.doc.conversion_factor, self.doc.conversion_factor, self.doc.conversion_factor, self.doc.item_code) )
 		else:
-			sql("update `tabBin` set stock_uom = '%s' where item_code = '%s'" % (self.doc.new_stock_uom, self.doc.item_code) )
+			webnotes.conn.sql("update `tabBin` set stock_uom = '%s' where item_code = '%s'" % (self.doc.new_stock_uom, self.doc.item_code) )
 
 		# acknowledge user
 		msgprint(" All Bins Updated Successfully.")
@@ -62,16 +61,16 @@
 		from stock.stock_ledger import update_entries_after
 		
 		if flt(self.doc.conversion_factor) != flt(1):
-			sql("update `tabStock Ledger Entry` set stock_uom = '%s', actual_qty = ifnull(actual_qty,0) * '%s' where item_code = '%s' " % (self.doc.new_stock_uom, self.doc.conversion_factor, self.doc.item_code))
+			webnotes.conn.sql("update `tabStock Ledger Entry` set stock_uom = '%s', actual_qty = ifnull(actual_qty,0) * '%s' where item_code = '%s' " % (self.doc.new_stock_uom, self.doc.conversion_factor, self.doc.item_code))
 		else:
-			sql("update `tabStock Ledger Entry` set stock_uom = '%s' where item_code = '%s' " % (self.doc.new_stock_uom, self.doc.item_code))
+			webnotes.conn.sql("update `tabStock Ledger Entry` set stock_uom = '%s' where item_code = '%s' " % (self.doc.new_stock_uom, self.doc.item_code))
 		
 		# acknowledge user
 		msgprint("Stock Ledger Entries Updated Successfully.")
 		
 		# update item valuation
 		if flt(self.doc.conversion_factor) != flt(1):
-			wh = sql("select name from `tabWarehouse`")
+			wh = webnotes.conn.sql("select name from `tabWarehouse`")
 			for w in wh:
 				update_entries_after({"item_code": self.doc.item_code, "warehouse": w[0]})
 
diff --git a/stock/doctype/uom_conversion_detail/uom_conversion_detail.py b/stock/doctype/uom_conversion_detail/uom_conversion_detail.py
index 26d0f76..cb6190f 100644
--- a/stock/doctype/uom_conversion_detail/uom_conversion_detail.py
+++ b/stock/doctype/uom_conversion_detail/uom_conversion_detail.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 # License: GNU General Public License v3. See license.txt
 
 from __future__ import unicode_literals
diff --git a/stock/doctype/warehouse/test_warehouse.py b/stock/doctype/warehouse/test_warehouse.py
index 43b2600..ffc5a28 100644
--- a/stock/doctype/warehouse/test_warehouse.py
+++ b/stock/doctype/warehouse/test_warehouse.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 # License: GNU General Public License v3. See license.txt
 
 test_records = [
diff --git a/stock/doctype/warehouse/warehouse.js b/stock/doctype/warehouse/warehouse.js
index f566bcf..ac6ac63 100644
--- a/stock/doctype/warehouse/warehouse.js
+++ b/stock/doctype/warehouse/warehouse.js
@@ -1,4 +1,4 @@
-// Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+// Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 // License: GNU General Public License v3. See license.txt
 
 cur_frm.cscript.refresh = function(doc) {
@@ -13,4 +13,4 @@
 			'group_or_ledger': "Group"
 		}
 	}
-})
\ No newline at end of file
+})
diff --git a/stock/doctype/warehouse/warehouse.py b/stock/doctype/warehouse/warehouse.py
index ba36f31..4869d39 100644
--- a/stock/doctype/warehouse/warehouse.py
+++ b/stock/doctype/warehouse/warehouse.py
@@ -1,14 +1,11 @@
-# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 # License: GNU General Public License v3. See license.txt
 
 from __future__ import unicode_literals
 import webnotes
-
 from webnotes.utils import cint, validate_email_add
 from webnotes import msgprint, _
 
-sql = webnotes.conn.sql
-
 class DocType:
 	def __init__(self, doc, doclist=[]):
 		self.doc = doc
@@ -31,8 +28,8 @@
 			if not webnotes.conn.get_value("Account", {"account_type": "Warehouse", 
 					"master_name": self.doc.name}) and not webnotes.conn.get_value("Account", 
 					{"account_name": self.doc.warehouse_name}):
-				if self.doc.__islocal or not webnotes.conn.get_value("Stock Ledger Entry", 
-						{"warehouse": self.doc.name}):
+				if self.doc.fields.get("__islocal") or not webnotes.conn.get_value(
+						"Stock Ledger Entry", {"warehouse": self.doc.name}):
 					self.validate_parent_account()
 					ac_bean = webnotes.bean({
 						"doctype": "Account",
@@ -61,21 +58,21 @@
 		
 	def on_trash(self):
 		# delete bin
-		bins = sql("select * from `tabBin` where warehouse = %s", self.doc.name, as_dict=1)
+		bins = webnotes.conn.sql("select * from `tabBin` where warehouse = %s", 
+			self.doc.name, as_dict=1)
 		for d in bins:
 			if d['actual_qty'] or d['reserved_qty'] or d['ordered_qty'] or \
 					d['indented_qty'] or d['projected_qty'] or d['planned_qty']:
 				msgprint("""Warehouse: %s can not be deleted as qty exists for item: %s""" 
 					% (self.doc.name, d['item_code']), raise_exception=1)
 			else:
-				sql("delete from `tabBin` where name = %s", d['name'])
+				webnotes.conn.sql("delete from `tabBin` where name = %s", d['name'])
 				
 		warehouse_account = webnotes.conn.get_value("Account", 
 			{"account_type": "Warehouse", "master_name": self.doc.name})
 		if warehouse_account:
 			webnotes.delete_doc("Account", warehouse_account)
 				
-		# delete cancelled sle
 		if sql("""select name from `tabStock Ledger Entry` where warehouse = %s""", self.doc.name):
 			msgprint("""Warehouse can not be deleted as stock ledger entry 
 				exists for this warehouse.""", raise_exception=1)
diff --git a/stock/doctype/warehouse/warehouse.txt b/stock/doctype/warehouse/warehouse.txt
index 8c75247..e194349 100644
--- a/stock/doctype/warehouse/warehouse.txt
+++ b/stock/doctype/warehouse/warehouse.txt
@@ -74,13 +74,16 @@
   "doctype": "DocField", 
   "fieldname": "create_account_under", 
   "fieldtype": "Link", 
-  "label": "Create Account Under", 
-  "options": "Account"
+  "label": "Parent Account", 
+  "options": "Account", 
+  "permlevel": 0
  }, 
  {
   "doctype": "DocField", 
   "fieldname": "column_break_4", 
   "fieldtype": "Section Break", 
+  "label": "Allow For Users", 
+  "permlevel": 0, 
   "read_only": 0
  }, 
  {
diff --git a/stock/doctype/warehouse_user/warehouse_user.py b/stock/doctype/warehouse_user/warehouse_user.py
index 784339d..e5468e5 100644
--- a/stock/doctype/warehouse_user/warehouse_user.py
+++ b/stock/doctype/warehouse_user/warehouse_user.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 # License: GNU General Public License v3. See license.txt
 
 # For license information, please see license.txt
diff --git a/stock/page/stock_ageing/stock_ageing.js b/stock/page/stock_ageing/stock_ageing.js
index a83573e..6c626e2 100644
--- a/stock/page/stock_ageing/stock_ageing.js
+++ b/stock/page/stock_ageing/stock_ageing.js
@@ -1,19 +1,19 @@
-// Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+// Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 // License: GNU General Public License v3. See license.txt
 
 
 wn.pages['stock-ageing'].onload = function(wrapper) { 
 	wn.ui.make_app_page({
 		parent: wrapper,
-		title: 'Stock Ageing',
+		title: wn._('Stock Ageing'),
 		single_column: true
 	});
 
 	new erpnext.StockAgeing(wrapper);
 	
-	wrapper.appframe.add_home_breadcrumb()
+
 	wrapper.appframe.add_module_icon("Stock")
-	wrapper.appframe.add_breadcrumb("icon-bar-chart")
+	
 }
 
 wn.require("app/js/stock_grid_report.js");
@@ -21,7 +21,7 @@
 erpnext.StockAgeing = erpnext.StockGridReport.extend({
 	init: function(wrapper) {
 		this._super({
-			title: "Stock Ageing",
+			title: wn._("Stock Ageing"),
 			page: wrapper,
 			parent: $(wrapper).find('.layout-main'),
 			appframe: wrapper.appframe,
@@ -30,37 +30,37 @@
 	},
 	setup_columns: function() {
 		this.columns = [
-			{id: "name", name: "Item", field: "name", width: 300,
+			{id: "name", name: wn._("Item"), field: "name", width: 300,
 				link_formatter: {
 					open_btn: true,
 					doctype: '"Item"'
 				}},
-			{id: "item_name", name: "Item Name", field: "item_name", 
+			{id: "item_name", name: wn._("Item Name"), field: "item_name", 
 				width: 100, formatter: this.text_formatter},
-			{id: "description", name: "Description", field: "description", 
+			{id: "description", name: wn._("Description"), field: "description", 
 				width: 200, formatter: this.text_formatter},
-			{id: "brand", name: "Brand", field: "brand", width: 100},
-			{id: "average_age", name: "Average Age", field: "average_age",
+			{id: "brand", name: wn._("Brand"), field: "brand", width: 100},
+			{id: "average_age", name: wn._("Average Age"), field: "average_age",
 				formatter: this.currency_formatter},
-			{id: "earliest", name: "Earliest", field: "earliest",
+			{id: "earliest", name: wn._("Earliest"), field: "earliest",
 				formatter: this.currency_formatter},
-			{id: "latest", name: "Latest", field: "latest",
+			{id: "latest", name: wn._("Latest"), field: "latest",
 				formatter: this.currency_formatter},
 			{id: "stock_uom", name: "UOM", field: "stock_uom", width: 100},
 		];
 	},
 	filters: [
-		{fieldtype:"Select", label: "Warehouse", link:"Warehouse", 
+		{fieldtype:"Select", label: wn._("Warehouse"), link:"Warehouse", 
 			default_value: "Select Warehouse..."},
-		{fieldtype:"Select", label: "Brand", link:"Brand", 
+		{fieldtype:"Select", label: wn._("Brand"), link:"Brand", 
 			default_value: "Select Brand...", filter: function(val, item, opts) {
 				return val == opts.default_value || item.brand == val;
 			}, link_formatter: {filter_input: "brand"}},
-		{fieldtype:"Select", label: "Plot By", 
+		{fieldtype:"Select", label: wn._("Plot By"), 
 			options: ["Average Age", "Earliest", "Latest"]},
-		{fieldtype:"Date", label: "To Date"},
-		{fieldtype:"Button", label: "Refresh", icon:"icon-refresh icon-white", cssClass:"btn-info"},
-		{fieldtype:"Button", label: "Reset Filters"}
+		{fieldtype:"Date", label: wn._("To Date")},
+		{fieldtype:"Button", label: wn._("Refresh"), icon:"icon-refresh icon-white"},
+		{fieldtype:"Button", label: wn._("Reset Filters")}
 	],
 	setup_filters: function() {
 		var me = this;
diff --git a/stock/page/stock_analytics/stock_analytics.js b/stock/page/stock_analytics/stock_analytics.js
index 547f5ac..3fb4a85 100644
--- a/stock/page/stock_analytics/stock_analytics.js
+++ b/stock/page/stock_analytics/stock_analytics.js
@@ -1,19 +1,19 @@
-// Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+// Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 // License: GNU General Public License v3. See license.txt
 
 
 wn.pages['stock-analytics'].onload = function(wrapper) { 
 	wn.ui.make_app_page({
 		parent: wrapper,
-		title: 'Stock Analytics',
+		title: wn._('Stock Analytics'),
 		single_column: true
 	});
 
 	new erpnext.StockAnalytics(wrapper);
 
-	wrapper.appframe.add_home_breadcrumb()
+
 	wrapper.appframe.add_module_icon("Stock")
-	wrapper.appframe.add_breadcrumb("icon-bar-chart")
+	
 }
 
 wn.require("app/js/stock_analytics.js");
\ No newline at end of file
diff --git a/stock/page/stock_balance/stock_balance.js b/stock/page/stock_balance/stock_balance.js
index 7db3b6c..604312f 100644
--- a/stock/page/stock_balance/stock_balance.js
+++ b/stock/page/stock_balance/stock_balance.js
@@ -1,4 +1,4 @@
-// Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+// Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 // License: GNU General Public License v3. See license.txt
 
 wn.require("app/js/stock_analytics.js");
@@ -6,72 +6,72 @@
 wn.pages['stock-balance'].onload = function(wrapper) { 
 	wn.ui.make_app_page({
 		parent: wrapper,
-		title: 'Stock Balance',
+		title: wn._('Stock Balance'),
 		single_column: true
 	});
 	
 	new erpnext.StockBalance(wrapper);
 	
-	wrapper.appframe.add_home_breadcrumb()
+
 	wrapper.appframe.add_module_icon("Stock")
-	wrapper.appframe.add_breadcrumb("icon-bar-chart")
+	
 }
 
 erpnext.StockBalance = erpnext.StockAnalytics.extend({
 	init: function(wrapper) {
 		this._super(wrapper, {
-			title: "Stock Balance",
+			title: wn._("Stock Balance"),
 			doctypes: ["Item", "Item Group", "Warehouse", "Stock Ledger Entry", "Brand",
 				"Stock Entry", "Project", "Serial No"],
 		});
 	},
 	setup_columns: function() {
 		this.columns = [
-			{id: "name", name: "Item", field: "name", width: 300,
+			{id: "name", name: wn._("Item"), field: "name", width: 300,
 				formatter: this.tree_formatter},
-			{id: "item_name", name: "Item Name", field: "item_name", width: 100},
-			{id: "description", name: "Description", field: "description", width: 200, 
+			{id: "item_name", name: wn._("Item Name"), field: "item_name", width: 100},
+			{id: "description", name: wn._("Description"), field: "description", width: 200, 
 				formatter: this.text_formatter},
-			{id: "brand", name: "Brand", field: "brand", width: 100},
-			{id: "stock_uom", name: "UOM", field: "stock_uom", width: 100},
-			{id: "opening_qty", name: "Opening Qty", field: "opening_qty", width: 100, 
+			{id: "brand", name: wn._("Brand"), field: "brand", width: 100},
+			{id: "stock_uom", name: wn._("UOM"), field: "stock_uom", width: 100},
+			{id: "opening_qty", name: wn._("Opening Qty"), field: "opening_qty", width: 100, 
 				formatter: this.currency_formatter},
-			{id: "inflow_qty", name: "In Qty", field: "inflow_qty", width: 100, 
+			{id: "inflow_qty", name: wn._("In Qty"), field: "inflow_qty", width: 100, 
 				formatter: this.currency_formatter},
-			{id: "outflow_qty", name: "Out Qty", field: "outflow_qty", width: 100, 
+			{id: "outflow_qty", name: wn._("Out Qty"), field: "outflow_qty", width: 100, 
 				formatter: this.currency_formatter},
-			{id: "closing_qty", name: "Closing Qty", field: "closing_qty", width: 100, 
+			{id: "closing_qty", name: wn._("Closing Qty"), field: "closing_qty", width: 100, 
 				formatter: this.currency_formatter},
 				
-			{id: "opening_value", name: "Opening Value", field: "opening_value", width: 100, 
+			{id: "opening_value", name: wn._("Opening Value"), field: "opening_value", width: 100, 
 				formatter: this.currency_formatter},
-			{id: "inflow_value", name: "In Value", field: "inflow_value", width: 100, 
+			{id: "inflow_value", name: wn._("In Value"), field: "inflow_value", width: 100, 
 				formatter: this.currency_formatter},
-			{id: "outflow_value", name: "Out Value", field: "outflow_value", width: 100, 
+			{id: "outflow_value", name: wn._("Out Value"), field: "outflow_value", width: 100, 
 				formatter: this.currency_formatter},
-			{id: "closing_value", name: "Closing Value", field: "closing_value", width: 100, 
+			{id: "closing_value", name: wn._("Closing Value"), field: "closing_value", width: 100, 
 				formatter: this.currency_formatter},
 		];
 	},
 	
 	filters: [
-		{fieldtype:"Select", label: "Brand", link:"Brand", 
+		{fieldtype:"Select", label: wn._("Brand"), link:"Brand", 
 			default_value: "Select Brand...", filter: function(val, item, opts) {
 				return val == opts.default_value || item.brand == val || item._show;
 			}, link_formatter: {filter_input: "brand"}},
-		{fieldtype:"Select", label: "Warehouse", link:"Warehouse", 
+		{fieldtype:"Select", label: wn._("Warehouse"), link:"Warehouse", 
 			default_value: "Select Warehouse...", filter: function(val, item, opts, me) {
 				return me.apply_zero_filter(val, item, opts, me);
 			}},
-		{fieldtype:"Select", label: "Project", link:"Project", 
+		{fieldtype:"Select", label: wn._("Project"), link:"Project", 
 			default_value: "Select Project...", filter: function(val, item, opts, me) {
 				return me.apply_zero_filter(val, item, opts, me);
 			}, link_formatter: {filter_input: "project"}},
-		{fieldtype:"Date", label: "From Date"},
-		{fieldtype:"Label", label: "To"},
-		{fieldtype:"Date", label: "To Date"},
-		{fieldtype:"Button", label: "Refresh", icon:"icon-refresh icon-white", cssClass:"btn-info"},
-		{fieldtype:"Button", label: "Reset Filters"}
+		{fieldtype:"Date", label: wn._("From Date")},
+		{fieldtype:"Label", label: wn._("To")},
+		{fieldtype:"Date", label: wn._("To Date")},
+		{fieldtype:"Button", label: wn._("Refresh"), icon:"icon-refresh icon-white"},
+		{fieldtype:"Button", label: wn._("Reset Filters")}
 	],
 	
 	setup_plot_check: function() {
diff --git a/stock/page/stock_home/stock_home.js b/stock/page/stock_home/stock_home.js
index ecfc6fe..cbfc3fc 100644
--- a/stock/page/stock_home/stock_home.js
+++ b/stock/page/stock_home/stock_home.js
@@ -1,4 +1,4 @@
-// Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+// Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 // License: GNU General Public License v3. See license.txt"
 
 wn.module_page["Stock"] = [
@@ -111,7 +111,7 @@
 				"label": wn._("Stock Settings"),
 				"route": "Form/Stock Settings",
 				"doctype":"Stock Settings",
-				"description": "Settings for Stock Module"
+				"description": wn._("Settings for Stock Module")
 			},
 			{
 				"route":"Sales Browser/Item Group",
diff --git a/stock/page/stock_ledger/stock_ledger.js b/stock/page/stock_ledger/stock_ledger.js
index 0aa8a1f..08a455e 100644
--- a/stock/page/stock_ledger/stock_ledger.js
+++ b/stock/page/stock_ledger/stock_ledger.js
@@ -1,10 +1,10 @@
-// Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+// Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 // License: GNU General Public License v3. See license.txt
 
 wn.pages['stock-ledger'].onload = function(wrapper) { 
 	wn.ui.make_app_page({
 		parent: wrapper,
-		title: 'Stock Ledger',
+		title: wn._('Stock Ledger'),
 		single_column: true
 	});
 	
@@ -17,7 +17,7 @@
 erpnext.StockLedger = erpnext.StockGridReport.extend({
 	init: function(wrapper) {
 		this._super({
-			title: "Stock Ledger",
+			title: wn._("Stock Ledger"),
 			page: wrapper,
 			parent: $(wrapper).find('.layout-main'),
 			appframe: wrapper.appframe,
@@ -28,29 +28,29 @@
 	setup_columns: function() {
 		this.hide_balance = (this.is_default("item_code") || this.voucher_no) ? true : false;
 		this.columns = [
-			{id: "posting_datetime", name: "Posting Date", field: "posting_datetime", width: 120,
+			{id: "posting_datetime", name: wn._("Posting Date"), field: "posting_datetime", width: 120,
 				formatter: this.date_formatter},
-			{id: "item_code", name: "Item Code", field: "item_code", width: 160, 	
+			{id: "item_code", name: wn._("Item Code"), field: "item_code", width: 160, 	
 				link_formatter: {
 					filter_input: "item_code",
 					open_btn: true,
 					doctype: '"Item"',
 				}},
-			{id: "description", name: "Description", field: "description", width: 200,
+			{id: "description", name: wn._("Description"), field: "description", width: 200,
 				formatter: this.text_formatter},
-			{id: "warehouse", name: "Warehouse", field: "warehouse", width: 100,
+			{id: "warehouse", name: wn._("Warehouse"), field: "warehouse", width: 100,
 				link_formatter: {filter_input: "warehouse"}},
-			{id: "brand", name: "Brand", field: "brand", width: 100},
-			{id: "stock_uom", name: "UOM", field: "stock_uom", width: 100},
-			{id: "qty", name: "Qty", field: "qty", width: 100,
+			{id: "brand", name: wn._("Brand"), field: "brand", width: 100},
+			{id: "stock_uom", name: wn._("UOM"), field: "stock_uom", width: 100},
+			{id: "qty", name: wn._("Qty"), field: "qty", width: 100,
 				formatter: this.currency_formatter},
-			{id: "balance", name: "Balance Qty", field: "balance", width: 100,
+			{id: "balance", name: wn._("Balance Qty"), field: "balance", width: 100,
 				formatter: this.currency_formatter,
 				hidden: this.hide_balance},
-			{id: "balance_value", name: "Balance Value", field: "balance_value", width: 100,
+			{id: "balance_value", name: wn._("Balance Value"), field: "balance_value", width: 100,
 				formatter: this.currency_formatter, hidden: this.hide_balance},
-			{id: "voucher_type", name: "Voucher Type", field: "voucher_type", width: 120},
-			{id: "voucher_no", name: "Voucher No", field: "voucher_no", width: 160,
+			{id: "voucher_type", name: wn._("Voucher Type"), field: "voucher_type", width: 120},
+			{id: "voucher_no", name: wn._("Voucher No"), field: "voucher_no", width: 160,
 				link_formatter: {
 					filter_input: "voucher_no",
 					open_btn: true,
@@ -60,11 +60,11 @@
 		
 	},
 	filters: [
-		{fieldtype:"Select", label: "Warehouse", link:"Warehouse", 
+		{fieldtype:"Select", label: wn._("Warehouse"), link:"Warehouse", 
 			default_value: "Select Warehouse...", filter: function(val, item, opts) {
 				return item.warehouse == val || val == opts.default_value;
 			}},
-		{fieldtype:"Link", label: "Item Code", link:"Item", default_value: "Select Item...",
+		{fieldtype:"Link", label: wn._("Item Code"), link:"Item", default_value: "Select Item...",
 			filter: function(val, item, opts) {
 				return item.item_code == val || !val;
 			}},
@@ -72,20 +72,20 @@
 			default_value: "Select Brand...", filter: function(val, item, opts) {
 				return val == opts.default_value || item.brand == val || item._show;
 			}, link_formatter: {filter_input: "brand"}},
-		{fieldtype:"Data", label: "Voucher No",
+		{fieldtype:"Data", label: wn._("Voucher No"),
 			filter: function(val, item, opts) {
 				if(!val) return true;
 				return (item.voucher_no && item.voucher_no.indexOf(val)!=-1);
 			}},
-		{fieldtype:"Date", label: "From Date", filter: function(val, item) {
+		{fieldtype:"Date", label: wn._("From Date"), filter: function(val, item) {
 			return dateutil.str_to_obj(val) <= dateutil.str_to_obj(item.posting_date);
 		}},
-		{fieldtype:"Label", label: "To"},
-		{fieldtype:"Date", label: "To Date", filter: function(val, item) {
+		{fieldtype:"Label", label: wn._("To")},
+		{fieldtype:"Date", label: wn._("To Date"), filter: function(val, item) {
 			return dateutil.str_to_obj(val) >= dateutil.str_to_obj(item.posting_date);
 		}},
-		{fieldtype:"Button", label: "Refresh", icon:"icon-refresh icon-white", cssClass:"btn-info"},
-		{fieldtype:"Button", label: "Reset Filters"}
+		{fieldtype:"Button", label: wn._("Refresh"), icon:"icon-refresh icon-white"},
+		{fieldtype:"Button", label: wn._("Reset Filters")}
 	],
 	
 	setup_filters: function() {
diff --git a/stock/page/stock_level/stock_level.js b/stock/page/stock_level/stock_level.js
index 62ae6c7..c508791 100644
--- a/stock/page/stock_level/stock_level.js
+++ b/stock/page/stock_level/stock_level.js
@@ -1,18 +1,18 @@
-// Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+// Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 // License: GNU General Public License v3. See license.txt
 
 wn.pages['stock-level'].onload = function(wrapper) { 
 	wn.ui.make_app_page({
 		parent: wrapper,
-		title: 'Stock Level',
+		title: wn._('Stock Level'),
 		single_column: true
 	});
 	
 	new erpnext.StockLevel(wrapper);
 
-	wrapper.appframe.add_home_breadcrumb()
+
 	wrapper.appframe.add_module_icon("Stock")
-	wrapper.appframe.add_breadcrumb("icon-bar-chart");
+	;
 }
 
 wn.require("app/js/stock_grid_report.js");
@@ -22,7 +22,7 @@
 		var me = this;
 		
 		this._super({
-			title: "Stock Level",
+			title: wn._("Stock Level"),
 			page: wrapper,
 			parent: $(wrapper).find('.layout-main'),
 			appframe: wrapper.appframe,
@@ -37,70 +37,70 @@
 						Projected Qty = Actual Qty + Planned Qty + Requested Qty \
 						+ Ordered Qty - Reserved Qty </li> \
 					<ul> \
-						<li>Actual Qty: Quantity available in the warehouse. </li> \
-						<li>Planned Qty: Quantity, for which, Production Order has been raised, \
-							but is pending to be manufactured. </li> \
-						<li>Requested Qty: Quantity requested for purchase, but not ordered. </li> \
-						<li>Ordered Qty: Quantity ordered for purchase, but not received.</li> \
-						<li>Reserved Qty: Quantity ordered for sale, but not delivered. </li> \
-					</ul> \
+						<li>"+wn._("Actual Qty: Quantity available in the warehouse.") +"</li>"+
+						"<li>"+wn._("Planned Qty: Quantity, for which, Production Order has been raised,")+
+							wn._("but is pending to be manufactured.")+ "</li> " +
+						"<li>"+wn._("Requested Qty: Quantity requested for purchase, but not ordered.") + "</li>" +
+						"<li>" + wn._("Ordered Qty: Quantity ordered for purchase, but not received.")+ "</li>" +
+						"<li>" + wn._("Reserved Qty: Quantity ordered for sale, but not delivered.") +  "</li>" +
+					"</ul> \
 				</ul>");
 		});
 	},
 	
 	setup_columns: function() {
 		this.columns = [
-			{id: "item_code", name: "Item Code", field: "item_code", width: 160, 	
+			{id: "item_code", name: wn._("Item Code"), field: "item_code", width: 160, 	
 				link_formatter: {
 					filter_input: "item_code",
 					open_btn: true,
 					doctype: '"Item"',
 				}},
-			{id: "item_name", name: "Item Name", field: "item_name", width: 100,
+			{id: "item_name", name: wn._("Item Name"), field: "item_name", width: 100,
 				formatter: this.text_formatter},
-			{id: "description", name: "Description", field: "description", width: 200, 
+			{id: "description", name: wn._("Description"), field: "description", width: 200, 
 				formatter: this.text_formatter},
-			{id: "brand", name: "Brand", field: "brand", width: 100,
+			{id: "brand", name: wn._("Brand"), field: "brand", width: 100,
 				link_formatter: {filter_input: "brand"}},
-			{id: "warehouse", name: "Warehouse", field: "warehouse", width: 100,
+			{id: "warehouse", name: wn._("Warehouse"), field: "warehouse", width: 100,
 				link_formatter: {filter_input: "warehouse"}},
-			{id: "uom", name: "UOM", field: "uom", width: 60},
-			{id: "actual_qty", name: "Actual Qty", 
+			{id: "uom", name: wn._("UOM"), field: "uom", width: 60},
+			{id: "actual_qty", name: wn._("Actual Qty"), 
 				field: "actual_qty", width: 80, formatter: this.currency_formatter},
-			{id: "planned_qty", name: "Planned Qty", 
+			{id: "planned_qty", name: wn._("Planned Qty"), 
 				field: "planned_qty", width: 80, formatter: this.currency_formatter},
-			{id: "requested_qty", name: "Requested Qty", 
+			{id: "requested_qty", name: wn._("Requested Qty"), 
 				field: "requested_qty", width: 80, formatter: this.currency_formatter},
-			{id: "ordered_qty", name: "Ordered Qty", 
+			{id: "ordered_qty", name: wn._("Ordered Qty"), 
 				field: "ordered_qty", width: 80, formatter: this.currency_formatter},
-			{id: "reserved_qty", name: "Reserved Qty", 
+			{id: "reserved_qty", name: wn._("Reserved Qty"), 
 				field: "reserved_qty", width: 80, formatter: this.currency_formatter},
-			{id: "projected_qty", name: "Projected Qty", 
+			{id: "projected_qty", name: wn._("Projected Qty"), 
 				field: "projected_qty", width: 80, formatter: this.currency_formatter},
-			{id: "re_order_level", name: "Re-Order Level", 
+			{id: "re_order_level", name: wn._("Re-Order Level"), 
 				field: "re_order_level", width: 80, formatter: this.currency_formatter},
-			{id: "re_order_qty", name: "Re-Order Qty", 
+			{id: "re_order_qty", name: wn._("Re-Order Qty"), 
 				field: "re_order_qty", width: 80, formatter: this.currency_formatter},
 		];
 	},
 	
 	filters: [
-		{fieldtype:"Link", label: "Item Code", link:"Item", default_value: "Select Item...",
+		{fieldtype:"Link", label: wn._("Item Code"), link:"Item", default_value: "Select Item...",
 			filter: function(val, item, opts) {
 				return item.item_code == val || !val;
 			}},
 			
-		{fieldtype:"Select", label: "Warehouse", link:"Warehouse", 
+		{fieldtype:"Select", label: wn._("Warehouse"), link:"Warehouse", 
 			default_value: "Select Warehouse...", filter: function(val, item, opts) {
 				return item.warehouse == val || val == opts.default_value;
 			}},
 		
-		{fieldtype:"Select", label: "Brand", link:"Brand", 
+		{fieldtype:"Select", label: wn._("Brand"), link:"Brand", 
 			default_value: "Select Brand...", filter: function(val, item, opts) {
 				return val == opts.default_value || item.brand == val;
 			}},
-		{fieldtype:"Button", label: "Refresh", icon:"icon-refresh icon-white", cssClass:"btn-info"},
-		{fieldtype:"Button", label: "Reset Filters"}
+		{fieldtype:"Button", label: wn._("Refresh"), icon:"icon-refresh icon-white"},
+		{fieldtype:"Button", label: wn._("Reset Filters")}
 	],
 	
 	setup_filters: function() {
diff --git a/stock/report/batch_wise_balance_history/batch_wise_balance_history.js b/stock/report/batch_wise_balance_history/batch_wise_balance_history.js
index a9d6477..cf47aa2 100644
--- a/stock/report/batch_wise_balance_history/batch_wise_balance_history.js
+++ b/stock/report/batch_wise_balance_history/batch_wise_balance_history.js
@@ -1,18 +1,18 @@
-// Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+// Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 // License: GNU General Public License v3. See license.txt
 
 wn.query_reports["Batch-Wise Balance History"] = {
 	"filters": [
 		{
 			"fieldname":"from_date",
-			"label": "From Date",
+			"label": wn._("From Date"),
 			"fieldtype": "Date",
 			"width": "80",
 			"default": sys_defaults.year_start_date,
 		},
 		{
 			"fieldname":"to_date",
-			"label": "To Date",
+			"label": wn._("To Date"),
 			"fieldtype": "Date",
 			"width": "80",
 			"default": wn.datetime.get_today()
diff --git a/stock/report/batch_wise_balance_history/batch_wise_balance_history.py b/stock/report/batch_wise_balance_history/batch_wise_balance_history.py
index db0c240..9500fa9 100644
--- a/stock/report/batch_wise_balance_history/batch_wise_balance_history.py
+++ b/stock/report/batch_wise_balance_history/batch_wise_balance_history.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 # License: GNU General Public License v3. See license.txt
 
 from __future__ import unicode_literals
diff --git a/stock/report/delivery_note_trends/delivery_note_trends.js b/stock/report/delivery_note_trends/delivery_note_trends.js
index 46e5106..ab0147b 100644
--- a/stock/report/delivery_note_trends/delivery_note_trends.js
+++ b/stock/report/delivery_note_trends/delivery_note_trends.js
@@ -1,4 +1,4 @@
-// Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+// Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 // License: GNU General Public License v3. See license.txt
 
 wn.require("app/js/sales_trends_filters.js");
diff --git a/stock/report/delivery_note_trends/delivery_note_trends.py b/stock/report/delivery_note_trends/delivery_note_trends.py
index f66ad29..6cd6f8e 100644
--- a/stock/report/delivery_note_trends/delivery_note_trends.py
+++ b/stock/report/delivery_note_trends/delivery_note_trends.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 # License: GNU General Public License v3. See license.txt
 
 from __future__ import unicode_literals
diff --git a/stock/report/item_prices/item_prices.py b/stock/report/item_prices/item_prices.py
index 2bb3779..9a25c13 100644
--- a/stock/report/item_prices/item_prices.py
+++ b/stock/report/item_prices/item_prices.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 # License: GNU General Public License v3. See license.txt
 
 from __future__ import unicode_literals
diff --git a/stock/report/itemwise_recommended_reorder_level/itemwise_recommended_reorder_level.js b/stock/report/itemwise_recommended_reorder_level/itemwise_recommended_reorder_level.js
index 410feab..0fd37a5 100644
--- a/stock/report/itemwise_recommended_reorder_level/itemwise_recommended_reorder_level.js
+++ b/stock/report/itemwise_recommended_reorder_level/itemwise_recommended_reorder_level.js
@@ -1,17 +1,17 @@
-// Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+// Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 // License: GNU General Public License v3. See license.txt
 
 wn.query_reports["Itemwise Recommended Reorder Level"] = {
 	"filters": [
 		{
 			"fieldname":"from_date",
-			"label": "From Date",
+			"label": wn._("From Date"),
 			"fieldtype": "Date",
 			"default": sys_defaults.year_start_date
 		},
 		{
 			"fieldname":"to_date",
-			"label": "To Date",
+			"label": wn._("To Date"),
 			"fieldtype": "Date",
 			"default": get_today()
 		}
diff --git a/stock/report/itemwise_recommended_reorder_level/itemwise_recommended_reorder_level.py b/stock/report/itemwise_recommended_reorder_level/itemwise_recommended_reorder_level.py
index dda2176..f7ed3b4 100644
--- a/stock/report/itemwise_recommended_reorder_level/itemwise_recommended_reorder_level.py
+++ b/stock/report/itemwise_recommended_reorder_level/itemwise_recommended_reorder_level.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 # License: GNU General Public License v3. See license.txt
 
 import webnotes
diff --git a/stock/report/purchase_receipt_trends/purchase_receipt_trends.js b/stock/report/purchase_receipt_trends/purchase_receipt_trends.js
index 3637ea3..c3397f7 100644
--- a/stock/report/purchase_receipt_trends/purchase_receipt_trends.js
+++ b/stock/report/purchase_receipt_trends/purchase_receipt_trends.js
@@ -1,4 +1,4 @@
-// Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+// Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 // License: GNU General Public License v3. See license.txt
 
 wn.require("app/js/purchase_trends_filters.js");
diff --git a/stock/report/purchase_receipt_trends/purchase_receipt_trends.py b/stock/report/purchase_receipt_trends/purchase_receipt_trends.py
index 395c426..5fd003b 100644
--- a/stock/report/purchase_receipt_trends/purchase_receipt_trends.py
+++ b/stock/report/purchase_receipt_trends/purchase_receipt_trends.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 # License: GNU General Public License v3. See license.txt
 
 from __future__ import unicode_literals
diff --git a/stock/report/warehouse_wise_stock_balance/warehouse_wise_stock_balance.js b/stock/report/warehouse_wise_stock_balance/warehouse_wise_stock_balance.js
index 942b465..9b93a31 100644
--- a/stock/report/warehouse_wise_stock_balance/warehouse_wise_stock_balance.js
+++ b/stock/report/warehouse_wise_stock_balance/warehouse_wise_stock_balance.js
@@ -1,18 +1,18 @@
-// Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+// Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 // License: GNU General Public License v3. See license.txt
 
 wn.query_reports["Warehouse-Wise Stock Balance"] = {
 	"filters": [
 		{
 			"fieldname":"from_date",
-			"label": "From Date",
+			"label": wn._("From Date"),
 			"fieldtype": "Date",
 			"width": "80",
 			"default": sys_defaults.year_start_date,
 		},
 		{
 			"fieldname":"to_date",
-			"label": "To Date",
+			"label": wn._("To Date"),
 			"fieldtype": "Date",
 			"width": "80",
 			"default": wn.datetime.get_today()
diff --git a/stock/report/warehouse_wise_stock_balance/warehouse_wise_stock_balance.py b/stock/report/warehouse_wise_stock_balance/warehouse_wise_stock_balance.py
index a1f7d44..342c25c 100644
--- a/stock/report/warehouse_wise_stock_balance/warehouse_wise_stock_balance.py
+++ b/stock/report/warehouse_wise_stock_balance/warehouse_wise_stock_balance.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 # License: GNU General Public License v3. See license.txt
 
 from __future__ import unicode_literals
diff --git a/stock/stock_ledger.py b/stock/stock_ledger.py
index 197aa0d..469fa53 100644
--- a/stock/stock_ledger.py
+++ b/stock/stock_ledger.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 # License: GNU General Public License v3. See license.txt
 
 import webnotes
@@ -10,6 +10,9 @@
 # future reposting
 class NegativeStockError(webnotes.ValidationError): pass
 
+_exceptions = webnotes.local('stockledger_exceptions')
+# _exceptions = []
+
 def make_sl_entries(sl_entries, is_amended=None):
 	if sl_entries:
 		from stock.utils import update_bin
@@ -55,7 +58,6 @@
 	webnotes.conn.sql("""delete from `tabStock Ledger Entry` 
 		where voucher_type=%s and voucher_no=%s""", (voucher_type, voucher_no))
 
-_exceptions = []
 def update_entries_after(args, verbose=1):
 	"""
 		update valution rate and qty after transaction 
@@ -68,8 +70,8 @@
 			"posting_time": "12:00"
 		}
 	"""
-	global _exceptions
-	_exceptions = []
+	if not _exceptions:
+		webnotes.local.stockledger_exceptions = []
 	
 	previous_sle = get_sle_before_datetime(args)
 	
@@ -190,10 +192,12 @@
 		will not consider cancelled entries
 	"""
 	diff = qty_after_transaction + flt(sle.actual_qty)
+
+	if not _exceptions:
+		webnotes.local.stockledger_exceptions = []
 	
 	if diff < 0 and abs(diff) > 0.0001:
 		# negative stock!
-		global _exceptions
 		exc = sle.copy().update({"diff": diff})
 		_exceptions.append(exc)
 		return False
@@ -327,4 +331,4 @@
 	sle = get_stock_ledger_entries(args, ["name != %(sle)s",
 		"timestamp(posting_date, posting_time) <= timestamp(%(posting_date)s, %(posting_time)s)"],
 		"desc", "limit 1", for_update=for_update)
-	return sle and sle[0] or {}
\ No newline at end of file
+	return sle and sle[0] or {}
diff --git a/stock/utils.py b/stock/utils.py
index 0f801c7..6d9f204 100644
--- a/stock/utils.py
+++ b/stock/utils.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 # License: GNU General Public License v3. See license.txt
 
 import webnotes
@@ -252,10 +252,10 @@
 
 def reorder_item():
 	""" Reorder item if stock reaches reorder level"""
-	if not hasattr(webnotes, "auto_indent"):
-		webnotes.auto_indent = cint(webnotes.conn.get_value('Stock Settings', None, 'auto_indent'))
+	if getattr(webnotes.local, "auto_indent", None) is None:
+		webnotes.local.auto_indent = cint(webnotes.conn.get_value('Stock Settings', None, 'auto_indent'))
 	
-	if webnotes.auto_indent:
+	if webnotes.local.auto_indent:
 		material_requests = {}
 		bin_list = webnotes.conn.sql("""select item_code, warehouse, projected_qty
 			from tabBin where ifnull(item_code, '') != '' and ifnull(warehouse, '') != ''
@@ -291,7 +291,7 @@
 						"reorder_qty": reorder_qty
 					})
 				)
-				
+		
 		create_material_request(material_requests)
 
 def create_material_request(material_requests):
@@ -311,10 +311,7 @@
 					"company": company,
 					"fiscal_year": defaults.fiscal_year,
 					"transaction_date": nowdate(),
-					"material_request_type": request_type,
-					"remark": _("This is an auto generated Material Request.") + \
-						_("""It was raised because the (actual + ordered + indented - reserved) 
-						quantity reaches re-order level when the following record was created""")
+					"material_request_type": request_type
 				}]
 			
 				for d in items:
@@ -340,18 +337,18 @@
 				mr_list.append(mr_bean)
 
 			except:
-				if webnotes.message_log:
-					exceptions_list.append([] + webnotes.message_log)
-					webnotes.message_log = []
+				if webnotes.local.message_log:
+					exceptions_list.append([] + webnotes.local.message_log)
+					webnotes.local.message_log = []
 				else:
 					exceptions_list.append(webnotes.getTraceback())
 
 	if mr_list:
-		if not hasattr(webnotes, "reorder_email_notify"):
-			webnotes.reorder_email_notify = cint(webnotes.conn.get_value('Stock Settings', None, 
+		if getattr(webnotes.local, "reorder_email_notify", None) is None:
+			webnotes.local.reorder_email_notify = cint(webnotes.conn.get_value('Stock Settings', None, 
 				'reorder_email_notify'))
 			
-		if(webnotes.reorder_email_notify):
+		if(webnotes.local.reorder_email_notify):
 			send_email_notification(mr_list)
 
 	if exceptions_list:
@@ -393,4 +390,4 @@
 		Administrator""" % ("\n\n".join(["\n".join(msg) for msg in exceptions_list]),)
 
 	from webnotes.profile import get_system_managers
-	sendmail(get_system_managers(), subject=subject, msg=msg)
\ No newline at end of file
+	sendmail(get_system_managers(), subject=subject, msg=msg)
diff --git a/support/doctype/customer_issue/customer_issue.js b/support/doctype/customer_issue/customer_issue.js
index 5b670d4..066a11a 100644
--- a/support/doctype/customer_issue/customer_issue.js
+++ b/support/doctype/customer_issue/customer_issue.js
@@ -1,4 +1,4 @@
-// Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+// Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 // License: GNU General Public License v3. See license.txt
 
 wn.provide("erpnext.support");
@@ -6,7 +6,7 @@
 erpnext.support.CustomerIssue = wn.ui.form.Controller.extend({
 	refresh: function() {
 		if((cur_frm.doc.status=='Open' || cur_frm.doc.status == 'Work In Progress')) {
-			cur_frm.add_custom_button('Make Maintenance Visit', this.make_maintenance_visit)
+			cur_frm.add_custom_button(wn._('Make Maintenance Visit'), this.make_maintenance_visit)
 		}
 	}, 
 	
diff --git a/support/doctype/customer_issue/customer_issue.py b/support/doctype/customer_issue/customer_issue.py
index 910e9b8..0739a2d 100644
--- a/support/doctype/customer_issue/customer_issue.py
+++ b/support/doctype/customer_issue/customer_issue.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 # License: GNU General Public License v3. See license.txt
 
 
@@ -7,7 +7,6 @@
 from webnotes import session, msgprint
 from webnotes.utils import today
 
-sql = webnotes.conn.sql
 	
 
 from utilities.transaction_base import TransactionBase
@@ -28,7 +27,7 @@
 			self.doc.resolved_by = webnotes.session.user
 	
 	def on_cancel(self):
-		lst = sql("select t1.name from `tabMaintenance Visit` t1, `tabMaintenance Visit Purpose` t2 where t2.parent = t1.name and t2.prevdoc_docname = '%s' and	t1.docstatus!=2"%(self.doc.name))
+		lst = webnotes.conn.sql("select t1.name from `tabMaintenance Visit` t1, `tabMaintenance Visit Purpose` t2 where t2.parent = t1.name and t2.prevdoc_docname = '%s' and	t1.docstatus!=2"%(self.doc.name))
 		if lst:
 			lst1 = ','.join([x[0] for x in lst])
 			msgprint("Maintenance Visit No. "+lst1+" already created against this customer issue. So can not be Cancelled")
diff --git a/support/doctype/customer_issue/customer_issue.txt b/support/doctype/customer_issue/customer_issue.txt
index faff298..f9fbc6b 100644
--- a/support/doctype/customer_issue/customer_issue.txt
+++ b/support/doctype/customer_issue/customer_issue.txt
@@ -2,7 +2,7 @@
  {
   "creation": "2013-01-10 16:34:30", 
   "docstatus": 0, 
-  "modified": "2013-08-08 14:22:33", 
+  "modified": "2013-11-02 16:59:22", 
   "modified_by": "Administrator", 
   "owner": "harshada@webnotestech.com"
  }, 
@@ -55,7 +55,7 @@
   "fieldname": "naming_series", 
   "fieldtype": "Select", 
   "in_filter": 0, 
-  "label": "Document Numbering Series", 
+  "label": "Series", 
   "no_copy": 1, 
   "oldfieldname": "naming_series", 
   "oldfieldtype": "Select", 
@@ -279,6 +279,7 @@
   "read_only": 1
  }, 
  {
+  "description": "<a href=\"#Sales Browser/Customer Group\">Add / Edit</a>", 
   "doctype": "DocField", 
   "fieldname": "customer_group", 
   "fieldtype": "Link", 
@@ -288,6 +289,7 @@
   "reqd": 0
  }, 
  {
+  "description": "<a href=\"#Sales Browser/Territory\">Add / Edit</a>", 
   "doctype": "DocField", 
   "fieldname": "territory", 
   "fieldtype": "Link", 
diff --git a/support/doctype/maintenance_schedule/maintenance_schedule.js b/support/doctype/maintenance_schedule/maintenance_schedule.js
index 6b69343..25fe69a 100644
--- a/support/doctype/maintenance_schedule/maintenance_schedule.js
+++ b/support/doctype/maintenance_schedule/maintenance_schedule.js
@@ -1,4 +1,4 @@
-// Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+// Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 // License: GNU General Public License v3. See license.txt
 
 wn.provide("erpnext.support");
@@ -91,7 +91,7 @@
     return get_server_fields('get_no_of_visits',docstring(arg),'item_maintenance_detail',doc, cdt, cdn, 1);
   }
   else{
-    msgprint("Please enter Start Date and End Date");
+    msgprint(wn._("Please enter Start Date and End Date"));
   }
 }
 
@@ -103,7 +103,7 @@
       }
     );
   } else {
-    alert("Please save the document before generating maintenance schedule");
+    alert(wn._("Please save the document before generating maintenance schedule"));
   }  
 }
 
diff --git a/support/doctype/maintenance_schedule/maintenance_schedule.py b/support/doctype/maintenance_schedule/maintenance_schedule.py
index 59d3f8e..f18408f 100644
--- a/support/doctype/maintenance_schedule/maintenance_schedule.py
+++ b/support/doctype/maintenance_schedule/maintenance_schedule.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 # License: GNU General Public License v3. See license.txt
 
 from __future__ import unicode_literals
@@ -9,7 +9,6 @@
 from webnotes.model.bean import getlist
 from webnotes import msgprint
 
-sql = webnotes.conn.sql
 	
 
 from utilities.transaction_base import TransactionBase, delete_events
@@ -20,7 +19,7 @@
 		self.doclist = doclist
 	
 	def get_item_details(self, item_code):
-		item = sql("select item_name, description from `tabItem` where name = '%s'" %(item_code), as_dict=1)
+		item = webnotes.conn.sql("select item_name, description from `tabItem` where name = '%s'" %(item_code), as_dict=1)
 		ret = {
 			'item_name': item and item[0]['item_name'] or '',
 			'description' : item and item[0]['description'] or ''
@@ -30,7 +29,7 @@
 	def generate_schedule(self):
 		self.doclist = self.doc.clear_table(self.doclist, 'maintenance_schedule_detail')
 		count = 0
-		sql("delete from `tabMaintenance Schedule Detail` where parent='%s'" %(self.doc.name))
+		webnotes.conn.sql("delete from `tabMaintenance Schedule Detail` where parent='%s'" %(self.doc.name))
 		for d in getlist(self.doclist, 'item_maintenance_detail'):
 			self.validate_maintenance_detail()
 			s_list =[]	
@@ -67,7 +66,7 @@
 				email_map[d.incharge_name] = webnotes.bean("Sales Person", 
 					d.incharge_name).run_method("get_email_id")
 
-			scheduled_date =sql("select scheduled_date from `tabMaintenance Schedule Detail` \
+			scheduled_date =webnotes.conn.sql("select scheduled_date from `tabMaintenance Schedule Detail` \
 				where incharge_name='%s' and item_code='%s' and parent='%s' " %(d.incharge_name, \
 				d.item_code, self.doc.name), as_dict=1)
 
@@ -172,7 +171,7 @@
 	def validate_sales_order(self):
 		for d in getlist(self.doclist, 'item_maintenance_detail'):
 			if d.prevdoc_docname:
-				chk = sql("select t1.name from `tabMaintenance Schedule` t1, `tabMaintenance Schedule Item` t2 where t2.parent=t1.name and t2.prevdoc_docname=%s and t1.docstatus=1", d.prevdoc_docname)
+				chk = webnotes.conn.sql("select t1.name from `tabMaintenance Schedule` t1, `tabMaintenance Schedule Item` t2 where t2.parent=t1.name and t2.prevdoc_docname=%s and t1.docstatus=1", d.prevdoc_docname)
 				if chk:
 					msgprint("Maintenance Schedule against "+d.prevdoc_docname+" already exist")
 					raise Exception
@@ -186,7 +185,7 @@
 				cur_s_no = cur_serial_no.split(',')
 				
 				for x in cur_s_no:
-					chk = sql("select name, status from `tabSerial No` where docstatus!=2 and name=%s", (x))
+					chk = webnotes.conn.sql("select name, status from `tabSerial No` where docstatus!=2 and name=%s", (x))
 					chk1 = chk and chk[0][0] or ''
 					status = chk and chk[0][1] or ''
 					
@@ -209,7 +208,7 @@
 				cur_s_no = cur_serial_no.split(',')
 				
 				for x in cur_s_no:
-					dt = sql("select delivery_date from `tabSerial No` where name = %s", x)
+					dt = webnotes.conn.sql("select delivery_date from `tabSerial No` where name = %s", x)
 					dt = dt and dt[0][0] or ''
 					
 					if dt:
@@ -225,7 +224,7 @@
 		cur_s_no = cur_serial_no.split(',')
 		
 		for x in cur_s_no:
-			sql("update `tabSerial No` set amc_expiry_date = '%s', maintenance_status = 'Under AMC' where name = '%s'"% (amc_end_date,x))
+			webnotes.conn.sql("update `tabSerial No` set amc_expiry_date = '%s', maintenance_status = 'Under AMC' where name = '%s'"% (amc_end_date,x))
 	
 	def on_update(self):
 		webnotes.conn.set(self.doc, 'status', 'Draft')
@@ -233,7 +232,7 @@
 	def validate_serial_no_warranty(self):
 		for d in getlist(self.doclist, 'item_maintenance_detail'):
 			if cstr(d.serial_no).strip():
-				dt = sql("""select warranty_expiry_date, amc_expiry_date 
+				dt = webnotes.conn.sql("""select warranty_expiry_date, amc_expiry_date 
 					from `tabSerial No` where name = %s""", d.serial_no, as_dict=1)
 				if dt[0]['warranty_expiry_date'] and dt[0]['warranty_expiry_date'] >= d.start_date:
 					webnotes.msgprint("""Serial No: %s is already under warranty upto %s. 
diff --git a/support/doctype/maintenance_schedule/maintenance_schedule.txt b/support/doctype/maintenance_schedule/maintenance_schedule.txt
index c14764c..bdf14a1 100644
--- a/support/doctype/maintenance_schedule/maintenance_schedule.txt
+++ b/support/doctype/maintenance_schedule/maintenance_schedule.txt
@@ -2,7 +2,7 @@
  {
   "creation": "2013-01-10 16:34:30", 
   "docstatus": 0, 
-  "modified": "2013-07-22 15:32:36", 
+  "modified": "2013-11-02 16:59:23", 
   "modified_by": "Administrator", 
   "owner": "Administrator"
  }, 
@@ -188,6 +188,7 @@
   "search_index": 0
  }, 
  {
+  "description": "<a href=\"#Sales Browser/Territory\">Add / Edit</a>", 
   "doctype": "DocField", 
   "fieldname": "territory", 
   "fieldtype": "Link", 
@@ -200,6 +201,7 @@
   "search_index": 0
  }, 
  {
+  "description": "<a href=\"#Sales Browser/Customer Group\">Add / Edit</a>", 
   "doctype": "DocField", 
   "fieldname": "customer_group", 
   "fieldtype": "Link", 
diff --git a/support/doctype/maintenance_schedule_detail/maintenance_schedule_detail.py b/support/doctype/maintenance_schedule_detail/maintenance_schedule_detail.py
index 26d0f76..cb6190f 100644
--- a/support/doctype/maintenance_schedule_detail/maintenance_schedule_detail.py
+++ b/support/doctype/maintenance_schedule_detail/maintenance_schedule_detail.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 # License: GNU General Public License v3. See license.txt
 
 from __future__ import unicode_literals
diff --git a/support/doctype/maintenance_schedule_item/maintenance_schedule_item.py b/support/doctype/maintenance_schedule_item/maintenance_schedule_item.py
index 26d0f76..cb6190f 100644
--- a/support/doctype/maintenance_schedule_item/maintenance_schedule_item.py
+++ b/support/doctype/maintenance_schedule_item/maintenance_schedule_item.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 # License: GNU General Public License v3. See license.txt
 
 from __future__ import unicode_literals
diff --git a/support/doctype/maintenance_visit/maintenance_visit.js b/support/doctype/maintenance_visit/maintenance_visit.js
index ef6f110..1a618cd 100644
--- a/support/doctype/maintenance_visit/maintenance_visit.js
+++ b/support/doctype/maintenance_visit/maintenance_visit.js
@@ -1,4 +1,4 @@
-// Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+// Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 // License: GNU General Public License v3. See license.txt
 
 wn.provide("erpnext.support");
diff --git a/support/doctype/maintenance_visit/maintenance_visit.py b/support/doctype/maintenance_visit/maintenance_visit.py
index bf8767b..f469657 100644
--- a/support/doctype/maintenance_visit/maintenance_visit.py
+++ b/support/doctype/maintenance_visit/maintenance_visit.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 # License: GNU General Public License v3. See license.txt
 
 from __future__ import unicode_literals
@@ -8,7 +8,6 @@
 from webnotes.model.bean import getlist
 from webnotes import msgprint
 
-sql = webnotes.conn.sql
 	
 
 from utilities.transaction_base import TransactionBase
@@ -19,7 +18,7 @@
 		self.doclist = doclist
 	
 	def get_item_details(self, item_code):
-		item = sql("select item_name,description from `tabItem` where name = '%s'" %(item_code), as_dict=1)
+		item = webnotes.conn.sql("select item_name,description from `tabItem` where name = '%s'" %(item_code), as_dict=1)
 		ret = {
 			'item_name' : item and item[0]['item_name'] or '',
 			'description' : item and item[0]['description'] or ''
@@ -28,7 +27,7 @@
 			
 	def validate_serial_no(self):
 		for d in getlist(self.doclist, 'maintenance_visit_details'):
-			if d.serial_no and not sql("select name from `tabSerial No` where name = '%s' and docstatus != 2" % d.serial_no):
+			if d.serial_no and not webnotes.conn.sql("select name from `tabSerial No` where name = '%s' and docstatus != 2" % d.serial_no):
 				msgprint("Serial No: "+ d.serial_no + " not exists in the system")
 				raise Exception
 
@@ -52,7 +51,7 @@
 					elif self.doc.completion_status == 'Partially Completed':
 						status = 'Work In Progress'
 				else:
-					nm = sql("select t1.name, t1.mntc_date, t2.service_person, t2.work_done from `tabMaintenance Visit` t1, `tabMaintenance Visit Purpose` t2 where t2.parent = t1.name and t1.completion_status = 'Partially Completed' and t2.prevdoc_docname = %s and t1.name!=%s and t1.docstatus = 1 order by t1.name desc limit 1", (d.prevdoc_docname, self.doc.name))
+					nm = webnotes.conn.sql("select t1.name, t1.mntc_date, t2.service_person, t2.work_done from `tabMaintenance Visit` t1, `tabMaintenance Visit Purpose` t2 where t2.parent = t1.name and t1.completion_status = 'Partially Completed' and t2.prevdoc_docname = %s and t1.name!=%s and t1.docstatus = 1 order by t1.name desc limit 1", (d.prevdoc_docname, self.doc.name))
 					
 					if nm:
 						status = 'Work In Progress'
@@ -65,7 +64,7 @@
 						service_person = ''
 						work_done = ''
 				
-				sql("update `tabCustomer Issue` set resolution_date=%s, resolved_by=%s, resolution_details=%s, status=%s where name =%s",(mntc_date,service_person,work_done,status,d.prevdoc_docname))
+				webnotes.conn.sql("update `tabCustomer Issue` set resolution_date=%s, resolved_by=%s, resolution_details=%s, status=%s where name =%s",(mntc_date,service_person,work_done,status,d.prevdoc_docname))
 	
 
 	def check_if_last_visit(self):
@@ -77,7 +76,7 @@
 				check_for_doctype = d.prevdoc_doctype
 		
 		if check_for_docname:
-			check = sql("select t1.name from `tabMaintenance Visit` t1, `tabMaintenance Visit Purpose` t2 where t2.parent = t1.name and t1.name!=%s and t2.prevdoc_docname=%s and t1.docstatus = 1 and (t1.mntc_date > %s or (t1.mntc_date = %s and t1.mntc_time > %s))", (self.doc.name, check_for_docname, self.doc.mntc_date, self.doc.mntc_date, self.doc.mntc_time))
+			check = webnotes.conn.sql("select t1.name from `tabMaintenance Visit` t1, `tabMaintenance Visit Purpose` t2 where t2.parent = t1.name and t1.name!=%s and t2.prevdoc_docname=%s and t1.docstatus = 1 and (t1.mntc_date > %s or (t1.mntc_date = %s and t1.mntc_time > %s))", (self.doc.name, check_for_docname, self.doc.mntc_date, self.doc.mntc_date, self.doc.mntc_time))
 			
 			if check:
 				check_lst = [x[0] for x in check]
diff --git a/support/doctype/maintenance_visit/maintenance_visit.txt b/support/doctype/maintenance_visit/maintenance_visit.txt
index ee84f96..f68a1f4 100644
--- a/support/doctype/maintenance_visit/maintenance_visit.txt
+++ b/support/doctype/maintenance_visit/maintenance_visit.txt
@@ -2,7 +2,7 @@
  {
   "creation": "2013-01-10 16:34:31", 
   "docstatus": 0, 
-  "modified": "2013-07-22 15:24:40", 
+  "modified": "2013-11-02 16:59:24", 
   "modified_by": "Administrator", 
   "owner": "ashwini@webnotestech.com"
  }, 
@@ -293,6 +293,7 @@
   "fieldtype": "Column Break"
  }, 
  {
+  "description": "<a href=\"#Sales Browser/Territory\">Add / Edit</a>", 
   "doctype": "DocField", 
   "fieldname": "territory", 
   "fieldtype": "Link", 
@@ -301,6 +302,7 @@
   "print_hide": 1
  }, 
  {
+  "description": "<a href=\"#Sales Browser/Customer Group\">Add / Edit</a>", 
   "doctype": "DocField", 
   "fieldname": "customer_group", 
   "fieldtype": "Link", 
diff --git a/support/doctype/maintenance_visit_purpose/maintenance_visit_purpose.py b/support/doctype/maintenance_visit_purpose/maintenance_visit_purpose.py
index 26d0f76..cb6190f 100644
--- a/support/doctype/maintenance_visit_purpose/maintenance_visit_purpose.py
+++ b/support/doctype/maintenance_visit_purpose/maintenance_visit_purpose.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 # License: GNU General Public License v3. See license.txt
 
 from __future__ import unicode_literals
diff --git a/support/doctype/newsletter/newsletter.js b/support/doctype/newsletter/newsletter.js
index 0531196..f7a7ad1 100644
--- a/support/doctype/newsletter/newsletter.js
+++ b/support/doctype/newsletter/newsletter.js
@@ -1,4 +1,4 @@
-// Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+// Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 // License: GNU General Public License v3. See license.txt
 
 cur_frm.cscript.onload = function(doc) {
@@ -16,7 +16,7 @@
 	erpnext.hide_naming_series();
 	if(!doc.__islocal && !cint(doc.email_sent) && !doc.__unsaved
 			&& inList(wn.boot.profile.can_write, doc.doctype)) {
-		cur_frm.add_custom_button('Send', function() {
+		cur_frm.add_custom_button(wn._('Send'), function() {
 			return $c_obj(make_doclist(doc.doctype, doc.name), 'send_emails', '', function(r) {
 				cur_frm.refresh();
 			});
diff --git a/support/doctype/newsletter/newsletter.py b/support/doctype/newsletter/newsletter.py
index b201cc5..164d7df 100644
--- a/support/doctype/newsletter/newsletter.py
+++ b/support/doctype/newsletter/newsletter.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 # License: GNU General Public License v3. See license.txt
 
 from __future__ import unicode_literals
@@ -76,22 +76,25 @@
 		sender = self.doc.send_from or webnotes.utils.get_formatted_email(self.doc.owner)
 		
 		from webnotes.utils.email_lib.bulk import send
-		webnotes.conn.auto_commit_on_many_writes = True
+		
+		if not webnotes.flags.in_test:
+			webnotes.conn.auto_commit_on_many_writes = True
 		
 		send(recipients = self.recipients, sender = sender, 
 			subject = self.doc.subject, message = self.doc.message,
 			doctype = self.send_to_doctype, email_field = "email_id",
 			ref_doctype = self.doc.doctype, ref_docname = self.doc.name)
 
-		webnotes.conn.auto_commit_on_many_writes = False
+		if not webnotes.flags.in_test:
+			webnotes.conn.auto_commit_on_many_writes = False
 
 	def validate_send(self):
 		if self.doc.fields.get("__islocal"):
 			webnotes.msgprint(_("""Please save the Newsletter before sending."""),
 				raise_exception=1)
 
-		import conf
-		if getattr(conf, "status", None) == "Trial":
+		from webnotes import conf
+		if (conf.get("status") or None) == "Trial":
 			webnotes.msgprint(_("""Sending newsletters is not allowed for Trial users, \
 				to prevent abuse of this feature."""), raise_exception=1)
 
@@ -105,10 +108,10 @@
 	}
 
 
-lead_naming_series = None
 def create_lead(email_id):
 	"""create a lead if it does not exist"""
 	from email.utils import parseaddr
+	from webnotes.model.doc import get_default_naming_series
 	real_name, email_id = parseaddr(email_id)
 	
 	if webnotes.conn.get_value("Lead", {"email_id": email_id}):
@@ -119,24 +122,8 @@
 		"email_id": email_id,
 		"lead_name": real_name or email_id,
 		"status": "Contacted",
-		"naming_series": lead_naming_series or get_lead_naming_series(),
+		"naming_series": get_default_naming_series("Lead"),
 		"company": webnotes.conn.get_default("company"),
 		"source": "Email"
 	})
-	lead.insert()
-	
-def get_lead_naming_series():
-	"""gets lead's default naming series"""
-	global lead_naming_series
-	naming_series_field = webnotes.get_doctype("Lead").get_field("naming_series")
-	if naming_series_field.default:
-		lead_naming_series = naming_series_field.default
-	else:
-		latest_naming_series = webnotes.conn.sql("""select naming_series
-			from `tabLead` order by creation desc limit 1""")
-		if latest_naming_series:
-			lead_naming_series = latest_naming_series[0][0]
-		else:
-			lead_naming_series = filter(None, naming_series_field.options.split("\n"))[0]
-	
-	return lead_naming_series
+	lead.insert()
\ No newline at end of file
diff --git a/support/doctype/newsletter/newsletter.txt b/support/doctype/newsletter/newsletter.txt
index 45f075e..123eeed 100644
--- a/support/doctype/newsletter/newsletter.txt
+++ b/support/doctype/newsletter/newsletter.txt
@@ -2,7 +2,7 @@
  {
   "creation": "2013-01-10 16:34:31", 
   "docstatus": 0, 
-  "modified": "2013-08-08 14:22:34", 
+  "modified": "2013-11-02 14:06:04", 
   "modified_by": "Administrator", 
   "owner": "Administrator"
  }, 
@@ -53,7 +53,7 @@
   "doctype": "DocField", 
   "fieldname": "naming_series", 
   "fieldtype": "Select", 
-  "label": "Document Numbering Series", 
+  "label": "Series", 
   "options": "NL-", 
   "reqd": 1
  }, 
diff --git a/support/doctype/newsletter/test_newsletter.py b/support/doctype/newsletter/test_newsletter.py
index fae3e40..697161d 100644
--- a/support/doctype/newsletter/test_newsletter.py
+++ b/support/doctype/newsletter/test_newsletter.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 # License: GNU General Public License v3. See license.txt
 
 import webnotes, unittest
@@ -45,20 +45,23 @@
 		"subject": "_Test Newsletter to Lead",
 		"send_to_type": "Lead",
 		"lead_source": "All",
-		"message": "This is a test newsletter"
+		"message": "This is a test newsletter",
+		"send_from": "admin@example.com"
 	}],
 	[{
 		"doctype": "Newsletter",
 		"subject": "_Test Newsletter to Contact",
 		"send_to_type": "Contact",
 		"contact_type": "Customer",
-		"message": "This is a test newsletter"
+		"message": "This is a test newsletter",
+		"send_from": "admin@example.com"
 	}],
 	[{
 		"doctype": "Newsletter",
 		"subject": "_Test Newsletter to Custom",
 		"send_to_type": "Custom",
 		"email_list": "test_custom@example.com, test_custom1@example.com, test_custom2@example.com",
-		"message": "This is a test newsletter"
+		"message": "This is a test newsletter",
+		"send_from": "admin@example.com"
 	}],
 ]
diff --git a/support/doctype/support_ticket/get_support_mails.py b/support/doctype/support_ticket/get_support_mails.py
index 4dcb59e..33cb023 100644
--- a/support/doctype/support_ticket/get_support_mails.py
+++ b/support/doctype/support_ticket/get_support_mails.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 # License: GNU General Public License v3. See license.txt
 
 from __future__ import unicode_literals
@@ -54,7 +54,7 @@
 		
 	def auto_close_tickets(self):
 		webnotes.conn.sql("""update `tabSupport Ticket` set status = 'Closed' 
-			where status = 'Waiting for Customer' 
+			where status = 'Replied' 
 			and date_sub(curdate(),interval 15 Day) > modified""")
 
 def get_support_mails():
@@ -81,7 +81,7 @@
 	
 	make(content=content, sender=sender, subject = subject,
 		doctype="Support Ticket", name=ticket.doc.name,
-		date=mail.date if mail else today())
+		date=mail.date if mail else today(), sent_or_received="Received")
 
 	if mail:
 		mail.save_attachments_in_doc(ticket.doc)
diff --git a/support/doctype/support_ticket/support_ticket.css b/support/doctype/support_ticket/support_ticket.css
deleted file mode 100644
index dbfff3c..0000000
--- a/support/doctype/support_ticket/support_ticket.css
+++ /dev/null
@@ -1,15 +0,0 @@
-
-.comm-content {
-	border-top: 1px solid #ddd; 
-	padding: 10px;
-	display: none;
-}
-
-.support-ticket-wrapper {
-	margin-top: 10px;
-}
-
-.support-ticket-title {
-	padding: 5px;
-	border-bottom: 1px solid black;
-}
diff --git a/support/doctype/support_ticket/support_ticket.js b/support/doctype/support_ticket/support_ticket.js
index 0e61273..4f8f756 100644
--- a/support/doctype/support_ticket/support_ticket.js
+++ b/support/doctype/support_ticket/support_ticket.js
@@ -1,4 +1,4 @@
-// Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+// Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 // License: GNU General Public License v3. See license.txt
 
 cur_frm.fields_dict.customer.get_query = function(doc,cdt,cdn) {
@@ -6,7 +6,7 @@
 
 wn.provide("erpnext.support");
 // TODO commonify this code
-erpnext.support.CustomerIssue = wn.ui.form.Controller.extend({
+erpnext.support.SupportTicket = wn.ui.form.Controller.extend({
 	customer: function() {
 		var me = this;
 		if(this.frm.doc.customer) {
@@ -18,13 +18,13 @@
 	}
 });
 
-$.extend(cur_frm.cscript, new erpnext.support.CustomerIssue({frm: cur_frm}));
+$.extend(cur_frm.cscript, new erpnext.support.SupportTicket({frm: cur_frm}));
 
 $.extend(cur_frm.cscript, {
 	onload: function(doc, dt, dn) {
 		if(in_list(user_roles,'System Manager')) {
-			cur_frm.footer.help_area.innerHTML = '<p><a href="#Form/Email Settings/Email Settings">Email Settings</a><br>\
-				<span class="help">Integrate incoming support emails to Support Ticket</span></p>';
+			cur_frm.footer.help_area.innerHTML = '<p><a href="#Form/Email Settings/Email Settings">'+wn._("Email Settings")+'</a><br>\
+				<span class="help">'+wn._("Integrate incoming support emails to Support Ticket")+'</span></p>';
 		}
 	},
 	
@@ -52,6 +52,7 @@
 			comm_list.push({
 				"sender": doc.raised_by,
 				"creation": doc.creation,
+				"subject": doc.subject,
 				"content": doc.description});
 		}
 					
diff --git a/support/doctype/support_ticket/support_ticket.py b/support/doctype/support_ticket/support_ticket.py
index bf2a9fb..fd79583 100644
--- a/support/doctype/support_ticket/support_ticket.py
+++ b/support/doctype/support_ticket/support_ticket.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 # License: GNU General Public License v3. See license.txt
 
 from __future__ import unicode_literals
@@ -14,7 +14,7 @@
 	
 	def get_sender(self, comm):
 		return webnotes.conn.get_value('Email Settings',None,'support_email')
-	
+
 	def get_subject(self, comm):
 		return '[' + self.doc.name + '] ' + (comm.subject or 'No Subject Specified')
 	
@@ -35,16 +35,7 @@
 		if self.doc.status == "Closed":
 			from webnotes.widgets.form.assign_to import clear
 			clear(self.doc.doctype, self.doc.name)
-		
-	def on_communication(self, comm):
-		if comm.sender == self.get_sender(comm) or \
-			webnotes.conn.get_value("Profile", extract_email_id(comm.sender), "user_type")=="System User":
-				self.doc.status = "Waiting for Customer"
-		else:
-			self.doc.status = "Open"
-		self.update_status()
-		self.doc.save()
-		
+				
 	def set_lead_contact(self, email_id):
 		import email.utils
 		email_id = email.utils.parseaddr(email_id)
diff --git a/support/doctype/support_ticket/support_ticket.txt b/support/doctype/support_ticket/support_ticket.txt
index 9f385b2..684c809 100644
--- a/support/doctype/support_ticket/support_ticket.txt
+++ b/support/doctype/support_ticket/support_ticket.txt
@@ -2,7 +2,7 @@
  {
   "creation": "2013-02-01 10:36:25", 
   "docstatus": 0, 
-  "modified": "2013-09-10 10:54:02", 
+  "modified": "2013-11-02 14:06:26", 
   "modified_by": "Administrator", 
   "owner": "Administrator"
  }, 
@@ -53,7 +53,7 @@
   "fieldname": "naming_series", 
   "fieldtype": "Select", 
   "hidden": 0, 
-  "label": "Document Numbering Series", 
+  "label": "Series", 
   "no_copy": 1, 
   "options": "SUP", 
   "print_hide": 1, 
@@ -61,22 +61,6 @@
   "search_index": 0
  }, 
  {
-  "default": "Open", 
-  "doctype": "DocField", 
-  "fieldname": "status", 
-  "fieldtype": "Select", 
-  "in_filter": 0, 
-  "in_list_view": 1, 
-  "label": "Status", 
-  "no_copy": 1, 
-  "oldfieldname": "status", 
-  "oldfieldtype": "Select", 
-  "options": "\nOpen\nTo Reply\nWaiting for Customer\nHold\nClosed", 
-  "read_only": 0, 
-  "reqd": 0, 
-  "search_index": 1
- }, 
- {
   "doctype": "DocField", 
   "fieldname": "subject", 
   "fieldtype": "Data", 
@@ -93,6 +77,22 @@
   "fieldtype": "Column Break"
  }, 
  {
+  "default": "Open", 
+  "doctype": "DocField", 
+  "fieldname": "status", 
+  "fieldtype": "Select", 
+  "in_filter": 0, 
+  "in_list_view": 1, 
+  "label": "Status", 
+  "no_copy": 1, 
+  "oldfieldname": "status", 
+  "oldfieldtype": "Select", 
+  "options": "Open\nReplied\nHold\nClosed", 
+  "read_only": 0, 
+  "reqd": 0, 
+  "search_index": 1
+ }, 
+ {
   "depends_on": "eval:doc.__islocal", 
   "doctype": "DocField", 
   "fieldname": "raised_by", 
diff --git a/support/doctype/support_ticket/templates/pages/ticket.py b/support/doctype/support_ticket/templates/pages/ticket.py
index ce3100f..28d8802 100644
--- a/support/doctype/support_ticket/templates/pages/ticket.py
+++ b/support/doctype/support_ticket/templates/pages/ticket.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 # License: GNU General Public License v3. See license.txt
 
 from __future__ import unicode_literals
diff --git a/support/doctype/support_ticket/templates/pages/tickets.py b/support/doctype/support_ticket/templates/pages/tickets.py
index dd2e52e..1816ccc 100644
--- a/support/doctype/support_ticket/templates/pages/tickets.py
+++ b/support/doctype/support_ticket/templates/pages/tickets.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 # License: GNU General Public License v3. See license.txt
 
 from __future__ import unicode_literals
diff --git a/support/page/support_analytics/support_analytics.js b/support/page/support_analytics/support_analytics.js
index 7e44917..0cb8850 100644
--- a/support/page/support_analytics/support_analytics.js
+++ b/support/page/support_analytics/support_analytics.js
@@ -1,24 +1,24 @@
-// Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+// Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 // License: GNU General Public License v3. See license.txt
 
 wn.pages['support-analytics'].onload = function(wrapper) { 
 	wn.ui.make_app_page({
 		parent: wrapper,
-		title: 'Support Analytics',
+		title: wn._('Support Analytics'),
 		single_column: true
 	});					
 
 	new erpnext.SupportAnalytics(wrapper);
 	
-	wrapper.appframe.add_home_breadcrumb()
+
 	wrapper.appframe.add_module_icon("Support")
-	wrapper.appframe.add_breadcrumb("icon-bar-chart")
+	
 }
 
 erpnext.SupportAnalytics = wn.views.GridReportWithPlot.extend({
 	init: function(wrapper) {
 		this._super({
-			title: "Support Analtyics",
+			title: wn._("Support Analtyics"),
 			page: wrapper,
 			parent: $(wrapper).find('.layout-main'),
 			appframe: wrapper.appframe,
@@ -27,22 +27,22 @@
 	},
 	
 	filters: [
-		{fieldtype:"Select", label: "Fiscal Year", link:"Fiscal Year", 
+		{fieldtype:"Select", label: wn._("Fiscal Year"), link:"Fiscal Year", 
 			default_value: "Select Fiscal Year..."},
-		{fieldtype:"Date", label: "From Date"},
-		{fieldtype:"Label", label: "To"},
-		{fieldtype:"Date", label: "To Date"},
-		{fieldtype:"Select", label: "Range", 
+		{fieldtype:"Date", label: wn._("From Date")},
+		{fieldtype:"Label", label: wn._("To")},
+		{fieldtype:"Date", label: wn._("To Date")},
+		{fieldtype:"Select", label: wn._("Range"), 
 			options:["Daily", "Weekly", "Monthly", "Quarterly", "Yearly"]},
-		{fieldtype:"Button", label: "Refresh", icon:"icon-refresh icon-white", cssClass:"btn-info"},
-		{fieldtype:"Button", label: "Reset Filters"}
+		{fieldtype:"Button", label: wn._("Refresh"), icon:"icon-refresh icon-white"},
+		{fieldtype:"Button", label: wn._("Reset Filters")}
 	],
 
 	setup_columns: function() {
 		var std_columns = [
-			{id: "check", name: "Plot", field: "check", width: 30,
+			{id: "check", name: wn._("Plot"), field: "check", width: 30,
 				formatter: this.check_formatter},
-			{id: "status", name: "Status", field: "status", width: 100},
+			{id: "status", name: wn._("Status"), field: "status", width: 100},
 		];
 		this.make_date_range_columns();		
 		this.columns = std_columns.concat(this.columns);
diff --git a/support/page/support_home/support_home.js b/support/page/support_home/support_home.js
index 0ae1b8b..940f800 100644
--- a/support/page/support_home/support_home.js
+++ b/support/page/support_home/support_home.js
@@ -1,4 +1,4 @@
-// Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+// Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 // License: GNU General Public License v3. See license.txt"
 
 wn.module_page["Support"] = [
diff --git a/translations/ar.csv b/translations/ar.csv
index 9e075a8..e019413 100644
--- a/translations/ar.csv
+++ b/translations/ar.csv
@@ -814,7 +814,7 @@
 Delivery Note Items,ملاحظة عناصر التسليم

 Delivery Note Message,ملاحظة تسليم رسالة

 Delivery Note No,ملاحظة لا تسليم

-Delivery Note Packing Item,ملاحظة التوصيل التغليف

+Packed Item,ملاحظة التوصيل التغليف

 Delivery Note Required,ملاحظة التسليم المطلوبة

 Delivery Note Trends,ملاحظة اتجاهات التسليم

 Delivery Status,حالة التسليم

@@ -1683,7 +1683,7 @@
 "Merging is only possible if following \					properties are same in both records.					Group or Ledger, Debit or Credit, Is PL Account",دمج غير ممكن إلا إذا عقب \ الخصائص هي نفسها في كل السجلات. مجموعة أو ليدجر، الخصم أو الائتمان، هل الحساب PL

 Message,رسالة

 Message Parameter,رسالة معلمة

-Message greater than 160 character will be splitted into multiple mesage,سيتم انقسم رسالة أكبر من 160 حرف في mesage متعددة

+Messages greater than 160 characters will be split into multiple messages,سيتم انقسم رسالة أكبر من 160 حرف في mesage متعددة

 Messages,رسائل

 Method,طريقة

 Middle Income,المتوسطة الدخل

diff --git a/translations/de.csv b/translations/de.csv
index ccb2c88..f68cabf 100644
--- a/translations/de.csv
+++ b/translations/de.csv
@@ -814,7 +814,7 @@
 Delivery Note Items,Lieferscheinpositionen

 Delivery Note Message,Lieferschein Nachricht

 Delivery Note No,Lieferschein Nein

-Delivery Note Packing Item,Lieferschein Verpackung Artikel

+Packed Item,Lieferschein Verpackung Artikel

 Delivery Note Required,Lieferschein erforderlich

 Delivery Note Trends,Lieferschein Trends

 Delivery Status,Lieferstatus

@@ -1683,7 +1683,7 @@
 "Merging is only possible if following \					properties are same in both records.					Group or Ledger, Debit or Credit, Is PL Account","Merging ist nur möglich, wenn nach \ Eigenschaften sind in beiden Datensätzen gleich. Gruppen-oder Ledger, Debit-oder Kreditkarten, PL Konto"

 Message,Nachricht

 Message Parameter,Nachricht Parameter

-Message greater than 160 character will be splitted into multiple mesage,Größer als 160 Zeichen Nachricht in mehrere mesage aufgeteilt werden

+Messages greater than 160 characters will be split into multiple messages,Größer als 160 Zeichen Nachricht in mehrere mesage aufgeteilt werden

 Messages,Nachrichten

 Method,Verfahren

 Middle Income,Middle Income

diff --git a/translations/el.csv b/translations/el.csv
index 7d429bb..45eacb8 100644
--- a/translations/el.csv
+++ b/translations/el.csv
@@ -827,7 +827,7 @@
 Delivery Note Items,Σημείωση Στοιχεία Παράδοσης

 Delivery Note Message,Αποστολή μηνύματος Σημείωση

 Delivery Note No,Σημείωση παράδοσης αριθ.

-Delivery Note Packing Item,Παράδοση Θέση Συσκευασία Σημείωση

+Packed Item,Παράδοση Θέση Συσκευασία Σημείωση

 Delivery Note Required,Σημείωση παράδοσης Απαιτείται

 Delivery Note Trends,Τάσεις Σημείωση Παράδοση

 Delivery Status,Κατάσταση παράδοσης

@@ -1704,7 +1704,7 @@
 "Merging is only possible if following \					properties are same in both records.					Group or Ledger, Debit or Credit, Is PL Account","Η συγχώνευση είναι δυνατή μόνο εάν μετά \ ιδιότητες είναι ίδια και στα δύο αρχεία. Ομάδα ή Ledger, χρεωστικές ή πιστωτικές, είναι PL λογαριασμού"

 Message,Μήνυμα

 Message Parameter,Παράμετρος στο μήνυμα

-Message greater than 160 character will be splitted into multiple mesage,Μήνυμα μεγαλύτερη από 160 χαρακτήρων που θα χωρίζονται σε πολλαπλές mesage

+Messages greater than 160 characters will be split into multiple messages,Μήνυμα μεγαλύτερη από 160 χαρακτήρων που θα χωρίζονται σε πολλαπλές mesage

 Messages,Μηνύματα

 Method,Μέθοδος

 Middle Income,Μέση εισοδήματος

diff --git a/translations/es.csv b/translations/es.csv
index d30649d..86f213d 100644
--- a/translations/es.csv
+++ b/translations/es.csv
@@ -814,7 +814,7 @@
 Delivery Note Items,Artículos de entrega Nota

 Delivery Note Message,Entrega de mensajes Nota

 Delivery Note No,Entrega Nota No

-Delivery Note Packing Item,Nota de Entrega Embalaje artículo

+Packed Item,Nota de Entrega Embalaje artículo

 Delivery Note Required,Nota de entrega requerida

 Delivery Note Trends,Tendencias albarán

 Delivery Status,Estado de entrega

@@ -1683,7 +1683,7 @@
 "Merging is only possible if following \					properties are same in both records.					Group or Ledger, Debit or Credit, Is PL Account","La fusión sólo es posible si sigue a \ propiedades son las mismas en ambos registros. Grupo o Ledger, de débito o de crédito, es el relato PL"

 Message,Mensaje

 Message Parameter,Mensaje de Parámetros

-Message greater than 160 character will be splitted into multiple mesage,Mensaje mayor de 160 caracteres se dividirá en múltiples mesage

+Messages greater than 160 characters will be split into multiple messages,Mensaje mayor de 160 caracteres se dividirá en múltiples mesage

 Messages,Mensajes

 Method,Método

 Middle Income,Ingreso Medio

diff --git a/translations/fr.csv b/translations/fr.csv
index dacdd2f..fc77f69 100644
--- a/translations/fr.csv
+++ b/translations/fr.csv
@@ -814,7 +814,7 @@
 Delivery Note Items,Articles bordereau de livraison

 Delivery Note Message,Note Message de livraison

 Delivery Note No,Remarque Aucune livraison

-Delivery Note Packing Item,Article d&#39;emballage de livraison Note

+Packed Item,Article d&#39;emballage de livraison Note

 Delivery Note Required,Remarque livraison requis

 Delivery Note Trends,Bordereau de livraison Tendances

 Delivery Status,Delivery Status

@@ -1683,7 +1683,7 @@
 "Merging is only possible if following \					properties are same in both records.					Group or Ledger, Debit or Credit, Is PL Account","La fusion n&#39;est possible que si à la suite \ propriétés sont les mêmes dans les deux dossiers. Groupe ou Ledger, débit ou de crédit, est le compte PL"

 Message,Message

 Message Parameter,Paramètre message

-Message greater than 160 character will be splitted into multiple mesage,Un message de plus de 160 caractères sera découpé en plusieurs mesage

+Messages greater than 160 characters will be split into multiple messages,Un message de plus de 160 caractères sera découpé en plusieurs mesage

 Messages,Messages

 Method,Méthode

 Middle Income,Revenu intermédiaire

diff --git a/translations/hi.csv b/translations/hi.csv
index 6f9576c..dd967bc 100644
--- a/translations/hi.csv
+++ b/translations/hi.csv
@@ -814,7 +814,7 @@
 Delivery Note Items,डिलिवरी नोट आइटम

 Delivery Note Message,डिलिवरी नोट संदेश

 Delivery Note No,डिलिवरी नोट

-Delivery Note Packing Item,डिलिवरी नोट पैकिंग आइटम

+Packed Item,डिलिवरी नोट पैकिंग आइटम

 Delivery Note Required,डिलिवरी नोट आवश्यक

 Delivery Note Trends,डिलिवरी नोट रुझान

 Delivery Status,डिलिवरी स्थिति

@@ -1683,7 +1683,7 @@
 "Merging is only possible if following \					properties are same in both records.					Group or Ledger, Debit or Credit, Is PL Account","\ गुण दोनों रिकॉर्ड में वही कर रहे हैं निम्नलिखित अगर मर्ज ही संभव है. समूह या लेजर, डेबिट या क्रेडिट, पीएल खाता है"

 Message,संदेश

 Message Parameter,संदेश पैरामीटर

-Message greater than 160 character will be splitted into multiple mesage,160 चरित्र से अधिक संदेश कई mesage में splitted जाएगा

+Messages greater than 160 characters will be split into multiple messages,160 चरित्र से अधिक संदेश कई mesage में split जाएगा

 Messages,संदेश

 Method,विधि

 Middle Income,मध्य आय

diff --git a/translations/hr.csv b/translations/hr.csv
index d60f85b..8fd2cb8 100644
--- a/translations/hr.csv
+++ b/translations/hr.csv
@@ -814,7 +814,7 @@
 Delivery Note Items,Način Napomena Stavke

 Delivery Note Message,Otpremnica Poruka

 Delivery Note No,Dostava Napomena Ne

-Delivery Note Packing Item,Dostava Napomena Pakiranje artikla

+Packed Item,Dostava Napomena Pakiranje artikla

 Delivery Note Required,Dostava Napomena Obavezno

 Delivery Note Trends,Otpremnici trendovi

 Delivery Status,Status isporuke

@@ -1683,7 +1683,7 @@
 "Merging is only possible if following \					properties are same in both records.					Group or Ledger, Debit or Credit, Is PL Account","Spajanje je moguće samo ako se slijedi \ svojstva su isti u oba zapisa. Grupa ili knjiga, debitne ili kreditne, Je PL račun"

 Message,Poruka

 Message Parameter,Poruka parametra

-Message greater than 160 character will be splitted into multiple mesage,Poruka veća od 160 karaktera će biti splitted u više mesage

+Messages greater than 160 characters will be split into multiple messages,Poruka veća od 160 karaktera će biti split u više mesage

 Messages,Poruke

 Method,Način

 Middle Income,Srednji Prihodi

diff --git a/translations/it.csv b/translations/it.csv
index c91fc84..b567e1d 100644
--- a/translations/it.csv
+++ b/translations/it.csv
Binary files differ
diff --git a/translations/nl.csv b/translations/nl.csv
index 3cc7152..8aec131 100644
--- a/translations/nl.csv
+++ b/translations/nl.csv
@@ -814,7 +814,7 @@
 Delivery Note Items,Levering Opmerking Items

 Delivery Note Message,Levering Opmerking Bericht

 Delivery Note No,Levering aantekening

-Delivery Note Packing Item,Levering Opmerking Verpakking Item

+Packed Item,Levering Opmerking Verpakking Item

 Delivery Note Required,Levering Opmerking Verplicht

 Delivery Note Trends,Delivery Note Trends

 Delivery Status,Delivery Status

@@ -1683,7 +1683,7 @@
 "Merging is only possible if following \					properties are same in both records.					Group or Ledger, Debit or Credit, Is PL Account","Samenvoegen is alleen mogelijk als volgt \ eigenschappen zijn hetzelfde in beide records. Groep of Ledger, Debet of Credit, Is PL Account"

 Message,Bericht

 Message Parameter,Bericht Parameter

-Message greater than 160 character will be splitted into multiple mesage,Bericht van meer dan 160 tekens worden opgesplitst in meerdere mesage

+Messages greater than 160 characters will be split into multiple messages,Bericht van meer dan 160 tekens worden opgesplitst in meerdere mesage

 Messages,Berichten

 Method,Methode

 Middle Income,Midden Inkomen

diff --git a/translations/pt-BR.csv b/translations/pt-BR.csv
index 274c7d4..2eeebd8 100644
--- a/translations/pt-BR.csv
+++ b/translations/pt-BR.csv
@@ -814,7 +814,7 @@
 Delivery Note Items,Itens da Guia de Remessa

 Delivery Note Message,Mensagem da Guia de Remessa

 Delivery Note No,Nº da Guia de Remessa

-Delivery Note Packing Item,Item do Pacote da Guia de Remessa

+Packed Item,Item do Pacote da Guia de Remessa

 Delivery Note Required,Guia de Remessa Obrigatória

 Delivery Note Trends,Nota de entrega Trends

 Delivery Status,Estado da entrega

@@ -1683,7 +1683,7 @@
 "Merging is only possible if following \					properties are same in both records.					Group or Ledger, Debit or Credit, Is PL Account","A fusão só é possível se seguindo \ propriedades são as mesmas em ambos os registros. Grupo ou Ledger, de débito ou de crédito, é Conta PL"

 Message,Mensagem

 Message Parameter,Parâmetro da mensagem

-Message greater than 160 character will be splitted into multiple mesage,Mensagens maiores do que 160 caracteres vão ser divididos em múltiplas mensagens

+Messages greater than 160 characters will be split into multiple messages,Mensagens maiores do que 160 caracteres vão ser divididos em múltiplas mensagens

 Messages,Mensagens

 Method,Método

 Middle Income,Rendimento Médio

diff --git a/translations/pt.csv b/translations/pt.csv
index 31d20bc..4d12aff 100644
--- a/translations/pt.csv
+++ b/translations/pt.csv
@@ -814,7 +814,7 @@
 Delivery Note Items,Nota Itens de entrega

 Delivery Note Message,Mensagem Nota de Entrega

 Delivery Note No,Nota de Entrega Não

-Delivery Note Packing Item,Entrega do item embalagem Nota

+Packed Item,Entrega do item embalagem Nota

 Delivery Note Required,Nota de Entrega Obrigatório

 Delivery Note Trends,Nota de entrega Trends

 Delivery Status,Estado entrega

@@ -1683,7 +1683,7 @@
 "Merging is only possible if following \					properties are same in both records.					Group or Ledger, Debit or Credit, Is PL Account","A fusão só é possível se seguindo \ propriedades são as mesmas em ambos os registros. Grupo ou Ledger, de débito ou de crédito, é Conta PL"

 Message,Mensagem

 Message Parameter,Parâmetro mensagem

-Message greater than 160 character will be splitted into multiple mesage,Mensagem maior do que 160 caracteres vai ser dividido em mesage múltipla

+Messages greater than 160 characters will be split into multiple messages,Mensagem maior do que 160 caracteres vai ser dividido em mesage múltipla

 Messages,Mensagens

 Method,Método

 Middle Income,Rendimento Médio

diff --git a/translations/sr.csv b/translations/sr.csv
index aa14049..9ba2b7d 100644
--- a/translations/sr.csv
+++ b/translations/sr.csv
@@ -814,7 +814,7 @@
 Delivery Note Items,Достава Напомена Ставке

 Delivery Note Message,Испорука Напомена порука

 Delivery Note No,Испорука Напомена Не

-Delivery Note Packing Item,Испорука Напомена Паковање јединице

+Packed Item,Испорука Напомена Паковање јединице

 Delivery Note Required,Испорука Напомена Обавезно

 Delivery Note Trends,Достава Напомена трендови

 Delivery Status,Статус испоруке

@@ -1683,7 +1683,7 @@
 "Merging is only possible if following \					properties are same in both records.					Group or Ledger, Debit or Credit, Is PL Account","Спајање је могуће само ако је после \ својства су иста у оба записа. Група или Леџер, дебитна или кредитна, ПЛ је налог"

 Message,Порука

 Message Parameter,Порука Параметар

-Message greater than 160 character will be splitted into multiple mesage,Порука већи од 160 карактера ће бити подељен на више Упис

+Messages greater than 160 characters will be split into multiple messages,Порука већи од 160 карактера ће бити подељен на више Упис

 Messages,Поруке

 Method,Метод

 Middle Income,Средњи приход

diff --git a/translations/ta.csv b/translations/ta.csv
index 74cc74b..6fb00b1 100644
--- a/translations/ta.csv
+++ b/translations/ta.csv
@@ -814,7 +814,7 @@
 Delivery Note Items,டெலிவரி குறிப்பு உருப்படிகள்

 Delivery Note Message,டெலிவரி குறிப்பு செய்தி

 Delivery Note No,டெலிவரி குறிப்பு இல்லை

-Delivery Note Packing Item,டெலிவரி குறிப்பு தடைக்காப்பு பொருள்

+Packed Item,டெலிவரி குறிப்பு தடைக்காப்பு பொருள்

 Delivery Note Required,டெலிவரி குறிப்பு தேவை

 Delivery Note Trends,பந்து குறிப்பு போக்குகள்

 Delivery Status,விநியோக நிலைமை

@@ -1683,7 +1683,7 @@
 "Merging is only possible if following \					properties are same in both records.					Group or Ledger, Debit or Credit, Is PL Account","\ பண்புகள் இரண்டு பதிவுகளை ஒரே பின்வரும் என்றால் இணைத்தல் மட்டுமே சாத்தியம். குழு அல்லது லெட்ஜர், பற்று அல்லது கடன், பிஎல் கணக்கு உள்ளது"

 Message,செய்தி

 Message Parameter,செய்தி அளவுரு

-Message greater than 160 character will be splitted into multiple mesage,160 தன்மையை விட செய்தியை பல mesage கொண்டு splitted

+Messages greater than 160 characters will be split into multiple messages,160 தன்மையை விட செய்தியை பல mesage கொண்டு split

 Messages,செய்திகள்

 Method,வகை

 Middle Income,நடுத்தர வருமானம்

diff --git a/translations/th.csv b/translations/th.csv
index 7a461f0..d8c5da7 100644
--- a/translations/th.csv
+++ b/translations/th.csv
@@ -814,7 +814,7 @@
 Delivery Note Items,รายการจัดส่งสินค้าหมายเหตุ

 Delivery Note Message,ข้อความหมายเหตุจัดส่งสินค้า

 Delivery Note No,หมายเหตุจัดส่งสินค้าไม่มี

-Delivery Note Packing Item,จัดส่งสินค้าบรรจุหมายเหตุ

+Packed Item,จัดส่งสินค้าบรรจุหมายเหตุ

 Delivery Note Required,หมายเหตุจัดส่งสินค้าที่จำเป็น

 Delivery Note Trends,แนวโน้มหมายเหตุการจัดส่งสินค้า

 Delivery Status,สถานะการจัดส่งสินค้า

@@ -1683,7 +1683,7 @@
 "Merging is only possible if following \					properties are same in both records.					Group or Ledger, Debit or Credit, Is PL Account",ผสานความเป็นไปได้เฉพาะในกรณีดังต่อไปนี้ \ สมบัติเหมือนกันในทั้งประวัติ หรือกลุ่มบัญชีแยกประเภทเดบิตหรือบัตรเครดิตเป็นบัญ​​ชี PL

 Message,ข่าวสาร

 Message Parameter,พารามิเตอร์ข้อความ

-Message greater than 160 character will be splitted into multiple mesage,ข้อความมากขึ้นกว่า 160 ตัวอักษรจะได้รับการลง splitted mesage หลาย

+Messages greater than 160 characters will be split into multiple messages,ข้อความมากขึ้นกว่า 160 ตัวอักษรจะได้รับการลง split mesage หลาย

 Messages,ข้อความ

 Method,วิธี

 Middle Income,มีรายได้ปานกลาง

diff --git a/utilities/cleanup_data.py b/utilities/cleanup_data.py
index fe83ade8..630a54e 100644
--- a/utilities/cleanup_data.py
+++ b/utilities/cleanup_data.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 # License: GNU General Public License v3. See license.txt
 
 #!/usr/bin/python
diff --git a/utilities/demo/demo_control_panel.py b/utilities/demo/demo_control_panel.py
index 1f381d5..694f7d1 100644
--- a/utilities/demo/demo_control_panel.py
+++ b/utilities/demo/demo_control_panel.py
@@ -1,13 +1,16 @@
+from __future__ import unicode_literals
+import webnotes
 
-  def on_login(self):
-    from webnotes.utils import validate_email_add
-    import conf
-    if hasattr(conf, "demo_notify_url"):
-      if webnotes.form_dict.lead_email and validate_email_add(webnotes.form_dict.lead_email):
-        import requests
-        response = requests.post(conf.demo_notify_url, data={
-          "cmd":"portal.utils.send_message",
-          "subject":"Logged into Demo",
-          "sender": webnotes.form_dict.lead_email,
-          "message": "via demo.erpnext.com"
-        })
\ No newline at end of file
+class CustomDocType(DocType):
+	def on_login(self):
+		from webnotes.utils import validate_email_add
+		from webnotes import conf
+		if "demo_notify_url" in conf:
+			if webnotes.form_dict.lead_email and validate_email_add(webnotes.form_dict.lead_email):
+				import requests
+				response = requests.post(conf.demo_notify_url, data={
+					"cmd":"portal.utils.send_message",
+					"subject":"Logged into Demo",
+					"sender": webnotes.form_dict.lead_email,
+					"message": "via demo.erpnext.com"
+				})
diff --git a/utilities/demo/demo_docs/Lead.csv b/utilities/demo/demo_docs/Lead.csv
index e3415fa..948a68d 100644
--- a/utilities/demo/demo_docs/Lead.csv
+++ b/utilities/demo/demo_docs/Lead.csv
@@ -1,68 +1,68 @@
-Data Import Template,,,,,,,,,,,,,,,,,,,,,,,,,,

-Table:,Lead,,,,,,,,,,,,,,,,,,,,,,,,,

-,,,,,,,,,,,,,,,,,,,,,,,,,,

-,,,,,,,,,,,,,,,,,,,,,,,,,,

-Notes:,,,,,,,,,,,,,,,,,,,,,,,,,,

-Please do not change the template headings.,,,,,,,,,,,,,,,,,,,,,,,,,,

-First data column must be blank.,,,,,,,,,,,,,,,,,,,,,,,,,,

-Only mandatory fields are necessary for new records. You can delete non-mandatory columns if you wish.,,,,,,,,,,,,,,,,,,,,,,,,,,

-"For updating, you can update only selective columns.",,,,,,,,,,,,,,,,,,,,,,,,,,

-"If you are uploading new records, leave the ""name"""" (ID) column blank.""",,,,,,,,,,,,,,,,,,,,,,,,,,

-"If you are uploading new records, ""Naming Series"""" becomes mandatory"," if present.""",,,,,,,,,,,,,,,,,,,,,,,,,

-You can only upload upto 5000 records in one go. (may be less in some cases),,,,,,,,,,,,,,,,,,,,,,,,,,

-,,,,,,,,,,,,,,,,,,,,,,,,,,

-Column Labels,ID,Contact Name,Status,Naming Series,Company Name,Email Id,Source,From Customer,Campaign Name,Remark,Phone,Mobile No.,Fax,Website,Territory,Lead Type,Lead Owner,Market Segment,Industry,Request Type,Lost Reason,Next Contact By,Next Contact Date,Company,Unsubscribed,Blog Subscriber

-Column Name:,name,lead_name,status,naming_series,company_name,email_id,source,customer,campaign_name,remark,phone,mobile_no,fax,website,territory,type,lead_owner,market_segment,industry,request_type,order_lost_reason,contact_by,contact_date,company,unsubscribed,blog_subscriber

-Mandatory:,Yes,Yes,Yes,No,No,No,No,No,No,No,No,No,No,No,No,No,No,No,No,No,No,No,No,No,No,No

-Type:,Data (text),Data,Select,Select,Data,Data,Select,Link,Link,Small Text,Data,Data,Data,Data,Link,Select,Link,Select,Link,Select,Link,Link,Date,Link,Check,Check

-Info:,,,"One of: Open, Replied, Attempted to Contact, Contact in Future, Contacted, Interested, Not interested, Lead Lost, Converted","One of: LEAD, LEAD/10-11/, LEAD/MUMBAI/",,,"One of: Advertisement, Blog Post, Campaign, Call, Customer, Exhibition, Supplier, Website, Email",Valid Customer,Valid Campaign,,,,,,Valid Territory,"One of: Client, Channel Partner, Consultant",Valid Profile,"One of: Lower Income, Middle Income, Upper Income",Valid Industry Type,"One of: Product Enquiry, Request for Information, Suggestions, Other",Valid Quotation Lost Reason,Valid Profile,,Valid Company,0 or 1,0 or 1

-Start entering data below this line,,,,,,,,,,,,,,,,,,,,,,,,,,

-,,Mart Lakeman,Passive,,Zany Brainy,MartLakeman@einrot.com,,,,,,,,,,,,,,,,,,,,

-,,Saga Lundqvist,Passive,,Patterson-Fletcher,SagaLundqvist@dayrep.com,,,,,,,,,,,,,,,,,,,,

-,,Adna Sjöberg,Passive,,Griff's Hamburgers,AdnaSjoberg@gustr.com,,,,,,,,,,,,,,,,,,,,

-,,Ida Svendsen,Passive,,Rhodes Furniture,IdaDSvendsen@superrito.com,,,,,,,,,,,,,,,,,,,,

-,,Emppu Hämeenniemi,Passive,,Burger Chef,EmppuHameenniemi@teleworm.us,,,,,,,,,,,,,,,,,,,,

-,,Eugenio Pisano,Passive,,Stratabiz,EugenioPisano@cuvox.de,,,,,,,,,,,,,,,,,,,,

-,,Semhar Hagos,Passive,,Home Quarters Warehouse,SemharHagos@einrot.com,,,,,,,,,,,,,,,,,,,,

-,,Branimira Ivanković,Passive,,Enviro Architectural Designs,BranimiraIvankovic@einrot.com,,,,,,,,,,,,,,,,,,,,

-,,Shelly Fields,Passive,,Ideal Garden Management,ShellyLFields@superrito.com,,,,,,,,,,,,,,,,,,,,

-,,Leo Mikulić,Passive,,Listen Up,LeoMikulic@gustr.com,,,,,,,,,,,,,,,,,,,,

-,,Denisa Jarošová,Passive,,I. Magnin,DenisaJarosova@teleworm.us,,,,,,,,,,,,,,,,,,,,

-,,Janek Rutkowski,Passive,,First Rate Choice,JanekRutkowski@dayrep.com,,,,,,,,,,,,,,,,,,,,

-,,美月 宇藤,Passive,,Multi Tech Development,mm@gustr.com,,,,,,,,,,,,,,,,,,,,

-,,Даниил Афанасьев,Passive,,National Auto Parts,dd@einrot.com,,,,,,,,,,,,,,,,,,,,

-,,Zorislav Petković,Passive,,Integra Investment Plan,ZorislavPetkovic@cuvox.de,,,,,,,,,,,,,,,,,,,,

-,,Nanao Niwa,Passive,,The Lawn Guru,NanaoNiwa@superrito.com,,,,,,,,,,,,,,,,,,,,

-,,Hreiðar Jörundsson,Passive,,Buena Vista Realty Service,HreiarJorundsson@armyspy.com,,,,,,,,,,,,,,,,,,,,

-,,Lai Chu,Passive,,Bountiful Harvest Health Food Store,ChuThiBichLai@einrot.com,,,,,,,,,,,,,,,,,,,,

-,,Victor Aksakov,Passive,,P. Samuels Men's Clothiers,VictorAksakov@dayrep.com,,,,,,,,,,,,,,,,,,,,

-,,Saidalim Bisliev,Passive,,Vinyl Fever,SaidalimBisliev@cuvox.de,,,,,,,,,,,,,,,,,,,,

-,,Totte Jakobsson,Passive,,Garden Master,TotteJakobsson@armyspy.com,,,,,,,,,,,,,,,,,,,,

-,,Naná Armas,Passive,,Big Apple,NanaArmasRobles@cuvox.de,,,,,,,,,,,,,,,,,,,,

-,,Walerian Duda,Passive,,Monk House Sales,WalerianDuda@dayrep.com,,,,,,,,,,,,,,,,,,,,

-,,Moarimikashi ,Passive,,ManCharm,Moarimikashi@teleworm.us,,,,,,,,,,,,,,,,,,,,

-,,Dobromił Dąbrowski ,Passive,,Custom Lawn Care,DobromilDabrowski@dayrep.com,,,,,,,,,,,,,,,,,,,,

-,,Teigan Sinclair,Passive,,The Serendipity Dip,TeiganSinclair@gustr.com,,,,,,,,,,,,,,,,,,,,

-,,Fahad Guirguis,Passive,,Cavages,FahadSaidGuirguis@gustr.com,,,,,,,,,,,,,,,,,,,,

-,,Morten Olsen,Passive,,Gallenkamp,MortenJOlsen@armyspy.com,,,,,,,,,,,,,,,,,,,,

-,,Christian Baecker,Passive,,Webcom Business Services,ChristianBaecker@armyspy.com,,,,,,,,,,,,,,,,,,,,

-,,Sebastianus Dohmen,Passive,,Accord Investments,SebastianusDohmen@cuvox.de,,,,,,,,,,,,,,,,,,,,

-,,Eero Koskinen,Passive,,American Appliance,EeroKoskinen@superrito.com,,,,,,,,,,,,,,,,,,,,

-,,富奎 盧,Passive,,Bettendorf's,LuFuKui@teleworm.us,,,,,,,,,,,,,,,,,,,,

-,,Milica Jelić,Passive,,House Of Denmark,MilicaJelic@dayrep.com,,,,,,,,,,,,,,,,,,,,

-,,Barbora Holubová,Passive,,10000 Auto Parts,BarboraHolubova@cuvox.de,,,,,,,,,,,,,,,,,,,,

-,,Marta Kos,Passive,,Mages,MartaKos@einrot.com,,,,,,,,,,,,,,,,,,,,

-,,Simret Zula,Passive,,CSK Auto,SimretZula@cuvox.de,,,,,,,,,,,,,,,,,,,,

-,,Kamil Chlubna,Passive,,Eagle Hardware & Garden,KamilChlubna@einrot.com,,,,,,,,,,,,,,,,,,,,

-,,Aceline Bolduc,Passive,,Rustler Steak House,AcelineBolduc@armyspy.com,,,,,,,,,,,,,,,,,,,,

-,,Lucie Stupková,Passive,,ABCO Foods,LucieStupkova@gustr.com,,,,,,,,,,,,,,,,,,,,

-,,Roland Solvik,Passive,,Trak Auto,RolandSolvik@cuvox.de,,,,,,,,,,,,,,,,,,,,

-,,Mekirinzukushitakufu ,Passive,,Choices,Mekirinzukushitakufu@teleworm.us,,,,,,,,,,,,,,,,,,,,

-,,Mukharbek Sultanovich,Passive,,Megatronic,MukharbekSultanovich@cuvox.de,,,,,,,,,,,,,,,,,,,,

-,,Osman Amanuel,Passive,,Handy Dan,OsmanAmanuel@dayrep.com,,,,,,,,,,,,,,,,,,,,

-,,幸子 阪部,Passive,,Channel Home Centers,dd@armyspy.com,,,,,,,,,,,,,,,,,,,,

-,,Masakazu Kamitani,Passive,,Honest Air Group,MasakazuKamitani@superrito.com,,,,,,,,,,,,,,,,,,,,

-,,Omran Sabbagh,Passive,,Pleasures and Pasttimes,OmranNuhaidSabbagh@einrot.com,,,,,,,,,,,,,,,,,,,,

-,,Rikako Matsumura,Passive,,Lazysize,RikakoMatsumura@einrot.com,,,,,,,,,,,,,,,,,,,,

-,,Anayolisa Chukwukadibia,Passive,,Prestiga-Biz,AnayolisaChukwukadibia@einrot.com,,,,,,,,,,,,,,,,,,,,

-,,Gudmunda Hinna,Passive,,Childs Restaurants,GudmundaHinna@armyspy.com,,,,,,,,,,,,,,,,,,,,
\ No newline at end of file
+Data Import Template,,,,,,,,,,,,,,,,,,,,,,,,

+Table:,Lead,,,,,,,,,,,,,,,,,,,,,,,

+,,,,,,,,,,,,,,,,,,,,,,,,

+,,,,,,,,,,,,,,,,,,,,,,,,

+Notes:,,,,,,,,,,,,,,,,,,,,,,,,

+Please do not change the template headings.,,,,,,,,,,,,,,,,,,,,,,,,

+First data column must be blank.,,,,,,,,,,,,,,,,,,,,,,,,

+Only mandatory fields are necessary for new records. You can delete non-mandatory columns if you wish.,,,,,,,,,,,,,,,,,,,,,,,,

+"For updating, you can update only selective columns.",,,,,,,,,,,,,,,,,,,,,,,,

+"If you are uploading new records, leave the ""name"""" (ID) column blank.""",,,,,,,,,,,,,,,,,,,,,,,,

+"If you are uploading new records, ""Naming Series"""" becomes mandatory"," if present.""",,,,,,,,,,,,,,,,,,,,,,,

+You can only upload upto 5000 records in one go. (may be less in some cases),,,,,,,,,,,,,,,,,,,,,,,,

+,,,,,,,,,,,,,,,,,,,,,,,,

+Column Labels,ID,Contact Name,Status,Naming Series,Company Name,Email Id,Source,From Customer,Campaign Name,Phone,Mobile No.,Fax,Website,Territory,Lead Type,Lead Owner,Market Segment,Industry,Request Type,Next Contact By,Next Contact Date,Company,Unsubscribed,Blog Subscriber

+Column Name:,name,lead_name,status,naming_series,company_name,email_id,source,customer,campaign_name,phone,mobile_no,fax,website,territory,type,lead_owner,market_segment,industry,request_type,contact_by,contact_date,company,unsubscribed,blog_subscriber

+Mandatory:,Yes,Yes,Yes,No,No,No,No,No,No,No,No,No,No,No,No,No,No,No,No,No,No,No,No,No

+Type:,Data (text),Data,Select,Select,Data,Data,Select,Link,Link,Data,Data,Data,Data,Link,Select,Link,Select,Link,Select,Link,Date,Link,Check,Check

+Info:,,,"Lead, Open, Replied, Opportunity, Interested, Converted, Do Not Contact","One of: LEAD, LEAD/10-11/, LEAD/MUMBAI/",,,"One of: Advertisement, Blog Post, Campaign, Call, Customer, Exhibition, Supplier, Website, Email",Valid Customer,Valid Campaign,,,,,Valid Territory,"One of: Client, Channel Partner, Consultant",Valid Profile,"One of: Lower Income, Middle Income, Upper Income",Valid Industry Type,"One of: Product Enquiry, Request for Information, Suggestions, Other",Valid Profile,,Valid Company,0 or 1,0 or 1

+Start entering data below this line,,,,,,,,,,,,,,,,,,,,,,,,

+,,Mart Lakeman,Lead,,Zany Brainy,MartLakeman@einrot.com,,,,,,,,,,,,,,,,,,

+,,Saga Lundqvist,Lead,,Patterson-Fletcher,SagaLundqvist@dayrep.com,,,,,,,,,,,,,,,,,,

+,,Adna Sjöberg,Lead,,Griff's Hamburgers,AdnaSjoberg@gustr.com,,,,,,,,,,,,,,,,,,

+,,Ida Svendsen,Lead,,Rhodes Furniture,IdaDSvendsen@superrito.com,,,,,,,,,,,,,,,,,,

+,,Emppu Hämeenniemi,Lead,,Burger Chef,EmppuHameenniemi@teleworm.us,,,,,,,,,,,,,,,,,,

+,,Eugenio Pisano,Lead,,Stratabiz,EugenioPisano@cuvox.de,,,,,,,,,,,,,,,,,,

+,,Semhar Hagos,Lead,,Home Quarters Warehouse,SemharHagos@einrot.com,,,,,,,,,,,,,,,,,,

+,,Branimira Ivanković,Lead,,Enviro Architectural Designs,BranimiraIvankovic@einrot.com,,,,,,,,,,,,,,,,,,

+,,Shelly Fields,Lead,,Ideal Garden Management,ShellyLFields@superrito.com,,,,,,,,,,,,,,,,,,

+,,Leo Mikulić,Lead,,Listen Up,LeoMikulic@gustr.com,,,,,,,,,,,,,,,,,,

+,,Denisa Jarošová,Lead,,I. Magnin,DenisaJarosova@teleworm.us,,,,,,,,,,,,,,,,,,

+,,Janek Rutkowski,Lead,,First Rate Choice,JanekRutkowski@dayrep.com,,,,,,,,,,,,,,,,,,

+,,美月 宇藤,Lead,,Multi Tech Development,mm@gustr.com,,,,,,,,,,,,,,,,,,

+,,Даниил Афанасьев,Lead,,National Auto Parts,dd@einrot.com,,,,,,,,,,,,,,,,,,

+,,Zorislav Petković,Lead,,Integra Investment Plan,ZorislavPetkovic@cuvox.de,,,,,,,,,,,,,,,,,,

+,,Nanao Niwa,Lead,,The Lawn Guru,NanaoNiwa@superrito.com,,,,,,,,,,,,,,,,,,

+,,Hreiðar Jörundsson,Lead,,Buena Vista Realty Service,HreiarJorundsson@armyspy.com,,,,,,,,,,,,,,,,,,

+,,Lai Chu,Lead,,Bountiful Harvest Health Food Store,ChuThiBichLai@einrot.com,,,,,,,,,,,,,,,,,,

+,,Victor Aksakov,Lead,,P. Samuels Men's Clothiers,VictorAksakov@dayrep.com,,,,,,,,,,,,,,,,,,

+,,Saidalim Bisliev,Lead,,Vinyl Fever,SaidalimBisliev@cuvox.de,,,,,,,,,,,,,,,,,,

+,,Totte Jakobsson,Lead,,Garden Master,TotteJakobsson@armyspy.com,,,,,,,,,,,,,,,,,,

+,,Naná Armas,Lead,,Big Apple,NanaArmasRobles@cuvox.de,,,,,,,,,,,,,,,,,,

+,,Walerian Duda,Lead,,Monk House Sales,WalerianDuda@dayrep.com,,,,,,,,,,,,,,,,,,

+,,Moarimikashi ,Lead,,ManCharm,Moarimikashi@teleworm.us,,,,,,,,,,,,,,,,,,

+,,Dobromił Dąbrowski ,Lead,,Custom Lawn Care,DobromilDabrowski@dayrep.com,,,,,,,,,,,,,,,,,,

+,,Teigan Sinclair,Lead,,The Serendipity Dip,TeiganSinclair@gustr.com,,,,,,,,,,,,,,,,,,

+,,Fahad Guirguis,Lead,,Cavages,FahadSaidGuirguis@gustr.com,,,,,,,,,,,,,,,,,,

+,,Morten Olsen,Lead,,Gallenkamp,MortenJOlsen@armyspy.com,,,,,,,,,,,,,,,,,,

+,,Christian Baecker,Lead,,Webcom Business Services,ChristianBaecker@armyspy.com,,,,,,,,,,,,,,,,,,

+,,Sebastianus Dohmen,Lead,,Accord Investments,SebastianusDohmen@cuvox.de,,,,,,,,,,,,,,,,,,

+,,Eero Koskinen,Lead,,American Appliance,EeroKoskinen@superrito.com,,,,,,,,,,,,,,,,,,

+,,富奎 盧,Lead,,Bettendorf's,LuFuKui@teleworm.us,,,,,,,,,,,,,,,,,,

+,,Milica Jelić,Lead,,House Of Denmark,MilicaJelic@dayrep.com,,,,,,,,,,,,,,,,,,

+,,Barbora Holubová,Lead,,10000 Auto Parts,BarboraHolubova@cuvox.de,,,,,,,,,,,,,,,,,,

+,,Marta Kos,Lead,,Mages,MartaKos@einrot.com,,,,,,,,,,,,,,,,,,

+,,Simret Zula,Lead,,CSK Auto,SimretZula@cuvox.de,,,,,,,,,,,,,,,,,,

+,,Kamil Chlubna,Lead,,Eagle Hardware & Garden,KamilChlubna@einrot.com,,,,,,,,,,,,,,,,,,

+,,Aceline Bolduc,Lead,,Rustler Steak House,AcelineBolduc@armyspy.com,,,,,,,,,,,,,,,,,,

+,,Lucie Stupková,Lead,,ABCO Foods,LucieStupkova@gustr.com,,,,,,,,,,,,,,,,,,

+,,Roland Solvik,Lead,,Trak Auto,RolandSolvik@cuvox.de,,,,,,,,,,,,,,,,,,

+,,Mekirinzukushitakufu ,Lead,,Choices,Mekirinzukushitakufu@teleworm.us,,,,,,,,,,,,,,,,,,

+,,Mukharbek Sultanovich,Lead,,Megatronic,MukharbekSultanovich@cuvox.de,,,,,,,,,,,,,,,,,,

+,,Osman Amanuel,Lead,,Handy Dan,OsmanAmanuel@dayrep.com,,,,,,,,,,,,,,,,,,

+,,幸子 阪部,Lead,,Channel Home Centers,dd@armyspy.com,,,,,,,,,,,,,,,,,,

+,,Masakazu Kamitani,Lead,,Honest Air Group,MasakazuKamitani@superrito.com,,,,,,,,,,,,,,,,,,

+,,Omran Sabbagh,Lead,,Pleasures and Pasttimes,OmranNuhaidSabbagh@einrot.com,,,,,,,,,,,,,,,,,,

+,,Rikako Matsumura,Lead,,Lazysize,RikakoMatsumura@einrot.com,,,,,,,,,,,,,,,,,,

+,,Anayolisa Chukwukadibia,Lead,,Prestiga-Biz,AnayolisaChukwukadibia@einrot.com,,,,,,,,,,,,,,,,,,

+,,Gudmunda Hinna,Lead,,Childs Restaurants,GudmundaHinna@armyspy.com,,,,,,,,,,,,,,,,,,
\ No newline at end of file
diff --git a/utilities/demo/demo_docs/Profile.csv b/utilities/demo/demo_docs/Profile.csv
index 2e7a2ce..eb456c1 100644
--- a/utilities/demo/demo_docs/Profile.csv
+++ b/utilities/demo/demo_docs/Profile.csv
@@ -1,40 +1,40 @@
-Data Import Template,,,,,,,,,,,,,,,,,,,,,

-Table:,Profile,,,,,,,,,,,,,,,,,,,,

-,,,,,,,,,,,,,,,,,,,,,

-,,,,,,,,,,,,,,,,,,,,,

-Notes:,,,,,,,,,,,,,,,,,,,,,

-Please do not change the template headings.,,,,,,,,,,,,,,,,,,,,,

-First data column must be blank.,,,,,,,,,,,,,,,,,,,,,

-"If you are uploading new records, leave the ""name"" (ID) column blank.",,,,,,,,,,,,,,,,,,,,,

-"If you are uploading new records, ""Naming Series"" becomes mandatory, if present.",,,,,,,,,,,,,,,,,,,,,

-Only mandatory fields are necessary for new records. You can delete non-mandatory columns if you wish.,,,,,,,,,,,,,,,,,,,,,

-"For updating, you can update only selective columns.",,,,,,,,,,,,,,,,,,,,,

-You can only upload upto 5000 records in one go. (may be less in some cases),,,,,,,,,,,,,,,,,,,,,

-,,,,,,,,,,,,,,,,,,,,,

-DocType:,Profile,,,,,,,,,,,,,,,,,,,,

-Column Labels:,ID,Email,First Name,User Type,Enabled,Middle Name (Optional),Last Name,Send Invite Email,Language,Birth Date,Gender,New Password,User Image,Background Image,Bio,Email Signature,Login After,Login Before,Restrict IP,Last Login,Last IP

-Column Name:,name,email,first_name,user_type,enabled,middle_name,last_name,send_invite_email,language,birth_date,gender,new_password,user_image,background_image,bio,email_signature,login_after,login_before,restrict_ip,last_login,last_ip

-Mandatory:,Yes,Yes,Yes,Yes,No,No,No,No,No,No,No,No,No,No,No,No,No,No,No,No,No

-Type:,Data (text),Data,Data,Select,Check,Data,Data,Check,Select,Date,Select,Password,Select,Select,Small Text,Small Text,Int,Int,Data,Read Only,Read Only

-Info:,,,,"One of: System User, Website User",0 or 1,,,0 or 1,"One of: العربية, Deutsch, english, español, français, हिंदी, Hrvatski, nederlands, português, português brasileiro, српски, தமிழ், ไทย",,"One of: Male, Female, Other",,One of: attach_files:,One of: attach_files:,,,Integer,Integer,,,

-Start entering data below this line,,,,,,,,,,,,,,,,,,,,,

-,,DikmanShervashidze@armyspy.com,Dikman,System User,1,V,Shervashidze,0,,,,testpass,,,,,,,,,

-,,Zukutakitoteka@teleworm.us,Zukutakitoteka,System User,1,,,0,,,,testpass,,,,,,,,,

-,,HatsueKashiwagi@cuvox.de,Hatsue,System User,1,H,Kashiwagi,0,,,,testpass,,,,,,,,,

-,,NuranVerkleij@einrot.com,Nuran,System User,1,T,Verkleij,0,,,,testpass,,,,,,,,,

-,,aromn@armyspy.com,Дмитрий,System User,1,З,Пирогов,0,,,,testpass,,,,,,,,,

-,,TildeLindqvist@cuvox.de,Tilde,System User,1,T,Lindqvist,0,,,,testpass,,,,,,,,,

-,,MichalSobczak@teleworm.us,Michał,System User,1,S,Sobczak,0,,,,testpass,,,,,,,,,

-,,GabrielleLoftus@superrito.com,Gabrielle,System User,1,J,Loftus,0,,,,testpass,,,,,,,,,

-,,VakhitaRyzaev@teleworm.us,Vakhita,System User,1,A,Ryzaev,0,,,,testpass,,,,,,,,,

-,,CharmaineGaudreau@cuvox.de,Charmaine,System User,1,D,Gaudreau,0,,,,testpass,,,,,,,,,

-,,RafaelaMaartens@cuvox.de,Rafaëla,System User,1,Z,Maartens,0,,,,testpass,,,,,,,,,

-,,NuguseYohannes@dayrep.com,Nuguse,System User,0,S,Yohannes,0,,,,testpass,,,,,,,,,

-,,panca@armyspy.com,Раиса,System User,0,В,Белякова,0,,,,testpass,,,,,,,,,

-,,CaYinLong@gustr.com,胤隆,System User,1,婷,蔡,0,,,,testpass,,,,,,,,,

-,,FreddieScott@armyspy.com,Freddie,System User,1,A,Scott,0,,,,testpass,,,,,,,,,

-,,BergoraVigfusdottir@superrito.com,Bergþóra,System User,1,Ö,Vigfúsdóttir,0,,,,testpass,,,,,,,,,

-,,WardNajmalDinKalb@cuvox.de,Ward,System User,1,N,Kalb,0,,,,testpass,,,,,,,,,

-,,WanMai@teleworm.us,Wan,System User,1,A,Mai,0,,,,testpass,,,,,,,,,

-,,LeonAbdulov@superrito.com,Leon,System User,1,A,Abdulov,0,,,,testpass,,,,,,,,,

-,,SabinaNovotna@superrito.com,Sabina,System User,1,J,Novotná,0,,,,testpass,,,,,,,,,
\ No newline at end of file
+Data Import Template,,,,,,,,,,,,,,,,,,,,
+Table:,Profile,,,,,,,,,,,,,,,,,,,
+,,,,,,,,,,,,,,,,,,,,
+,,,,,,,,,,,,,,,,,,,,
+Notes:,,,,,,,,,,,,,,,,,,,,
+Please do not change the template headings.,,,,,,,,,,,,,,,,,,,,
+First data column must be blank.,,,,,,,,,,,,,,,,,,,,
+"If you are uploading new records, leave the ""name"" (ID) column blank.",,,,,,,,,,,,,,,,,,,,
+"If you are uploading new records, ""Naming Series"" becomes mandatory, if present.",,,,,,,,,,,,,,,,,,,,
+Only mandatory fields are necessary for new records. You can delete non-mandatory columns if you wish.,,,,,,,,,,,,,,,,,,,,
+"For updating, you can update only selective columns.",,,,,,,,,,,,,,,,,,,,
+You can only upload upto 5000 records in one go. (may be less in some cases),,,,,,,,,,,,,,,,,,,,
+,,,,,,,,,,,,,,,,,,,,
+DocType:,Profile,,,,,,,,,,,,,,,,,,,
+Column Labels:,ID,Email,First Name,User Type,Enabled,Middle Name (Optional),Last Name,Language,Birth Date,Gender,New Password,User Image,Background Image,Bio,Email Signature,Login After,Login Before,Restrict IP,Last Login,Last IP
+Column Name:,name,email,first_name,user_type,enabled,middle_name,last_name,language,birth_date,gender,new_password,user_image,background_image,bio,email_signature,login_after,login_before,restrict_ip,last_login,last_ip
+Mandatory:,Yes,Yes,Yes,Yes,No,No,No,No,No,No,No,No,No,No,No,No,No,No,No,No
+Type:,Data (text),Data,Data,Select,Check,Data,Data,Select,Date,Select,Password,Select,Select,Small Text,Small Text,Int,Int,Data,Read Only,Read Only
+Info:,,,,"One of: System User, Website User",0 or 1,,,"One of: العربية, Deutsch, english, español, français, हिंदी, Hrvatski, nederlands, português, português brasileiro, српски, தமிழ், ไทย",,"One of: Male, Female, Other",,One of: attach_files:,One of: attach_files:,,,Integer,Integer,,,
+Start entering data below this line,,,,,,,,,,,,,,,,,,,,
+,,DikmanShervashidze@armyspy.com,Dikman,System User,1,V,Shervashidze,,,,testpass,,,,,,,,,
+,,Zukutakitoteka@teleworm.us,Zukutakitoteka,System User,1,,,,,,testpass,,,,,,,,,
+,,HatsueKashiwagi@cuvox.de,Hatsue,System User,1,H,Kashiwagi,,,,testpass,,,,,,,,,
+,,NuranVerkleij@einrot.com,Nuran,System User,1,T,Verkleij,,,,testpass,,,,,,,,,
+,,aromn@armyspy.com,Дмитрий,System User,1,З,Пирогов,,,,testpass,,,,,,,,,
+,,TildeLindqvist@cuvox.de,Tilde,System User,1,T,Lindqvist,,,,testpass,,,,,,,,,
+,,MichalSobczak@teleworm.us,Michał,System User,1,S,Sobczak,,,,testpass,,,,,,,,,
+,,GabrielleLoftus@superrito.com,Gabrielle,System User,1,J,Loftus,,,,testpass,,,,,,,,,
+,,VakhitaRyzaev@teleworm.us,Vakhita,System User,1,A,Ryzaev,,,,testpass,,,,,,,,,
+,,CharmaineGaudreau@cuvox.de,Charmaine,System User,1,D,Gaudreau,,,,testpass,,,,,,,,,
+,,RafaelaMaartens@cuvox.de,Rafaëla,System User,1,Z,Maartens,,,,testpass,,,,,,,,,
+,,NuguseYohannes@dayrep.com,Nuguse,System User,0,S,Yohannes,,,,testpass,,,,,,,,,
+,,panca@armyspy.com,Раиса,System User,0,В,Белякова,,,,testpass,,,,,,,,,
+,,CaYinLong@gustr.com,胤隆,System User,1,婷,蔡,,,,testpass,,,,,,,,,
+,,FreddieScott@armyspy.com,Freddie,System User,1,A,Scott,,,,testpass,,,,,,,,,
+,,BergoraVigfusdottir@superrito.com,Bergþóra,System User,1,Ö,Vigfúsdóttir,,,,testpass,,,,,,,,,
+,,WardNajmalDinKalb@cuvox.de,Ward,System User,1,N,Kalb,,,,testpass,,,,,,,,,
+,,WanMai@teleworm.us,Wan,System User,1,A,Mai,,,,testpass,,,,,,,,,
+,,LeonAbdulov@superrito.com,Leon,System User,1,A,Abdulov,,,,testpass,,,,,,,,,
+,,SabinaNovotna@superrito.com,Sabina,System User,1,J,Novotná,,,,testpass,,,,,,,,,
diff --git a/utilities/demo/make_demo.py b/utilities/demo/make_demo.py
index ea0fca6..2605fe3 100644
--- a/utilities/demo/make_demo.py
+++ b/utilities/demo/make_demo.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 # License: GNU General Public License v3. See license.txt
 
 import webnotes, os, datetime
@@ -18,7 +18,7 @@
 company_abbr = "WP"
 country = "United States"
 currency = "USD"
-time_zone = "America/New York"
+time_zone = "America/New_York"
 start_date = '2013-01-01'
 bank_name = "Citibank"
 runs_for = None
@@ -30,17 +30,27 @@
 }
 
 def make(reset=False, simulate=True):
-	#webnotes.print_messages = True
-	webnotes.mute_emails = True
-	webnotes.rollback_on_exception = True
+	#webnotes.flags.print_messages = True
+	webnotes.flags.mute_emails = True
+	webnotes.flags.rollback_on_exception = True
+	
+	if not webnotes.conf.demo_db_name:
+		raise Exception("conf.py does not have demo_db_name")
 	
 	if reset:
 		setup()
+	else:
+		if webnotes.conn:
+			webnotes.conn.close()
+		
+		webnotes.connect(db_name=webnotes.conf.demo_db_name)
+	
 	if simulate:
 		_simulate()
-	
+		
 def setup():
 	install()
+	webnotes.connect(db_name=webnotes.conf.demo_db_name)
 	complete_setup()
 	make_customers_suppliers_contacts()
 	make_items()
@@ -65,7 +75,7 @@
 	
 	for i in xrange(runs_for):		
 		print current_date.strftime("%Y-%m-%d")
-		webnotes.utils.current_date = current_date
+		webnotes.local.current_date = current_date
 		
 		if current_date.weekday() in (5, 6):
 			current_date = webnotes.utils.add_days(current_date, 1)
@@ -138,14 +148,17 @@
 	# make purchase requests
 	if can_make("Purchase Receipt"):
 		from buying.doctype.purchase_order.purchase_order import make_purchase_receipt
+		from stock.stock_ledger import NegativeStockError
 		report = "Purchase Order Items To Be Received"
 		for po in list(set([r[0] for r in query_report.run(report)["result"] if r[0]!="Total"]))[:how_many("Purchase Receipt")]:
 			pr = webnotes.bean(make_purchase_receipt(po))
 			pr.doc.posting_date = current_date
 			pr.doc.fiscal_year = "2013"
 			pr.insert()
-			pr.submit()
-			webnotes.conn.commit()
+			try:
+				pr.submit()
+				webnotes.conn.commit()
+			except NegativeStockError: pass
 	
 	# make delivery notes (if possible)
 	if can_make("Delivery Note"):
@@ -357,13 +370,14 @@
 def install():
 	print "Creating Fresh Database..."
 	from webnotes.install_lib.install import Installer
-	import conf
+	from webnotes import conf
 	inst = Installer('root')
-	inst.import_from_db(conf.demo_db_name, verbose = 1)
+	inst.install(conf.demo_db_name, verbose=1, force=1)
 
 def complete_setup():
 	print "Complete Setup..."
-	webnotes.get_obj("Setup Control").setup_account({
+	from setup.page.setup_wizard.setup_wizard import setup_account
+	setup_account({
 		"first_name": "Test",
 		"last_name": "User",
 		"fy_start": "1st Jan",
@@ -412,7 +426,7 @@
 	
 	for doctype in dt:
 		print "Importing", doctype.replace("_", " "), "..."
-		webnotes.form_dict = webnotes._dict()
+		webnotes.local.form_dict = webnotes._dict()
 		if submit:
 			webnotes.form_dict["params"] = json.dumps({"_submit": 1})
 		webnotes.uploaded_file = os.path.join(os.path.dirname(__file__), "demo_docs", doctype+".csv")
diff --git a/utilities/demo/make_erpnext_demo.py b/utilities/demo/make_erpnext_demo.py
index 766da26..a094239 100644
--- a/utilities/demo/make_erpnext_demo.py
+++ b/utilities/demo/make_erpnext_demo.py
@@ -5,17 +5,21 @@
 import webnotes, os
 import utilities.demo.make_demo
 
-def make_demo_app():
-	webnotes.mute_emails = 1
-	webnotes.connect()
+def make_demo_app(site=None):
+	webnotes.init(site=site)
+	webnotes.flags.mute_emails = 1
+
 	utilities.demo.make_demo.make(reset=True, simulate=False)
 	# setup demo user etc so that the site it up faster, while the data loads
 	make_demo_user()
 	make_demo_login_page()
 	make_demo_on_login_script()
 	utilities.demo.make_demo.make(reset=False, simulate=True)
+	webnotes.destroy()
 
 def make_demo_user():
+	from webnotes.auth import _update_password
+	
 	roles = ["Accounts Manager", "Analytics", "Expense Approver", "Accounts User", 
 		"Leave Approver", "Blogger", "Customer", "Sales Manager", "Employee", "Support Manager", 
 		"HR Manager", "HR User", "Maintenance Manager", "Maintenance User", "Material Manager", 
@@ -42,11 +46,10 @@
 	p.doc.last_name = "User"
 	p.doc.enabled = 1
 	p.doc.user_type = "ERPNext Demo"
-	p.doc.send_invite_email = 0
-	p.doc.new_password = "demo"
 	p.insert()
 	add_roles(p)
 	p.save()
+	_update_password("demo@erpnext.com", "demo")
 	
 	# make system manager user
 	if webnotes.conn.exists("Profile", "admin@erpnext.com"):
@@ -58,12 +61,11 @@
 	p.doc.last_name = "User"
 	p.doc.enabled = 1
 	p.doc.user_type = "System User"
-	p.doc.send_invite_email = 0
-	p.doc.new_password = "admin010123"
 	p.insert()
 	roles.append("System Manager")
 	add_roles(p)
 	p.save()
+	_update_password("admin@erpnext.com", "admin010123")
 	
 	# only read for newsletter
 	webnotes.conn.sql("""update `tabDocPerm` set `write`=0, `create`=0, `cancel`=0
@@ -103,13 +105,12 @@
 	webnotes.conn.commit()
 
 def make_demo_on_login_script():
-	webnotes.conn.sql("""delete from `tabCustom Script` where dt='Control Panel'""")
-	s = webnotes.new_bean("Custom Script")
-	s.doc.dt = "Control Panel"
-	s.doc.script_type = "Server"
-	with open(os.path.join(os.path.dirname(__file__), "demo_control_panel.py"), "r") as dfile:
-		s.doc.script = dfile.read()
-	s.insert()
+	import shutil
+	import webnotes.plugins
+	custom_script_path = webnotes.plugins.get_path("Core", "DocType", "Control Panel")
+	webnotes.create_folder(os.path.dirname(custom_script_path))
+	
+	shutil.copyfile(os.path.join(os.path.dirname(__file__), "demo_control_panel.py"), custom_script_path)
 	
 	cp = webnotes.bean("Control Panel")
 	cp.doc.custom_startup_code = """wn.ui.toolbar.show_banner('You are using ERPNext Demo. To start your own ERPNext Trial, <a href="https://erpnext.com/pricing-and-signup" target="_blank">click here</a>')"""
@@ -118,4 +119,6 @@
 	webnotes.conn.commit()
 
 if __name__=="__main__":
-	make_demo_app()
\ No newline at end of file
+	import sys
+	site = sys.argv[1:]
+	make_demo_app(site=site and site[0] or None)
diff --git a/utilities/doctype/address/address.js b/utilities/doctype/address/address.js
index d4ed3fb..aa608ba 100644
--- a/utilities/doctype/address/address.js
+++ b/utilities/doctype/address/address.js
@@ -1,4 +1,4 @@
-// Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+// Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 // License: GNU General Public License v3. See license.txt
 
 wn.require('app/controllers/js/contact_address_common.js');
\ No newline at end of file
diff --git a/utilities/doctype/address/address.py b/utilities/doctype/address/address.py
index 69e81b8..ad6e049 100644
--- a/utilities/doctype/address/address.py
+++ b/utilities/doctype/address/address.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 # License: GNU General Public License v3. See license.txt
 
 from __future__ import unicode_literals
diff --git a/utilities/doctype/address/templates/pages/address.py b/utilities/doctype/address/templates/pages/address.py
index d968c92..9918e5f 100644
--- a/utilities/doctype/address/templates/pages/address.py
+++ b/utilities/doctype/address/templates/pages/address.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 # License: GNU General Public License v3. See license.txt
 
 from __future__ import unicode_literals
diff --git a/utilities/doctype/address/templates/pages/addresses.py b/utilities/doctype/address/templates/pages/addresses.py
index 24b474a..41f6b56 100644
--- a/utilities/doctype/address/templates/pages/addresses.py
+++ b/utilities/doctype/address/templates/pages/addresses.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 # License: GNU General Public License v3. See license.txt
 
 from __future__ import unicode_literals
diff --git a/utilities/doctype/address/test_address.py b/utilities/doctype/address/test_address.py
index 1de733f..befbe82 100644
--- a/utilities/doctype/address/test_address.py
+++ b/utilities/doctype/address/test_address.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 # License: GNU General Public License v3. See license.txt
 
 test_records = [
diff --git a/utilities/doctype/contact/contact.js b/utilities/doctype/contact/contact.js
index 3b5255c..81d35dd 100644
--- a/utilities/doctype/contact/contact.js
+++ b/utilities/doctype/contact/contact.js
@@ -1,4 +1,4 @@
-// Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+// Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 // License: GNU General Public License v3. See license.txt
 
 wn.require('app/controllers/js/contact_address_common.js');
diff --git a/utilities/doctype/contact/contact.py b/utilities/doctype/contact/contact.py
index 84c8a59..16f9d32 100644
--- a/utilities/doctype/contact/contact.py
+++ b/utilities/doctype/contact/contact.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 # License: GNU General Public License v3. See license.txt
 
 from __future__ import unicode_literals
@@ -12,14 +12,6 @@
 		self.doc = doc
 		self.doclist = doclist
 
-	def on_communication(self, comm):
-		if webnotes.conn.get_value("Profile", extract_email_id(comm.sender), "user_type")=="System User":
-			status = "Replied"
-		else:
-			status = "Open"
-			
-		webnotes.conn.set(self.doc, 'status', status)
-
 	def autoname(self):
 		# concat first and last name
 		self.doc.name = " ".join(filter(None, 
@@ -32,28 +24,28 @@
 				break
 		
 	def validate(self):
+		self.set_status()
 		self.validate_primary_contact()
 
 	def validate_primary_contact(self):
-		sql = webnotes.conn.sql
 		if self.doc.is_primary_contact == 1:
 			if self.doc.customer:
-				sql("update tabContact set is_primary_contact=0 where customer = '%s'" % (self.doc.customer))
+				webnotes.conn.sql("update tabContact set is_primary_contact=0 where customer = '%s'" % (self.doc.customer))
 			elif self.doc.supplier:
-				sql("update tabContact set is_primary_contact=0 where supplier = '%s'" % (self.doc.supplier))	
+				webnotes.conn.sql("update tabContact set is_primary_contact=0 where supplier = '%s'" % (self.doc.supplier))	
 			elif self.doc.sales_partner:
-				sql("update tabContact set is_primary_contact=0 where sales_partner = '%s'" % (self.doc.sales_partner))
+				webnotes.conn.sql("update tabContact set is_primary_contact=0 where sales_partner = '%s'" % (self.doc.sales_partner))
 		else:
 			if self.doc.customer:
-				if not sql("select name from tabContact where is_primary_contact=1 and customer = '%s'" % (self.doc.customer)):
+				if not webnotes.conn.sql("select name from tabContact where is_primary_contact=1 and customer = '%s'" % (self.doc.customer)):
 					self.doc.is_primary_contact = 1
 			elif self.doc.supplier:
-				if not sql("select name from tabContact where is_primary_contact=1 and supplier = '%s'" % (self.doc.supplier)):
+				if not webnotes.conn.sql("select name from tabContact where is_primary_contact=1 and supplier = '%s'" % (self.doc.supplier)):
 					self.doc.is_primary_contact = 1
 			elif self.doc.sales_partner:
-				if not sql("select name from tabContact where is_primary_contact=1 and sales_partner = '%s'" % (self.doc.sales_partner)):
+				if not webnotes.conn.sql("select name from tabContact where is_primary_contact=1 and sales_partner = '%s'" % (self.doc.sales_partner)):
 					self.doc.is_primary_contact = 1
 
 	def on_trash(self):
 		webnotes.conn.sql("""update `tabSupport Ticket` set contact='' where contact=%s""",
-			self.doc.name)
\ No newline at end of file
+			self.doc.name)
diff --git a/utilities/doctype/contact/contact.txt b/utilities/doctype/contact/contact.txt
index 92dcf2e..199aaea 100644
--- a/utilities/doctype/contact/contact.txt
+++ b/utilities/doctype/contact/contact.txt
@@ -2,7 +2,7 @@
  {
   "creation": "2013-01-10 16:34:32", 
   "docstatus": 0, 
-  "modified": "2013-09-10 10:50:27", 
+  "modified": "2013-10-08 16:48:50", 
   "modified_by": "Administrator", 
   "owner": "Administrator"
  }, 
@@ -70,11 +70,12 @@
   "fieldtype": "Column Break"
  }, 
  {
+  "default": "Passive", 
   "doctype": "DocField", 
   "fieldname": "status", 
   "fieldtype": "Select", 
   "label": "Status", 
-  "options": "\nOpen\nReplied"
+  "options": "Passive\nOpen\nReplied"
  }, 
  {
   "doctype": "DocField", 
@@ -84,7 +85,7 @@
   "label": "Email Id", 
   "oldfieldname": "email_id", 
   "oldfieldtype": "Data", 
-  "reqd": 1, 
+  "reqd": 0, 
   "search_index": 1
  }, 
  {
@@ -94,7 +95,7 @@
   "label": "Phone", 
   "oldfieldname": "contact_no", 
   "oldfieldtype": "Data", 
-  "reqd": 1
+  "reqd": 0
  }, 
  {
   "doctype": "DocField", 
diff --git a/utilities/doctype/contact/test_contact.py b/utilities/doctype/contact/test_contact.py
index 376d3ad..5e7898f 100644
--- a/utilities/doctype/contact/test_contact.py
+++ b/utilities/doctype/contact/test_contact.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 # License: GNU General Public License v3. See license.txt
 
 test_records = [
diff --git a/utilities/doctype/note/note.py b/utilities/doctype/note/note.py
index befb4c4..0ae23a2 100644
--- a/utilities/doctype/note/note.py
+++ b/utilities/doctype/note/note.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 # License: GNU General Public License v3. See license.txt
 
 # For license information, please see license.txt
diff --git a/utilities/doctype/note_user/note_user.py b/utilities/doctype/note_user/note_user.py
index 784339d..e5468e5 100644
--- a/utilities/doctype/note_user/note_user.py
+++ b/utilities/doctype/note_user/note_user.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 # License: GNU General Public License v3. See license.txt
 
 # For license information, please see license.txt
diff --git a/utilities/doctype/rename_tool/rename_tool.js b/utilities/doctype/rename_tool/rename_tool.js
index 0dc81a5..c075656 100644
--- a/utilities/doctype/rename_tool/rename_tool.js
+++ b/utilities/doctype/rename_tool/rename_tool.js
@@ -1,4 +1,4 @@
-// Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+// Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 // License: GNU General Public License v3. See license.txt
 
 cur_frm.cscript.refresh = function(doc) {
diff --git a/utilities/doctype/rename_tool/rename_tool.py b/utilities/doctype/rename_tool/rename_tool.py
index 5ccec9a..f38b8d1 100644
--- a/utilities/doctype/rename_tool/rename_tool.py
+++ b/utilities/doctype/rename_tool/rename_tool.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 # License: GNU General Public License v3. See license.txt
 
 # For license information, please see license.txt
diff --git a/utilities/doctype/sms_control/sms_control.js b/utilities/doctype/sms_control/sms_control.js
index 2780ad4..42025bf 100644
--- a/utilities/doctype/sms_control/sms_control.js
+++ b/utilities/doctype/sms_control/sms_control.js
@@ -1,4 +1,4 @@
-// Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+// Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 // License: GNU General Public License v3. See license.txt
 
 function SMSManager() {
diff --git a/utilities/doctype/sms_control/sms_control.py b/utilities/doctype/sms_control/sms_control.py
index 9c2319f..5a9777a 100644
--- a/utilities/doctype/sms_control/sms_control.py
+++ b/utilities/doctype/sms_control/sms_control.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 # License: GNU General Public License v3. See license.txt
 
 from __future__ import unicode_literals
@@ -10,8 +10,6 @@
 from webnotes import msgprint
 from webnotes.model.bean import getlist, copy_doclist
 
-sql = webnotes.conn.sql
-	
 class DocType:
 	def __init__(self, doc, doclist=[]):
 		self.doc = doc
@@ -50,7 +48,7 @@
 	def get_contact_number(self, arg):
 		"returns mobile number of the contact"
 		args = load_json(arg)
-		number = sql("""select mobile_no, phone from tabContact where name=%s and %s=%s""" % 
+		number = webnotes.conn.sql("""select mobile_no, phone from tabContact where name=%s and %s=%s""" % 
 			('%s', args['key'], '%s'), (args['contact_name'], args['value']))
 		return number and (number[0][0] or number[0][1]) or ''
 	
@@ -119,4 +117,4 @@
 		sl.message = arg['message']
 		sl.no_of_requested_sms = len(arg['receiver_list'])
 		sl.no_of_sent_sms = sent_sms
-		sl.save(new=1)
\ No newline at end of file
+		sl.save(new=1)
diff --git a/utilities/doctype/sms_log/sms_log.py b/utilities/doctype/sms_log/sms_log.py
index 26d0f76..cb6190f 100644
--- a/utilities/doctype/sms_log/sms_log.py
+++ b/utilities/doctype/sms_log/sms_log.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 # License: GNU General Public License v3. See license.txt
 
 from __future__ import unicode_literals
diff --git a/utilities/repost_stock.py b/utilities/repost_stock.py
index a3a5d28..48ff25f 100644
--- a/utilities/repost_stock.py
+++ b/utilities/repost_stock.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 # License: GNU General Public License v3. See license.txt
 
 from __future__ import unicode_literals
@@ -65,7 +65,7 @@
 				from 
 				(
 					select qty, parent_detail_docname, parent, name
-					from `tabDelivery Note Packing Item` dnpi_in
+					from `tabPacked Item` dnpi_in
 					where item_code = %s and warehouse = %s
 					and parenttype="Sales Order"
 				and item_code != parent_item
diff --git a/utilities/transaction_base.py b/utilities/transaction_base.py
index 684da46..5c28d8d 100644
--- a/utilities/transaction_base.py
+++ b/utilities/transaction_base.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 # License: GNU General Public License v3. See license.txt
 
 from __future__ import unicode_literals
@@ -120,6 +120,8 @@
 		out["supplier_name"] = supplier.supplier_name
 		if supplier.default_currency:
 			out["currency"] = supplier.default_currency
+		if supplier.default_price_list:
+			out["buying_price_list"] = supplier.default_price_list
 		
 		return out