Merge branch 'master' into production

Conflicts:
	patches/patch_list.py
	production/doctype/bom_explosion_item/bom_explosion_item.txt
diff --git a/accounts/doctype/account/account.py b/accounts/doctype/account/account.py
index 3f7a181..042cd5a 100644
--- a/accounts/doctype/account/account.py
+++ b/accounts/doctype/account/account.py
@@ -34,22 +34,21 @@
 		company_abbr = sql("select abbr from tabCompany where name=%s", self.doc.company)[0][0]
 		self.doc.name = self.doc.account_name.strip() + ' - ' + company_abbr
 
-	# Get customer/supplier address
 	def get_address(self):		
-		add=sql("Select address from `tab%s` where name='%s'"%(self.doc.master_type,self.doc.master_name))
-		ret={'address':add[0][0]}
-		return ret
-
-	# check whether master name entered for supplier/customer
+		add=sql("Select address from `tab%s` where name='%s'" % 
+			(self.doc.master_type, self.doc.master_name))
+		return {'address': add[0][0]}
+		
 	def validate_master_name(self):
-		if (self.doc.master_type == 'Customer' or self.doc.master_type == 'Supplier') and not self.doc.master_name:
+		if (self.doc.master_type == 'Customer' or self.doc.master_type == 'Supplier') \
+				and not self.doc.master_name:
 			msgprint("Message: Please enter Master Name once the account is created.")
-
 			
-	# Fetch Parent Details and validation for account not to be created under ledger
 	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 from tabAccount where name =%s",self.doc.parent_account)
+			par = 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)
 			elif par and par[0][0] == self.doc.name:
@@ -57,7 +56,8 @@
 			elif par and par[0][1] != 'Group':
 				msgprint("Parent account can not be a ledger", raise_exception=1)
 			elif par and self.doc.debit_or_credit and par[0][3] != self.doc.debit_or_credit:
-				msgprint("You can not move a %s account under %s account" % (self.doc.debit_or_credit, par[0][3]), raise_exception=1)
+				msgprint("You can not move a %s account under %s account" % 
+					(self.doc.debit_or_credit, par[0][3]), raise_exception=1)
 			elif par and not self.doc.is_pl_account:
 				self.doc.is_pl_account = par[0][2]
 				self.doc.debit_or_credit = par[0][3]
@@ -69,9 +69,10 @@
 			webnotes.msgprint("One company cannot have more than 4 root Accounts",
 				raise_exception=1)
 	
-	# Account name must be unique
 	def validate_duplicate_account(self):
-		if (self.doc.fields.get('__islocal') or (not self.doc.name)) and sql("select name from tabAccount where account_name=%s and company=%s", (self.doc.account_name, self.doc.company)):
+		if (self.doc.fields.get('__islocal') or not self.doc.name) and \
+				sql("""select name from tabAccount where account_name=%s and company=%s""", 
+					(self.doc.account_name, self.doc.company)):
 			msgprint("Account Name: %s already exists, please rename" 
 				% self.doc.account_name, raise_exception=1)
 				
@@ -83,9 +84,11 @@
 			
 	def convert_group_to_ledger(self):
 		if self.check_if_child_exists():
-			msgprint("Account: %s has existing child. You can not convert this account to ledger" % (self.doc.name), raise_exception=1)
+			msgprint("Account: %s has existing child. You can not convert this account to ledger" % 
+				(self.doc.name), raise_exception=1)
 		elif self.check_gle_exists():
-			msgprint("Account with existing transaction can not be converted to ledger.", raise_exception=1)
+			msgprint("Account with existing transaction can not be converted to ledger.", 
+				raise_exception=1)
 		else:
 			self.doc.group_or_ledger = 'Ledger'
 			self.doc.save()
@@ -105,11 +108,13 @@
 
 	# Check if any previous balance exists
 	def check_gle_exists(self):
-		exists = sql("select name from `tabGL Entry` where account = '%s' and ifnull(is_cancelled, 'No') = 'No'" % (self.doc.name))
+		exists = sql("""select name from `tabGL Entry` where account = '%s' 
+			and ifnull(is_cancelled, 'No') = 'No'""" % (self.doc.name))
 		return exists and exists[0][0] or ''
 
 	def check_if_child_exists(self):
-		return sql("select name from `tabAccount` where parent_account = %s and docstatus != 2", self.doc.name)
+		return sql("""select name from `tabAccount` where parent_account = %s 
+			and docstatus != 2""", self.doc.name)
 	
 	def validate_mandatory(self):
 		if not self.doc.debit_or_credit:
@@ -124,61 +129,63 @@
 		self.validate_root_details()
 		self.validate_mandatory()
 	
-		# Defaults
 		if not self.doc.parent_account:
 			self.doc.parent_account = ''
 
-	# Update Node Set Model
 	def update_nsm_model(self):
 		import webnotes
 		import webnotes.utils.nestedset
 		webnotes.utils.nestedset.update_nsm(self)
 			
 	def on_update(self):
-		# update nsm
 		self.validate_max_root_accounts()
 		self.update_nsm_model()		
 
-	# Check user role for approval process
 	def get_authorized_user(self):
 		# Check logged-in user is authorized
-		if webnotes.conn.get_value('Global Defaults', None, 'credit_controller') in webnotes.user.get_roles():
+		if webnotes.conn.get_value('Global Defaults', None, 'credit_controller') \
+				in webnotes.user.get_roles():
 			return 1
 			
-	# Check Credit limit for customer
 	def check_credit_limit(self, account, company, tot_outstanding):
 		# Get credit limit
 		credit_limit_from = 'Customer'
 
-		cr_limit = sql("select t1.credit_limit from tabCustomer t1, `tabAccount` t2 where t2.name='%s' and t1.name = t2.master_name" % account)
+		cr_limit = sql("""select t1.credit_limit from tabCustomer t1, `tabAccount` t2 
+			where t2.name='%s' and t1.name = t2.master_name""" % account)
 		credit_limit = cr_limit and flt(cr_limit[0][0]) or 0
 		if not credit_limit:
 			credit_limit = webnotes.conn.get_value('Company', company, 'credit_limit')
 			credit_limit_from = 'global settings in the Company'
 		
 		# If outstanding greater than credit limit and not authorized person raise exception
-		if credit_limit > 0 and flt(tot_outstanding) > credit_limit and not self.get_authorized_user():
-			msgprint("Total Outstanding amount (%s) for <b>%s</b> can not be greater than credit limit (%s). To change your credit limit settings, please update the <b>%s</b>" \
-				% (fmt_money(tot_outstanding), account, fmt_money(credit_limit), credit_limit_from), raise_exception=1)
+		if credit_limit > 0 and flt(tot_outstanding) > credit_limit \
+				and not self.get_authorized_user():
+			msgprint("""Total Outstanding amount (%s) for <b>%s</b> can not be \
+				greater than credit limit (%s). To change your credit limit settings, \
+				please update the <b>%s</b>""" % (fmt_money(tot_outstanding), 
+				account, fmt_money(credit_limit), credit_limit_from), raise_exception=1)
 			
 	def validate_trash(self):
 		"""checks gl entries and if child exists"""
+		if not self.doc.parent_account:
+			msgprint("Root account can not be deleted", raise_exception=1)
+			
 		if self.check_gle_exists():
-			msgprint("Account with existing transaction (Sales Invoice / Purchase Invoice / Journal Voucher) can not be trashed", raise_exception=1)
+			msgprint("""Account with existing transaction (Sales Invoice / Purchase Invoice / \
+				Journal Voucher) can not be trashed""", raise_exception=1)
 		if self.check_if_child_exists():
-			msgprint("Child account exists for this account. You can not trash this account.", raise_exception=1)
+			msgprint("Child account exists for this account. You can not trash this account.",
+			 	raise_exception=1)
 
-	# On Trash
 	def on_trash(self): 
 		self.validate_trash()
-		
-		# rebuild tree
 		self.update_nsm_model()
 
 		# delete all cancelled gl entry of this account
-		sql("delete from `tabGL Entry` where account = %s and ifnull(is_cancelled, 'No') = 'Yes'", self.doc.name)
+		sql("""delete from `tabGL Entry` where account = %s and 
+			ifnull(is_cancelled, 'No') = 'Yes'""", self.doc.name)
 
-	# on rename
 	def on_rename(self, new, old):
 		company_abbr = webnotes.conn.get_value("Company", self.doc.company, "abbr")		
 		parts = new.split(" - ")	
@@ -191,4 +198,4 @@
 		sql("update `tabAccount` set account_name = '%s' where name = '%s'" % \
 			(account_name, old))
 
-		return " - ".join(parts)
+		return " - ".join(parts)
\ No newline at end of file
diff --git a/accounts/doctype/account/account.txt b/accounts/doctype/account/account.txt
index 2beb08a..c6f85e1 100644
--- a/accounts/doctype/account/account.txt
+++ b/accounts/doctype/account/account.txt
@@ -13,7 +13,6 @@
   "document_type": "Master", 
   "description": "Heads (or groups) against which Accounting Entries are made and balances are maintained.", 
   "name": "__common__", 
-  "default_print_format": "Standard", 
   "allow_rename": 1, 
   "doctype": "DocType", 
   "allow_copy": 1
diff --git a/accounts/doctype/bank_reconciliation_detail/bank_reconciliation_detail.txt b/accounts/doctype/bank_reconciliation_detail/bank_reconciliation_detail.txt
index 3924980..e3688b4 100644
--- a/accounts/doctype/bank_reconciliation_detail/bank_reconciliation_detail.txt
+++ b/accounts/doctype/bank_reconciliation_detail/bank_reconciliation_detail.txt
@@ -13,7 +13,6 @@
 	# These values are common for all DocType
 	{
 		'colour': u'White:FFF',
-		'default_print_format': u'Standard',
 		'doctype': 'DocType',
 		'istable': 1,
 		'module': u'Accounts',
diff --git a/accounts/doctype/cost_center/cost_center.txt b/accounts/doctype/cost_center/cost_center.txt
index ecb3ad6..b145a0c 100644
--- a/accounts/doctype/cost_center/cost_center.txt
+++ b/accounts/doctype/cost_center/cost_center.txt
@@ -14,7 +14,6 @@
   "description": "Track separate Income and Expense for product verticals or divisions.", 
   "autoname": "field:cost_center_name", 
   "name": "__common__", 
-  "default_print_format": "Standard", 
   "allow_rename": 1, 
   "doctype": "DocType", 
   "allow_copy": 1
diff --git a/accounts/doctype/fiscal_year/fiscal_year.txt b/accounts/doctype/fiscal_year/fiscal_year.txt
index 68dbdb2..23ccc85 100644
--- a/accounts/doctype/fiscal_year/fiscal_year.txt
+++ b/accounts/doctype/fiscal_year/fiscal_year.txt
@@ -16,7 +16,6 @@
 		'allow_trash': 1,
 		'autoname': u'field:year',
 		'colour': u'White:FFF',
-		'default_print_format': u'Standard',
 		'description': u'**Fiscal Year** represents a Financial Year. All accounting entries and other major transactions are tracked against **Fiscal Year**.',
 		'doctype': 'DocType',
 		'document_type': u'Master',
diff --git a/accounts/doctype/gl_entry/gl_entry.txt b/accounts/doctype/gl_entry/gl_entry.txt
index 0888a95..9c8b5dd 100644
--- a/accounts/doctype/gl_entry/gl_entry.txt
+++ b/accounts/doctype/gl_entry/gl_entry.txt
@@ -15,7 +15,6 @@
 		'_last_update': u'1319016431',
 		'autoname': u'GL.#######',
 		'colour': u'White:FFF',
-		'default_print_format': u'Standard',
 		'doctype': 'DocType',
 		'in_create': 1,
 		'module': u'Accounts',
diff --git a/accounts/doctype/journal_voucher/journal_voucher.txt b/accounts/doctype/journal_voucher/journal_voucher.txt
index bfa0bfa..ad0004f 100644
--- a/accounts/doctype/journal_voucher/journal_voucher.txt
+++ b/accounts/doctype/journal_voucher/journal_voucher.txt
@@ -10,7 +10,6 @@
   "is_submittable": 1, 
   "autoname": "naming_series:", 
   "name": "__common__", 
-  "default_print_format": "Standard", 
   "search_fields": "voucher_type,posting_date, due_date, cheque_no", 
   "module": "Accounts", 
   "doctype": "DocType", 
diff --git a/accounts/doctype/journal_voucher_detail/journal_voucher_detail.txt b/accounts/doctype/journal_voucher_detail/journal_voucher_detail.txt
index c7b4ab4..972c125 100644
--- a/accounts/doctype/journal_voucher_detail/journal_voucher_detail.txt
+++ b/accounts/doctype/journal_voucher_detail/journal_voucher_detail.txt
@@ -14,7 +14,6 @@
 	{
 		'autoname': u'JVD.######',
 		'colour': u'White:FFF',
-		'default_print_format': u'Standard',
 		u'doctype': u'DocType',
 		'istable': 1,
 		'module': u'Accounts',
diff --git a/accounts/doctype/payment_to_invoice_matching_tool/payment_to_invoice_matching_tool.txt b/accounts/doctype/payment_to_invoice_matching_tool/payment_to_invoice_matching_tool.txt
index 5a95ba8..3887743 100644
--- a/accounts/doctype/payment_to_invoice_matching_tool/payment_to_invoice_matching_tool.txt
+++ b/accounts/doctype/payment_to_invoice_matching_tool/payment_to_invoice_matching_tool.txt
@@ -14,7 +14,6 @@
 	{
 		'_last_update': u'1316509358',
 		'colour': u'White:FFF',
-		'default_print_format': u'Standard',
 		'doctype': 'DocType',
 		'document_type': u'Other',
 		'issingle': 1,
diff --git a/accounts/doctype/payment_to_invoice_matching_tool_detail/payment_to_invoice_matching_tool_detail.txt b/accounts/doctype/payment_to_invoice_matching_tool_detail/payment_to_invoice_matching_tool_detail.txt
index 5291057..7b3beb8 100644
--- a/accounts/doctype/payment_to_invoice_matching_tool_detail/payment_to_invoice_matching_tool_detail.txt
+++ b/accounts/doctype/payment_to_invoice_matching_tool_detail/payment_to_invoice_matching_tool_detail.txt
@@ -13,7 +13,6 @@
 	# These values are common for all DocType
 	{
 		'colour': u'White:FFF',
-		'default_print_format': u'Standard',
 		'doctype': 'DocType',
 		'istable': 1,
 		'module': u'Accounts',
diff --git a/accounts/doctype/period_closing_voucher/period_closing_voucher.txt b/accounts/doctype/period_closing_voucher/period_closing_voucher.txt
index f56c1b0..2313d40 100644
--- a/accounts/doctype/period_closing_voucher/period_closing_voucher.txt
+++ b/accounts/doctype/period_closing_voucher/period_closing_voucher.txt
@@ -15,7 +15,6 @@
 		'_last_update': u'1311621379',
 		'autoname': u'PCE/.###',
 		'colour': u'White:FFF',
-		'default_print_format': u'Standard',
 		'doctype': 'DocType',
 		'is_submittable': 1,
 		'module': u'Accounts',
diff --git a/accounts/doctype/pos_setting/pos_setting.txt b/accounts/doctype/pos_setting/pos_setting.txt
index 49ab1d3..1c7de5b 100755
--- a/accounts/doctype/pos_setting/pos_setting.txt
+++ b/accounts/doctype/pos_setting/pos_setting.txt
@@ -15,7 +15,6 @@
 		'_last_update': u'1322549700',
 		'autoname': u'POS/.####',
 		'colour': u'White:FFF',
-		'default_print_format': u'Standard',
 		'doctype': 'DocType',
 		'module': u'Accounts',
 		'name': '__common__',
diff --git a/accounts/doctype/purchase_invoice/purchase_invoice.txt b/accounts/doctype/purchase_invoice/purchase_invoice.txt
index 3880689..988dd5f 100755
--- a/accounts/doctype/purchase_invoice/purchase_invoice.txt
+++ b/accounts/doctype/purchase_invoice/purchase_invoice.txt
@@ -10,7 +10,6 @@
   "is_submittable": 1, 
   "autoname": "naming_series:", 
   "allow_attach": 1, 
-  "default_print_format": "Standard", 
   "search_fields": "posting_date, credit_to, fiscal_year, bill_no, grand_total, outstanding_amount", 
   "module": "Accounts", 
   "doctype": "DocType", 
diff --git a/accounts/doctype/purchase_invoice_item/purchase_invoice_item.txt b/accounts/doctype/purchase_invoice_item/purchase_invoice_item.txt
index 30493b3..a09398d 100755
--- a/accounts/doctype/purchase_invoice_item/purchase_invoice_item.txt
+++ b/accounts/doctype/purchase_invoice_item/purchase_invoice_item.txt
@@ -14,7 +14,6 @@
 	{
 		'autoname': u'EVD.######',
 		'colour': u'White:FFF',
-		'default_print_format': u'Standard',
 		'doctype': 'DocType',
 		'istable': 1,
 		'module': u'Accounts',
diff --git a/accounts/doctype/purchase_taxes_and_charges/purchase_taxes_and_charges.txt b/accounts/doctype/purchase_taxes_and_charges/purchase_taxes_and_charges.txt
index 3198b25..05bcb86 100644
--- a/accounts/doctype/purchase_taxes_and_charges/purchase_taxes_and_charges.txt
+++ b/accounts/doctype/purchase_taxes_and_charges/purchase_taxes_and_charges.txt
@@ -15,7 +15,6 @@
 		'_last_update': u'1322549700',
 		'autoname': u'PVTD.######',
 		'colour': u'White:FFF',
-		'default_print_format': u'Standard',
 		u'doctype': u'DocType',
 		'hide_heading': 1,
 		'istable': 1,
diff --git a/accounts/doctype/purchase_taxes_and_charges_master/purchase_taxes_and_charges_master.txt b/accounts/doctype/purchase_taxes_and_charges_master/purchase_taxes_and_charges_master.txt
index 5c72c2c..9e659ee 100644
--- a/accounts/doctype/purchase_taxes_and_charges_master/purchase_taxes_and_charges_master.txt
+++ b/accounts/doctype/purchase_taxes_and_charges_master/purchase_taxes_and_charges_master.txt
@@ -16,7 +16,6 @@
 		'allow_trash': 1,
 		'autoname': u'field:title',
 		'colour': u'White:FFF',
-		'default_print_format': u'Standard',
 		'description': u'Standard tax template that can be applied to all Purchase Transactions. This template can contain list of tax heads and also other expense heads like "Shipping", "Insurance", "Handling" etc.\n\n#### Note\n\nThe tax rate you define here will be the standard tax rate for all **Items**. If there are **Items** that have different rates, they must be added in the **Item Tax** table in the **Item** master.\n\n#### Description of Columns\n\n1. Calculation Type: \n    - This can be on **Net Total** (that is the sum of basic amount).\n    - **On Previous Row Total / Amount** (for cumulative taxes or charges). If you select this option, the tax will be applied as a percentage of the previous row (in the tax table) amount or total.\n    - **Actual** (as mentioned).\n2. Account Head: The Account ledger under which this tax will be booked\n3. Cost Center: If the tax / charge is an income (like shipping) or expense it needs to be booked against a Cost Center.\n4. Description: Description of the tax (that will be printed in invoices / quotes).\n5. Rate: Tax rate.\n6. Amount: Tax amount.\n7. Total: Cumulative total to this point.\n8. Enter Row: If based on "Previous Row Total" you can select the row number which will be taken as a base for this calculation (default is the previous row).\n9. Consider Tax or Charge for: In this section you can specify if the tax / charge is only for valuation (not a part of total) or only for total (does not add value to the item) or for both.\n10. Add or Deduct: Whether you want to add or deduct the tax.',
 		'doctype': 'DocType',
 		'document_type': u'Master',
diff --git a/accounts/doctype/sales_invoice/sales_invoice.txt b/accounts/doctype/sales_invoice/sales_invoice.txt
index 91e3298..95156b16 100644
--- a/accounts/doctype/sales_invoice/sales_invoice.txt
+++ b/accounts/doctype/sales_invoice/sales_invoice.txt
@@ -10,7 +10,6 @@
   "is_submittable": 1, 
   "autoname": "naming_series:", 
   "allow_attach": 1, 
-  "default_print_format": "Standard", 
   "search_fields": "posting_date, due_date, debit_to, fiscal_year, grand_total, outstanding_amount", 
   "module": "Accounts", 
   "doctype": "DocType", 
diff --git a/accounts/doctype/sales_invoice_item/sales_invoice_item.txt b/accounts/doctype/sales_invoice_item/sales_invoice_item.txt
index 0dddb8a..da30751 100644
--- a/accounts/doctype/sales_invoice_item/sales_invoice_item.txt
+++ b/accounts/doctype/sales_invoice_item/sales_invoice_item.txt
@@ -14,7 +14,6 @@
 	{
 		'autoname': u'INVD.######',
 		'colour': u'White:FFF',
-		'default_print_format': u'Standard',
 		'doctype': 'DocType',
 		'istable': 1,
 		'module': u'Accounts',
diff --git a/accounts/doctype/sales_taxes_and_charges/sales_taxes_and_charges.txt b/accounts/doctype/sales_taxes_and_charges/sales_taxes_and_charges.txt
index 66d7aae..234907c 100644
--- a/accounts/doctype/sales_taxes_and_charges/sales_taxes_and_charges.txt
+++ b/accounts/doctype/sales_taxes_and_charges/sales_taxes_and_charges.txt
@@ -14,7 +14,6 @@
 	{
 		'autoname': u'INVTD.######',
 		'colour': u'White:FFF',
-		'default_print_format': u'Standard',
 		'doctype': 'DocType',
 		'hide_heading': 1,
 		'istable': 1,
diff --git a/accounts/doctype/sales_taxes_and_charges_master/sales_taxes_and_charges_master.txt b/accounts/doctype/sales_taxes_and_charges_master/sales_taxes_and_charges_master.txt
index 1707bf4..5870a46 100644
--- a/accounts/doctype/sales_taxes_and_charges_master/sales_taxes_and_charges_master.txt
+++ b/accounts/doctype/sales_taxes_and_charges_master/sales_taxes_and_charges_master.txt
@@ -16,7 +16,6 @@
 		'allow_trash': 1,
 		'autoname': u'field:title',
 		'colour': u'White:FFF',
-		'default_print_format': u'Standard',
 		'description': u'Standard tax template that can be applied to all Sales Transactions. This template can contain list of tax heads and also other expense / income heads like "Shipping", "Insurance", "Handling" etc.\n\n#### Note\n\nThe tax rate you define here will be the standard tax rate for all **Items**. If there are **Items** that have different rates, they must be added in the **Item Tax** table in the **Item** master.\n\n#### Description of Columns\n\n1. Calculation Type: \n    - This can be on **Net Total** (that is the sum of basic amount).\n    - **On Previous Row Total / Amount** (for cumulative taxes or charges). If you select this option, the tax will be applied as a percentage of the previous row (in the tax table) amount or total.\n    - **Actual** (as mentioned).\n2. Account Head: The Account ledger under which this tax will be booked\n3. Cost Center: If the tax / charge is an income (like shipping) or expense it needs to be booked against a Cost Center.\n4. Description: Description of the tax (that will be printed in invoices / quotes).\n5. Rate: Tax rate.\n6. Amount: Tax amount.\n7. Total: Cumulative total to this point.\n8. Enter Row: If based on "Previous Row Total" you can select the row number which will be taken as a base for this calculation (default is the previous row).\n9. Is this Tax included in Basic Rate?: If you check this, it means that this tax will not be shown below the item table, but will be included in the Basic Rate in your main item table. This is useful where you want give a flat price (inclusive of all taxes) price to customers.',
 		'doctype': 'DocType',
 		'document_type': u'Master',
diff --git a/buying/doctype/purchase_order/purchase_order.txt b/buying/doctype/purchase_order/purchase_order.txt
index 2463a0d..3a08bee 100644
--- a/buying/doctype/purchase_order/purchase_order.txt
+++ b/buying/doctype/purchase_order/purchase_order.txt
@@ -9,7 +9,6 @@
  {
   "is_submittable": 1, 
   "allow_attach": 1, 
-  "default_print_format": "Standard", 
   "search_fields": "status, transaction_date, supplier,grand_total", 
   "module": "Buying", 
   "doctype": "DocType", 
diff --git a/buying/doctype/purchase_order_item/purchase_order_item.txt b/buying/doctype/purchase_order_item/purchase_order_item.txt
index cecf963..6f38e18 100755
--- a/buying/doctype/purchase_order_item/purchase_order_item.txt
+++ b/buying/doctype/purchase_order_item/purchase_order_item.txt
@@ -14,7 +14,6 @@
 	{
 		'autoname': u'POD/.#####',
 		'colour': u'White:FFF',
-		'default_print_format': u'Standard',
 		'doctype': 'DocType',
 		'istable': 1,
 		'module': u'Buying',
diff --git a/buying/doctype/purchase_request/purchase_request.txt b/buying/doctype/purchase_request/purchase_request.txt
index 393367e..b64ee0a 100644
--- a/buying/doctype/purchase_request/purchase_request.txt
+++ b/buying/doctype/purchase_request/purchase_request.txt
@@ -9,7 +9,6 @@
  {
   "is_submittable": 1, 
   "allow_attach": 1, 
-  "default_print_format": "Standard", 
   "allow_print": 0, 
   "search_fields": "status,transaction_date,sales_order_no", 
   "module": "Buying", 
diff --git a/buying/doctype/purchase_request_item/purchase_request_item.txt b/buying/doctype/purchase_request_item/purchase_request_item.txt
index 9407894..3107529 100644
--- a/buying/doctype/purchase_request_item/purchase_request_item.txt
+++ b/buying/doctype/purchase_request_item/purchase_request_item.txt
@@ -14,7 +14,6 @@
 	{
 		'autoname': u'IDTD/.#####',
 		'colour': u'White:FFF',
-		'default_print_format': u'Standard',
 		'doctype': 'DocType',
 		'istable': 1,
 		'module': u'Buying',
diff --git a/buying/doctype/quality_inspection/quality_inspection.txt b/buying/doctype/quality_inspection/quality_inspection.txt
index afbd737..8d4cd0a 100644
--- a/buying/doctype/quality_inspection/quality_inspection.txt
+++ b/buying/doctype/quality_inspection/quality_inspection.txt
@@ -15,7 +15,6 @@
 		'_last_update': u'1317365120',
 		'autoname': u'QAI/.######',
 		'colour': u'White:FFF',
-		'default_print_format': u'Standard',
 		'doctype': 'DocType',
 		'is_submittable': 1,
 		'module': u'Buying',
diff --git a/buying/doctype/supplier_quotation/supplier_quotation.txt b/buying/doctype/supplier_quotation/supplier_quotation.txt
index 4e40539..db2abfa 100644
--- a/buying/doctype/supplier_quotation/supplier_quotation.txt
+++ b/buying/doctype/supplier_quotation/supplier_quotation.txt
@@ -9,7 +9,6 @@
  {
   "is_submittable": 1, 
   "allow_attach": 1, 
-  "default_print_format": "Standard", 
   "search_fields": "status, transaction_date, supplier,grand_total", 
   "module": "Buying", 
   "doctype": "DocType", 
diff --git a/buying/doctype/supplier_quotation_item/supplier_quotation_item.txt b/buying/doctype/supplier_quotation_item/supplier_quotation_item.txt
index 895c8fc..a1a49b3 100644
--- a/buying/doctype/supplier_quotation_item/supplier_quotation_item.txt
+++ b/buying/doctype/supplier_quotation_item/supplier_quotation_item.txt
@@ -13,7 +13,6 @@
 	# These values are common for all DocType
 	{
 		'autoname': u'SQI-.#####',
-		'default_print_format': u'Standard',
 		'doctype': 'DocType',
 		'istable': 1,
 		'module': u'Buying',
diff --git a/home/doctype/feed/feed.txt b/home/doctype/feed/feed.txt
index 57471bd..ad76eb0 100644
--- a/home/doctype/feed/feed.txt
+++ b/home/doctype/feed/feed.txt
@@ -14,7 +14,6 @@
 	{
 		'autoname': u'_FEED.#####',
 		'colour': u'White:FFF',
-		'default_print_format': u'Standard',
 		u'doctype': u'DocType',
 		'module': u'Home',
 		u'name': u'__common__',
diff --git a/hr/doctype/appraisal/appraisal.txt b/hr/doctype/appraisal/appraisal.txt
index dd7ad19..525b689 100644
--- a/hr/doctype/appraisal/appraisal.txt
+++ b/hr/doctype/appraisal/appraisal.txt
@@ -15,7 +15,6 @@
 		'_last_update': u'1316075905',
 		'autoname': u'APRSL.#####',
 		'colour': u'White:FFF',
-		'default_print_format': u'Standard',
 		u'doctype': u'DocType',
 		'is_submittable': 1,
 		'module': u'HR',
diff --git a/hr/doctype/appraisal_goal/appraisal_goal.txt b/hr/doctype/appraisal_goal/appraisal_goal.txt
index ada41f5..cdfa188 100644
--- a/hr/doctype/appraisal_goal/appraisal_goal.txt
+++ b/hr/doctype/appraisal_goal/appraisal_goal.txt
@@ -14,7 +14,6 @@
 	{
 		'autoname': u'APRSLD.#####',
 		'colour': u'White:FFF',
-		'default_print_format': u'Standard',
 		u'doctype': u'DocType',
 		'istable': 1,
 		'module': u'HR',
diff --git a/hr/doctype/attendance/attendance.txt b/hr/doctype/attendance/attendance.txt
index 04df67d..85ebb04 100644
--- a/hr/doctype/attendance/attendance.txt
+++ b/hr/doctype/attendance/attendance.txt
@@ -14,7 +14,6 @@
 	{
 		'_last_update': u'1317365120',
 		'colour': u'White:FFF',
-		'default_print_format': u'Standard',
 		'doctype': 'DocType',
 		'document_type': u'Master',
 		'is_submittable': 1,
diff --git a/hr/doctype/expense_claim/expense_claim.txt b/hr/doctype/expense_claim/expense_claim.txt
index 5ef2c59..a5a0860 100644
--- a/hr/doctype/expense_claim/expense_claim.txt
+++ b/hr/doctype/expense_claim/expense_claim.txt
@@ -10,7 +10,6 @@
   "is_submittable": 1, 
   "autoname": "EXP.######", 
   "name": "__common__", 
-  "default_print_format": "Standard", 
   "search_fields": "approval_status,employee,employee_name", 
   "module": "HR", 
   "doctype": "DocType"
diff --git a/hr/doctype/holiday/holiday.txt b/hr/doctype/holiday/holiday.txt
index bfcc7b3..0d210c5 100644
--- a/hr/doctype/holiday/holiday.txt
+++ b/hr/doctype/holiday/holiday.txt
@@ -13,7 +13,6 @@
 	# These values are common for all DocType
 	{
 		'colour': u'White:FFF',
-		'default_print_format': u'Standard',
 		'doctype': 'DocType',
 		'istable': 1,
 		'module': u'HR',
diff --git a/hr/doctype/leave_allocation/leave_allocation.txt b/hr/doctype/leave_allocation/leave_allocation.txt
index ed0e6e3..7a9f915 100644
--- a/hr/doctype/leave_allocation/leave_allocation.txt
+++ b/hr/doctype/leave_allocation/leave_allocation.txt
@@ -15,7 +15,6 @@
 		'_last_update': u'1317365120',
 		'autoname': u'LAL/.#####',
 		'colour': u'White:FFF',
-		'default_print_format': u'Standard',
 		u'doctype': u'DocType',
 		'is_submittable': 1,
 		'module': u'HR',
diff --git a/hr/doctype/leave_control_panel/leave_control_panel.txt b/hr/doctype/leave_control_panel/leave_control_panel.txt
index 9adc243..9d05ada 100644
--- a/hr/doctype/leave_control_panel/leave_control_panel.txt
+++ b/hr/doctype/leave_control_panel/leave_control_panel.txt
@@ -17,7 +17,6 @@
 		'allow_email': 1,
 		'allow_print': 1,
 		'colour': u'White:FFF',
-		'default_print_format': u'Standard',
 		'doctype': 'DocType',
 		'hide_heading': 0,
 		'hide_toolbar': 0,
diff --git a/hr/doctype/salary_manager/salary_manager.txt b/hr/doctype/salary_manager/salary_manager.txt
index 6eff0db..7c47f1c 100644
--- a/hr/doctype/salary_manager/salary_manager.txt
+++ b/hr/doctype/salary_manager/salary_manager.txt
@@ -17,7 +17,6 @@
 		'allow_email': 1,
 		'allow_print': 1,
 		'colour': u'White:FFF',
-		'default_print_format': u'Standard',
 		'doctype': 'DocType',
 		'document_type': u'Other',
 		'issingle': 1,
diff --git a/manufacturing/doctype/bom/bom.txt b/manufacturing/doctype/bom/bom.txt
index e381510..a2495d5 100644
--- a/manufacturing/doctype/bom/bom.txt
+++ b/manufacturing/doctype/bom/bom.txt
@@ -19,7 +19,6 @@
   "hide_heading": 0, 
   "issingle": 0, 
   "name": "__common__", 
-  "default_print_format": "Standard", 
   "allow_rename": 0, 
   "doctype": "DocType", 
   "is_submittable": 1, 
diff --git a/manufacturing/doctype/bom_item/bom_item.txt b/manufacturing/doctype/bom_item/bom_item.txt
index 96d3127..e75625a 100644
--- a/manufacturing/doctype/bom_item/bom_item.txt
+++ b/manufacturing/doctype/bom_item/bom_item.txt
@@ -13,7 +13,6 @@
 	# These values are common for all DocType
 	{
 		'colour': u'White:FFF',
-		'default_print_format': u'Standard',
 		'doctype': 'DocType',
 		'istable': 1,
 		'module': u'Manufacturing',
diff --git a/manufacturing/doctype/bom_operation/bom_operation.txt b/manufacturing/doctype/bom_operation/bom_operation.txt
index 9db8fd6..082306d 100644
--- a/manufacturing/doctype/bom_operation/bom_operation.txt
+++ b/manufacturing/doctype/bom_operation/bom_operation.txt
@@ -13,7 +13,6 @@
 	# These values are common for all DocType
 	{
 		'colour': u'White:FFF',
-		'default_print_format': u'Standard',
 		'doctype': 'DocType',
 		'istable': 1,
 		'module': u'Manufacturing',
diff --git a/manufacturing/doctype/production_order/production_order.txt b/manufacturing/doctype/production_order/production_order.txt
index 0877815..65ae4b8 100644
--- a/manufacturing/doctype/production_order/production_order.txt
+++ b/manufacturing/doctype/production_order/production_order.txt
@@ -9,7 +9,6 @@
  {
   "is_submittable": 1, 
   "in_create": 0, 
-  "default_print_format": "Standard", 
   "doctype": "DocType", 
   "module": "Manufacturing", 
   "name": "__common__"
diff --git a/manufacturing/doctype/production_plan_item/production_plan_item.txt b/manufacturing/doctype/production_plan_item/production_plan_item.txt
index 6e9b0e2..ab3ce11 100644
--- a/manufacturing/doctype/production_plan_item/production_plan_item.txt
+++ b/manufacturing/doctype/production_plan_item/production_plan_item.txt
@@ -10,7 +10,6 @@
   "istable": 1, 
   "autoname": "PPID/.#####", 
   "name": "__common__", 
-  "default_print_format": "Standard", 
   "doctype": "DocType", 
   "module": "Manufacturing"
  }, 
diff --git a/manufacturing/doctype/production_plan_sales_order/production_plan_sales_order.txt b/manufacturing/doctype/production_plan_sales_order/production_plan_sales_order.txt
index 364803d..37e0f8a 100644
--- a/manufacturing/doctype/production_plan_sales_order/production_plan_sales_order.txt
+++ b/manufacturing/doctype/production_plan_sales_order/production_plan_sales_order.txt
@@ -10,7 +10,6 @@
   "istable": 1, 
   "autoname": "PP/.SO/.#####", 
   "name": "__common__", 
-  "default_print_format": "Standard", 
   "doctype": "DocType", 
   "module": "Manufacturing"
  }, 
diff --git a/manufacturing/doctype/production_planning_tool/production_planning_tool.txt b/manufacturing/doctype/production_planning_tool/production_planning_tool.txt
index bc2a914..dcec425 100644
--- a/manufacturing/doctype/production_planning_tool/production_planning_tool.txt
+++ b/manufacturing/doctype/production_planning_tool/production_planning_tool.txt
@@ -10,7 +10,6 @@
   "read_only": 1, 
   "issingle": 1, 
   "in_create": 1, 
-  "default_print_format": "Standard", 
   "doctype": "DocType", 
   "module": "Manufacturing", 
   "name": "__common__"
diff --git a/manufacturing/doctype/workstation/workstation.txt b/manufacturing/doctype/workstation/workstation.txt
index 19af36e..12b4b20 100644
--- a/manufacturing/doctype/workstation/workstation.txt
+++ b/manufacturing/doctype/workstation/workstation.txt
@@ -17,7 +17,6 @@
 		'allow_trash': 1,
 		'autoname': u'field:workstation_name',
 		'colour': u'White:FFF',
-		'default_print_format': u'Standard',
 		'doctype': 'DocType',
 		'document_type': u'Master',
 		'module': u'Manufacturing',
diff --git a/patches/december_2012/fix_default_print_format.py b/patches/december_2012/fix_default_print_format.py
new file mode 100644
index 0000000..e475122
--- /dev/null
+++ b/patches/december_2012/fix_default_print_format.py
@@ -0,0 +1,4 @@
+import webnotes
+def execute():
+	webnotes.conn.sql("""update `tabDocType` set default_print_format=null
+		where default_print_format='Standard'""")
\ No newline at end of file
diff --git a/patches/patch_list.py b/patches/patch_list.py
index 5bb58b4..e985fa7 100644
--- a/patches/patch_list.py
+++ b/patches/patch_list.py
@@ -525,5 +525,8 @@
 	{
 		'patch_module': 'patches.december_2012',
 		'patch_file': 'production_cleanup',
+	{
+		'patch_module': 'patches.december_2012',
+		'patch_file': 'fix_default_print_format',
 	},
 ]
\ No newline at end of file
diff --git a/projects/doctype/project/project.txt b/projects/doctype/project/project.txt
index eaa0ac8..3c58f1a 100644
--- a/projects/doctype/project/project.txt
+++ b/projects/doctype/project/project.txt
@@ -9,7 +9,6 @@
  {
   "autoname": "field:project_name", 
   "allow_attach": 1, 
-  "default_print_format": "Standard", 
   "search_fields": "customer, status, priority, is_active", 
   "module": "Projects", 
   "doctype": "DocType", 
diff --git a/projects/doctype/project_milestone/project_milestone.txt b/projects/doctype/project_milestone/project_milestone.txt
index 6a7a4fb..4430c7d 100644
--- a/projects/doctype/project_milestone/project_milestone.txt
+++ b/projects/doctype/project_milestone/project_milestone.txt
@@ -13,7 +13,6 @@
 	# These values are common for all DocType
 	{
 		'colour': u'White:FFF',
-		'default_print_format': u'Standard',
 		'doctype': 'DocType',
 		'istable': 1,
 		'module': u'Projects',
diff --git a/projects/doctype/task/task.txt b/projects/doctype/task/task.txt
index 2ced828..3fcf1e3 100644
--- a/projects/doctype/task/task.txt
+++ b/projects/doctype/task/task.txt
@@ -17,7 +17,6 @@
 		'allow_trash': 1,
 		'autoname': u'TASK.#####',
 		'colour': u'White:FFF',
-		'default_print_format': u'Standard',
 		u'doctype': u'DocType',
 		'document_type': u'Master',
 		'max_attachments': 5,
diff --git a/selling/doctype/campaign/campaign.txt b/selling/doctype/campaign/campaign.txt
index 41c0e77..0ec59df 100644
--- a/selling/doctype/campaign/campaign.txt
+++ b/selling/doctype/campaign/campaign.txt
@@ -16,7 +16,6 @@
 		'allow_trash': 1,
 		'autoname': u'field:campaign_name',
 		'colour': u'White:FFF',
-		'default_print_format': u'Standard',
 		'description': u'Keep Track of Sales Campaigns. Keep track of Leads, Quotations, Sales Order etc from Campaigns to gauge Return on Investment. ',
 		'doctype': 'DocType',
 		'document_type': u'Master',
diff --git a/selling/doctype/customer/customer.txt b/selling/doctype/customer/customer.txt
index cc49c0a..1ef77ce 100644
--- a/selling/doctype/customer/customer.txt
+++ b/selling/doctype/customer/customer.txt
@@ -14,7 +14,6 @@
   "document_type": "Master", 
   "autoname": "naming_series:", 
   "name": "__common__", 
-  "default_print_format": "Standard", 
   "allow_rename": 1, 
   "doctype": "DocType"
  }, 
diff --git a/selling/doctype/installation_note/installation_note.txt b/selling/doctype/installation_note/installation_note.txt
index a3812d7..f0239bb 100644
--- a/selling/doctype/installation_note/installation_note.txt
+++ b/selling/doctype/installation_note/installation_note.txt
@@ -15,7 +15,6 @@
 		'_last_update': u'1306480044',
 		'autoname': u'IN/.####',
 		'colour': u'White:FFF',
-		'default_print_format': u'Standard',
 		'doctype': 'DocType',
 		'is_submittable': 1,
 		'module': u'Selling',
diff --git a/selling/doctype/installation_note_item/installation_note_item.txt b/selling/doctype/installation_note_item/installation_note_item.txt
index 8a999f4..0b9615b 100644
--- a/selling/doctype/installation_note_item/installation_note_item.txt
+++ b/selling/doctype/installation_note_item/installation_note_item.txt
@@ -14,7 +14,6 @@
 	{
 		'autoname': u'IID/.#####',
 		'colour': u'White:FFF',
-		'default_print_format': u'Standard',
 		'doctype': 'DocType',
 		'istable': 1,
 		'module': u'Selling',
diff --git a/selling/doctype/lead/lead.txt b/selling/doctype/lead/lead.txt
index 04a3997..6ffe3c4 100644
--- a/selling/doctype/lead/lead.txt
+++ b/selling/doctype/lead/lead.txt
@@ -9,7 +9,6 @@
  {
   "autoname": "naming_series:", 
   "name": "__common__", 
-  "default_print_format": "Standard", 
   "search_fields": "lead_name,lead_owner,status", 
   "module": "Selling", 
   "doctype": "DocType", 
diff --git a/selling/doctype/opportunity/opportunity.txt b/selling/doctype/opportunity/opportunity.txt
index f3e9d85..eafeff0 100644
--- a/selling/doctype/opportunity/opportunity.txt
+++ b/selling/doctype/opportunity/opportunity.txt
@@ -10,7 +10,6 @@
   "is_submittable": 1, 
   "autoname": "naming_series:", 
   "description": "Potential Sales Deal", 
-  "default_print_format": "Standard", 
   "search_fields": "status,transaction_date,customer,lead,enquiry_type,territory,company", 
   "module": "Selling", 
   "doctype": "DocType", 
diff --git a/selling/doctype/quotation/quotation.txt b/selling/doctype/quotation/quotation.txt
index 6924dcb..2c9f880 100644
--- a/selling/doctype/quotation/quotation.txt
+++ b/selling/doctype/quotation/quotation.txt
@@ -16,7 +16,6 @@
   "allow_email": 0, 
   "autoname": "naming_series:", 
   "name": "__common__", 
-  "default_print_format": "Standard", 
   "doctype": "DocType", 
   "max_attachments": 1, 
   "hide_toolbar": 0
diff --git a/selling/doctype/quotation_item/quotation_item.txt b/selling/doctype/quotation_item/quotation_item.txt
index 6ae657c..e025d3b 100644
--- a/selling/doctype/quotation_item/quotation_item.txt
+++ b/selling/doctype/quotation_item/quotation_item.txt
@@ -14,7 +14,6 @@
 	{
 		'autoname': u'QUOD/.#####',
 		'colour': u'White:FFF',
-		'default_print_format': u'Standard',
 		'doctype': 'DocType',
 		'is_transaction_doc': 0,
 		'istable': 1,
diff --git a/selling/doctype/sales_order/sales_order.txt b/selling/doctype/sales_order/sales_order.txt
index 8221411..ec20859 100644
--- a/selling/doctype/sales_order/sales_order.txt
+++ b/selling/doctype/sales_order/sales_order.txt
@@ -16,7 +16,6 @@
   "document_type": "Transaction", 
   "issingle": 0, 
   "name": "__common__", 
-  "default_print_format": "Standard", 
   "doctype": "DocType"
  }, 
  {
diff --git a/selling/doctype/sales_order_item/sales_order_item.txt b/selling/doctype/sales_order_item/sales_order_item.txt
index 1c80698..1987b6e 100644
--- a/selling/doctype/sales_order_item/sales_order_item.txt
+++ b/selling/doctype/sales_order_item/sales_order_item.txt
@@ -14,7 +14,6 @@
 	{
 		'autoname': u'SOD/.#####',
 		'colour': u'White:FFF',
-		'default_print_format': u'Standard',
 		'doctype': 'DocType',
 		'istable': 1,
 		'module': u'Selling',
diff --git a/selling/doctype/sms_center/sms_center.txt b/selling/doctype/sms_center/sms_center.txt
index d80787a..7f2aefc 100644
--- a/selling/doctype/sms_center/sms_center.txt
+++ b/selling/doctype/sms_center/sms_center.txt
@@ -18,7 +18,6 @@
 		'allow_email': 1,
 		'allow_print': 1,
 		'colour': u'White:FFF',
-		'default_print_format': u'Standard',
 		'doctype': 'DocType',
 		'hide_heading': 0,
 		'hide_toolbar': 0,
diff --git a/setup/doctype/company/company.py b/setup/doctype/company/company.py
index 8bed425..e570b72 100644
--- a/setup/doctype/company/company.py
+++ b/setup/doctype/company/company.py
@@ -204,11 +204,10 @@
 			glc.add_cc(str(c))
 			
 			
-	# On update
-	# ---------------------------------------------------
 	def on_update(self):
 		self.set_letter_head()
-		ac = sql("select name from tabAccount where account_name='Income' and company=%s", self.doc.name)
+		ac = sql("select name from tabAccount where company=%s and docstatus<2 limit 1",
+			self.doc.name)
 		if not ac:
 			self.create_default_accounts()
 		self.set_default_groups()
@@ -216,8 +215,7 @@
 		if not cc:
 			self.create_default_cost_center()
 
-	# 
-	# ---------------------------------------------------	
+
 	def on_trash(self):
 		"""
 			Trash accounts and cost centers for this company if no gl entry exists
diff --git a/setup/doctype/customer_group/customer_group.txt b/setup/doctype/customer_group/customer_group.txt
index 0cecb59..dc5641c 100644
--- a/setup/doctype/customer_group/customer_group.txt
+++ b/setup/doctype/customer_group/customer_group.txt
@@ -14,7 +14,6 @@
   "read_only": 1, 
   "autoname": "field:customer_group_name", 
   "name": "__common__", 
-  "default_print_format": "Standard", 
   "allow_rename": 1, 
   "doctype": "DocType"
  }, 
diff --git a/setup/doctype/email_settings/email_settings.txt b/setup/doctype/email_settings/email_settings.txt
index cf9d443..8d60fbc 100644
--- a/setup/doctype/email_settings/email_settings.txt
+++ b/setup/doctype/email_settings/email_settings.txt
@@ -17,7 +17,6 @@
 		'allow_email': 1,
 		'allow_print': 1,
 		'colour': u'White:FFF',
-		'default_print_format': u'Standard',
 		'description': u'Email Settings for Outgoing and Incoming Emails.',
 		'doctype': 'DocType',
 		'in_create': 1,
diff --git a/setup/doctype/features_setup/features_setup.txt b/setup/doctype/features_setup/features_setup.txt
index 4689af6..3045178 100644
--- a/setup/doctype/features_setup/features_setup.txt
+++ b/setup/doctype/features_setup/features_setup.txt
@@ -14,7 +14,6 @@
 	{
 		'_last_update': u'1323840127',
 		'colour': u'White:FFF',
-		'default_print_format': u'Standard',
 		'doctype': 'DocType',
 		'issingle': 1,
 		'module': u'Setup',
diff --git a/setup/doctype/global_defaults/global_defaults.txt b/setup/doctype/global_defaults/global_defaults.txt
index 6c47b61..2a4c74c 100644
--- a/setup/doctype/global_defaults/global_defaults.txt
+++ b/setup/doctype/global_defaults/global_defaults.txt
@@ -17,7 +17,6 @@
 		'allow_email': 1,
 		'allow_print': 1,
 		'colour': u'White:FFF',
-		'default_print_format': u'Standard',
 		u'doctype': u'DocType',
 		'hide_toolbar': 0,
 		'in_create': 1,
diff --git a/setup/doctype/item_group/item_group.txt b/setup/doctype/item_group/item_group.txt
index 7d8b225..653752b 100644
--- a/setup/doctype/item_group/item_group.txt
+++ b/setup/doctype/item_group/item_group.txt
@@ -15,7 +15,6 @@
   "description": "Item Classification", 
   "issingle": 0, 
   "name": "__common__", 
-  "default_print_format": "Standard", 
   "allow_rename": 1, 
   "doctype": "DocType"
  }, 
diff --git a/setup/doctype/naming_series_options/naming_series_options.txt b/setup/doctype/naming_series_options/naming_series_options.txt
index 88554ec..ade734e 100644
--- a/setup/doctype/naming_series_options/naming_series_options.txt
+++ b/setup/doctype/naming_series_options/naming_series_options.txt
@@ -14,7 +14,6 @@
 	{
 		'autoname': u'__NSO.#####',
 		'colour': u'White:FFF',
-		'default_print_format': u'Standard',
 		'doctype': 'DocType',
 		'in_create': 1,
 		'module': u'Setup',
diff --git a/setup/doctype/sales_partner/sales_partner.txt b/setup/doctype/sales_partner/sales_partner.txt
index 4e79261..43e869d 100644
--- a/setup/doctype/sales_partner/sales_partner.txt
+++ b/setup/doctype/sales_partner/sales_partner.txt
@@ -16,7 +16,6 @@
 		'allow_trash': 1,
 		'autoname': u'field:partner_name',
 		'colour': u'White:FFF',
-		'default_print_format': u'Standard',
 		'description': u'A **Sales Partner** is a third party distributor / dealer / commission agent / affiliate / reseller who sells the companies products for a commission. This is useful if you make the end sale to the **Customer**, involving your **Sales Partner**.\n\nIf you sell to your **Sales Partner** who in-turn sells it to the **Customer**, then you must make a **Customer** instead.',
 		'doctype': 'DocType',
 		'document_type': u'Master',
diff --git a/setup/doctype/terms_and_conditions/terms_and_conditions.txt b/setup/doctype/terms_and_conditions/terms_and_conditions.txt
index c120b2c..14b1f8c 100644
--- a/setup/doctype/terms_and_conditions/terms_and_conditions.txt
+++ b/setup/doctype/terms_and_conditions/terms_and_conditions.txt
@@ -16,7 +16,6 @@
 		'allow_trash': 1,
 		'autoname': u'field:title',
 		'colour': u'White:FFF',
-		'default_print_format': u'Standard',
 		'description': u'Standard Terms and Conditions that can be added to Sales and Purchases.\n\nExamples:\n\n1. Validity of the offer.\n1. Payment Terms (In Advance, On Credit, part advance etc).\n1. What is extra (or payable by the Customer).\n1. Safety / usage warning.\n1. Warranty if any.\n1. Returns Policy.\n1. Terms of shipping, if applicable.\n1. Ways of addressing disputes, indemnity, liability, etc.\n1. Address and Contact of your Company.',
 		'doctype': 'DocType',
 		'document_type': u'Master',
diff --git a/setup/doctype/territory/territory.txt b/setup/doctype/territory/territory.txt
index f0a112e..e431eb2 100644
--- a/setup/doctype/territory/territory.txt
+++ b/setup/doctype/territory/territory.txt
@@ -15,7 +15,6 @@
   "read_only": 1, 
   "autoname": "field:territory_name", 
   "name": "__common__", 
-  "default_print_format": "Standard", 
   "allow_rename": 1, 
   "doctype": "DocType", 
   "name_case": "Title Case"
diff --git a/setup/doctype/workflow_rule/workflow_rule.txt b/setup/doctype/workflow_rule/workflow_rule.txt
index 93f1c40..5b4d56c 100644
--- a/setup/doctype/workflow_rule/workflow_rule.txt
+++ b/setup/doctype/workflow_rule/workflow_rule.txt
@@ -14,7 +14,6 @@
 	{
 		'autoname': u'field:rule_name',
 		'colour': u'White:FFF',
-		'default_print_format': u'Standard',
 		'doctype': 'DocType',
 		'document_type': u'Master',
 		'module': u'Setup',
diff --git a/stock/doctype/bin/bin.txt b/stock/doctype/bin/bin.txt
index 158dbde..5578a34 100644
--- a/stock/doctype/bin/bin.txt
+++ b/stock/doctype/bin/bin.txt
@@ -15,7 +15,6 @@
 		'_last_update': u'1322549701',
 		'autoname': u'BIN/.#######',
 		'colour': u'White:FFF',
-		'default_print_format': u'Standard',
 		'doctype': 'DocType',
 		'hide_toolbar': 1,
 		'in_create': 1,
diff --git a/stock/doctype/delivery_note/delivery_note.txt b/stock/doctype/delivery_note/delivery_note.txt
index 7f402fa..d3e1642 100644
--- a/stock/doctype/delivery_note/delivery_note.txt
+++ b/stock/doctype/delivery_note/delivery_note.txt
@@ -16,7 +16,6 @@
   "allow_attach": 1, 
   "autoname": "naming_series:", 
   "name": "__common__", 
-  "default_print_format": "Standard", 
   "doctype": "DocType"
  }, 
  {
diff --git a/stock/doctype/delivery_note_item/delivery_note_item.txt b/stock/doctype/delivery_note_item/delivery_note_item.txt
index 8d0d387..cb25678 100644
--- a/stock/doctype/delivery_note_item/delivery_note_item.txt
+++ b/stock/doctype/delivery_note_item/delivery_note_item.txt
@@ -15,7 +15,6 @@
 		'_last_update': u'1311621379',
 		'autoname': u'DND/.#######',
 		'colour': u'White:FFF',
-		'default_print_format': u'Standard',
 		'doctype': 'DocType',
 		'istable': 1,
 		'module': u'Stock',
diff --git a/stock/doctype/item/item.txt b/stock/doctype/item/item.txt
index 4dfb972..889f29b 100644
--- a/stock/doctype/item/item.txt
+++ b/stock/doctype/item/item.txt
@@ -14,7 +14,6 @@
   "description": "A Product or a Service that is bought, sold or kept in stock.", 
   "autoname": "field:item_code", 
   "name": "__common__", 
-  "default_print_format": "Standard", 
   "allow_rename": 1, 
   "doctype": "DocType", 
   "max_attachments": 1
diff --git a/stock/doctype/item_price/item_price.txt b/stock/doctype/item_price/item_price.txt
index a48f8d1..d575155 100644
--- a/stock/doctype/item_price/item_price.txt
+++ b/stock/doctype/item_price/item_price.txt
@@ -14,7 +14,6 @@
 	{
 		'autoname': u'RFD/.#####',
 		'colour': u'White:FFF',
-		'default_print_format': u'Standard',
 		'doctype': 'DocType',
 		'in_create': 1,
 		'istable': 1,
diff --git a/stock/doctype/landed_cost_item/landed_cost_item.txt b/stock/doctype/landed_cost_item/landed_cost_item.txt
index 06f765d..268d890 100644
--- a/stock/doctype/landed_cost_item/landed_cost_item.txt
+++ b/stock/doctype/landed_cost_item/landed_cost_item.txt
@@ -13,7 +13,6 @@
 	# These values are common for all DocType
 	{
 		'colour': u'White:FFF',
-		'default_print_format': u'Standard',
 		'doctype': 'DocType',
 		'istable': 1,
 		'module': u'Stock',
diff --git a/stock/doctype/landed_cost_purchase_receipt/landed_cost_purchase_receipt.txt b/stock/doctype/landed_cost_purchase_receipt/landed_cost_purchase_receipt.txt
index ada4fef..ec80d7d 100644
--- a/stock/doctype/landed_cost_purchase_receipt/landed_cost_purchase_receipt.txt
+++ b/stock/doctype/landed_cost_purchase_receipt/landed_cost_purchase_receipt.txt
@@ -13,7 +13,6 @@
 	# These values are common for all DocType
 	{
 		'colour': u'White:FFF',
-		'default_print_format': u'Standard',
 		'doctype': 'DocType',
 		'istable': 1,
 		'module': u'Stock',
diff --git a/stock/doctype/landed_cost_wizard/landed_cost_wizard.txt b/stock/doctype/landed_cost_wizard/landed_cost_wizard.txt
index 0b91c94..d0659e1 100644
--- a/stock/doctype/landed_cost_wizard/landed_cost_wizard.txt
+++ b/stock/doctype/landed_cost_wizard/landed_cost_wizard.txt
@@ -14,7 +14,6 @@
 	{
 		'_last_update': u'1321441191',
 		'colour': u'White:FFF',
-		'default_print_format': u'Standard',
 		u'doctype': u'DocType',
 		'issingle': 1,
 		'module': u'Stock',
diff --git a/stock/doctype/purchase_receipt/purchase_receipt.txt b/stock/doctype/purchase_receipt/purchase_receipt.txt
index 4df9383..608d265 100755
--- a/stock/doctype/purchase_receipt/purchase_receipt.txt
+++ b/stock/doctype/purchase_receipt/purchase_receipt.txt
@@ -9,7 +9,6 @@
  {
   "is_submittable": 1, 
   "allow_attach": 1, 
-  "default_print_format": "Standard", 
   "search_fields": "status, posting_date, supplier", 
   "module": "Stock", 
   "doctype": "DocType", 
diff --git a/stock/doctype/purchase_receipt_item/purchase_receipt_item.txt b/stock/doctype/purchase_receipt_item/purchase_receipt_item.txt
index 1d2810f..d49dfa9 100755
--- a/stock/doctype/purchase_receipt_item/purchase_receipt_item.txt
+++ b/stock/doctype/purchase_receipt_item/purchase_receipt_item.txt
@@ -10,7 +10,6 @@
   "istable": 1, 
   "autoname": "GRND/.#######", 
   "name": "__common__", 
-  "default_print_format": "Standard", 
   "doctype": "DocType", 
   "module": "Stock"
  }, 
diff --git a/stock/doctype/serial_no/serial_no.txt b/stock/doctype/serial_no/serial_no.txt
index 79ba415..5a9f415 100644
--- a/stock/doctype/serial_no/serial_no.txt
+++ b/stock/doctype/serial_no/serial_no.txt
@@ -14,7 +14,6 @@
   "description": "Distinct unit of an Item", 
   "autoname": "field:serial_no", 
   "name": "__common__", 
-  "default_print_format": "Standard", 
   "allow_rename": 1, 
   "doctype": "DocType"
  }, 
diff --git a/stock/doctype/stock_entry/stock_entry.txt b/stock/doctype/stock_entry/stock_entry.txt
index 2473957..bcba4cd 100644
--- a/stock/doctype/stock_entry/stock_entry.txt
+++ b/stock/doctype/stock_entry/stock_entry.txt
@@ -21,7 +21,6 @@
   "hide_heading": 0, 
   "issingle": 0, 
   "name": "__common__", 
-  "default_print_format": "Standard", 
   "allow_rename": 0, 
   "doctype": "DocType", 
   "max_attachments": 0, 
diff --git a/stock/doctype/stock_entry_detail/stock_entry_detail.txt b/stock/doctype/stock_entry_detail/stock_entry_detail.txt
index 503dd5b..c191797 100644
--- a/stock/doctype/stock_entry_detail/stock_entry_detail.txt
+++ b/stock/doctype/stock_entry_detail/stock_entry_detail.txt
@@ -10,7 +10,6 @@
   "istable": 1, 
   "autoname": "MTND/.######", 
   "name": "__common__", 
-  "default_print_format": "Standard", 
   "doctype": "DocType", 
   "module": "Stock"
  }, 
diff --git a/stock/doctype/stock_ledger_entry/stock_ledger_entry.txt b/stock/doctype/stock_ledger_entry/stock_ledger_entry.txt
index 275cf30..6a5baf4 100644
--- a/stock/doctype/stock_ledger_entry/stock_ledger_entry.txt
+++ b/stock/doctype/stock_ledger_entry/stock_ledger_entry.txt
@@ -15,7 +15,6 @@
 		'_last_update': u'1322549701',
 		'autoname': u'SLE/.########',
 		'colour': u'White:FFF',
-		'default_print_format': u'Standard',
 		'doctype': 'DocType',
 		'hide_toolbar': 1,
 		'in_create': 1,
diff --git a/stock/doctype/stock_reconciliation/stock_reconciliation.txt b/stock/doctype/stock_reconciliation/stock_reconciliation.txt
index ac23d59..b788745 100644
--- a/stock/doctype/stock_reconciliation/stock_reconciliation.txt
+++ b/stock/doctype/stock_reconciliation/stock_reconciliation.txt
@@ -16,7 +16,6 @@
 		'allow_attach': 1,
 		'autoname': u'SR/.######',
 		'colour': u'White:FFF',
-		'default_print_format': u'Standard',
 		'doctype': 'DocType',
 		'is_submittable': 1,
 		'max_attachments': 1,
diff --git a/stock/doctype/warehouse/warehouse.txt b/stock/doctype/warehouse/warehouse.txt
index 428910b..21afd03 100644
--- a/stock/doctype/warehouse/warehouse.txt
+++ b/stock/doctype/warehouse/warehouse.txt
@@ -9,7 +9,6 @@
  {
   "autoname": "field:warehouse_name", 
   "description": "A logical Warehouse against which stock entries are made.", 
-  "default_print_format": "Standard", 
   "allow_rename": 1, 
   "search_fields": "warehouse_type", 
   "module": "Stock", 
diff --git a/support/doctype/customer_issue/customer_issue.txt b/support/doctype/customer_issue/customer_issue.txt
index cc03fff..9225eb3 100644
--- a/support/doctype/customer_issue/customer_issue.txt
+++ b/support/doctype/customer_issue/customer_issue.txt
@@ -10,7 +10,6 @@
   "is_submittable": 1, 
   "autoname": "naming_series:", 
   "name": "__common__", 
-  "default_print_format": "Standard", 
   "search_fields": "status,customer,customer_name,allocated_to,allocated_on, territory", 
   "module": "Support", 
   "doctype": "DocType"
diff --git a/support/doctype/maintenance_schedule/maintenance_schedule.txt b/support/doctype/maintenance_schedule/maintenance_schedule.txt
index 4662ce9..8061651 100644
--- a/support/doctype/maintenance_schedule/maintenance_schedule.txt
+++ b/support/doctype/maintenance_schedule/maintenance_schedule.txt
@@ -15,7 +15,6 @@
 		'_last_update': u'1322549701',
 		'autoname': u'MS.#####',
 		'colour': u'White:FFF',
-		'default_print_format': u'Standard',
 		'doctype': 'DocType',
 		'is_submittable': 1,
 		'module': u'Support',
diff --git a/support/doctype/maintenance_schedule_detail/maintenance_schedule_detail.txt b/support/doctype/maintenance_schedule_detail/maintenance_schedule_detail.txt
index 8dc9b91..0d24fd4 100644
--- a/support/doctype/maintenance_schedule_detail/maintenance_schedule_detail.txt
+++ b/support/doctype/maintenance_schedule_detail/maintenance_schedule_detail.txt
@@ -14,7 +14,6 @@
 	{
 		'autoname': u'MSD.#####',
 		'colour': u'White:FFF',
-		'default_print_format': u'Standard',
 		'doctype': 'DocType',
 		'istable': 1,
 		'module': u'Support',
diff --git a/support/doctype/maintenance_schedule_item/maintenance_schedule_item.txt b/support/doctype/maintenance_schedule_item/maintenance_schedule_item.txt
index 7e815f5..6800737 100644
--- a/support/doctype/maintenance_schedule_item/maintenance_schedule_item.txt
+++ b/support/doctype/maintenance_schedule_item/maintenance_schedule_item.txt
@@ -14,7 +14,6 @@
 	{
 		'autoname': u'IMD.#####',
 		'colour': u'White:FFF',
-		'default_print_format': u'Standard',
 		'doctype': 'DocType',
 		'istable': 1,
 		'module': u'Support',
diff --git a/support/doctype/maintenance_visit/maintenance_visit.txt b/support/doctype/maintenance_visit/maintenance_visit.txt
index 3b2cec9..070daf1 100644
--- a/support/doctype/maintenance_visit/maintenance_visit.txt
+++ b/support/doctype/maintenance_visit/maintenance_visit.txt
@@ -15,7 +15,6 @@
 		'_last_update': u'1322549701',
 		'autoname': u'MV.#####',
 		'colour': u'White:FFF',
-		'default_print_format': u'Standard',
 		'doctype': 'DocType',
 		'is_submittable': 1,
 		'module': u'Support',
diff --git a/support/doctype/support_ticket/support_ticket.txt b/support/doctype/support_ticket/support_ticket.txt
index fc0c575..b2bdadb 100644
--- a/support/doctype/support_ticket/support_ticket.txt
+++ b/support/doctype/support_ticket/support_ticket.txt
@@ -9,7 +9,6 @@
  {
   "autoname": "naming_series:", 
   "allow_attach": 1, 
-  "default_print_format": "Standard", 
   "search_fields": "status,customer,allocated_to,subject,raised_by", 
   "module": "Support", 
   "doctype": "DocType", 
diff --git a/utilities/doctype/address/address.txt b/utilities/doctype/address/address.txt
index 1ccfaa1..338ae88 100644
--- a/utilities/doctype/address/address.txt
+++ b/utilities/doctype/address/address.txt
@@ -15,7 +15,6 @@
 		'_last_update': u'1319016431',
 		'allow_trash': 1,
 		'colour': u'White:FFF',
-		'default_print_format': u'Standard',
 		'doctype': 'DocType',
 		'document_type': u'Master',
 		'in_dialog': 1,
diff --git a/utilities/doctype/contact/contact.txt b/utilities/doctype/contact/contact.txt
index e8813b5..6eb59c6 100644
--- a/utilities/doctype/contact/contact.txt
+++ b/utilities/doctype/contact/contact.txt
@@ -8,7 +8,6 @@
  }, 
  {
   "in_create": 0, 
-  "default_print_format": "Standard", 
   "doctype": "DocType", 
   "module": "Utilities", 
   "in_dialog": 0, 
diff --git a/utilities/doctype/gl_mapper_detail/gl_mapper_detail.txt b/utilities/doctype/gl_mapper_detail/gl_mapper_detail.txt
index a62d2e7..fadf1a2 100644
--- a/utilities/doctype/gl_mapper_detail/gl_mapper_detail.txt
+++ b/utilities/doctype/gl_mapper_detail/gl_mapper_detail.txt
@@ -14,7 +14,6 @@
 	{
 		'autoname': u'GLMDetail.#####',
 		'colour': u'White:FFF',
-		'default_print_format': u'Standard',
 		'doctype': 'DocType',
 		'istable': 1,
 		'module': u'Utilities',