[fix] [minor] set send_print_in_body_and_attachment in email settings
diff --git a/hr/doctype/earning_type/earning_type.txt b/hr/doctype/earning_type/earning_type.txt
index 0c84cf1..905bbd8 100644
--- a/hr/doctype/earning_type/earning_type.txt
+++ b/hr/doctype/earning_type/earning_type.txt
@@ -2,7 +2,7 @@
  {
   "creation": "2013-01-24 11:03:32", 
   "docstatus": 0, 
-  "modified": "2013-07-22 15:25:26", 
+  "modified": "2013-12-06 15:16:11", 
   "modified_by": "Administrator", 
   "owner": "Administrator"
  }, 
@@ -85,7 +85,7 @@
   "doctype": "DocField", 
   "fieldname": "exemption_limit", 
   "fieldtype": "Float", 
-  "hidden": 1, 
+  "hidden": 0, 
   "label": "Exemption Limit", 
   "oldfieldname": "exemption_limit", 
   "oldfieldtype": "Currency"
diff --git a/manufacturing/doctype/bom/bom.txt b/manufacturing/doctype/bom/bom.txt
index 68553fb..1878f25 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-12-04 11:51:36", 
+  "modified": "2013-12-06 18:48:23", 
   "modified_by": "Administrator", 
   "owner": "Administrator"
  }, 
@@ -120,18 +120,20 @@
   "options": "Price List"
  }, 
  {
-  "depends_on": "with_operations", 
+  "description": "Specify the operations, operating cost and give a unique Operation no to your operations.", 
   "doctype": "DocField", 
   "fieldname": "operations", 
   "fieldtype": "Section Break", 
+  "hidden": 0, 
   "label": "Operations", 
-  "oldfieldtype": "Section Break", 
-  "options": "Specify the operations, operating cost and give a unique Operation no to your operations."
+  "oldfieldtype": "Section Break"
  }, 
  {
+  "depends_on": "with_operations", 
   "doctype": "DocField", 
   "fieldname": "bom_operations", 
   "fieldtype": "Table", 
+  "hidden": 0, 
   "label": "BOM Operations", 
   "oldfieldname": "bom_operations", 
   "oldfieldtype": "Table", 
diff --git a/patches/december_2013/p01_email_settings_set_send_print_in_body_and_attachment.py b/patches/december_2013/p01_email_settings_set_send_print_in_body_and_attachment.py
index 7b7e7fb..1a11f57 100644
--- a/patches/december_2013/p01_email_settings_set_send_print_in_body_and_attachment.py
+++ b/patches/december_2013/p01_email_settings_set_send_print_in_body_and_attachment.py
@@ -5,6 +5,13 @@
 import webnotes
 
 def execute():
+	doctype = webnotes.conn.sql("""select doctype from `tabSingles` 
+		where doctype = 'Email Settings'""")
+	if not doctype:
+		email_settings = webnotes.bean("Email Settings", "Email Settings")
+		email_settings.doc.send_print_in_body_and_attachment = 1
+		email_settings.save()
+
 	webnotes.conn.sql("""update `tabSingles` set value = 1 
 		where doctype = 'Email Settings' and field = 'send_print_in_body_and_attachment' and 
 		ifnull(value,'')=''""")
\ No newline at end of file
diff --git a/setup/doctype/email_settings/email_settings.txt b/setup/doctype/email_settings/email_settings.txt
index 3689718..6b28f10 100644
--- a/setup/doctype/email_settings/email_settings.txt
+++ b/setup/doctype/email_settings/email_settings.txt
@@ -2,7 +2,7 @@
  {
   "creation": "2013-03-25 17:53:21", 
   "docstatus": 0, 
-  "modified": "2013-11-28 11:54:42", 
+  "modified": "2013-12-06 13:12:25", 
   "modified_by": "Administrator", 
   "owner": "Administrator"
  }, 
@@ -103,6 +103,7 @@
   "label": "Auto Email Id"
  }, 
  {
+  "default": "1", 
   "description": "If checked, an email with an attached HTML format will be added to part of the EMail body as well as attachment. To only send as attachment, uncheck this.", 
   "doctype": "DocField", 
   "fieldname": "send_print_in_body_and_attachment", 
diff --git a/stock/doctype/delivery_note/delivery_note.txt b/stock/doctype/delivery_note/delivery_note.txt
index 7fb166e..b94310e 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-11-03 14:20:19", 
+  "modified": "2013-12-06 15:15:49", 
   "modified_by": "Administrator", 
   "owner": "Administrator"
  }, 
@@ -229,7 +229,7 @@
   "doctype": "DocField", 
   "fieldname": "po_date", 
   "fieldtype": "Date", 
-  "hidden": 1, 
+  "hidden": 0, 
   "label": "Customer's Purchase Order Date", 
   "no_copy": 0, 
   "oldfieldname": "po_date", 
diff --git a/stock/doctype/stock_entry/stock_entry.js b/stock/doctype/stock_entry/stock_entry.js
index ed41d7d..440a9a3 100644
--- a/stock/doctype/stock_entry/stock_entry.js
+++ b/stock/doctype/stock_entry/stock_entry.js
@@ -244,7 +244,7 @@
 
 cur_frm.cscript.toggle_related_fields = function(doc) {
 	disable_from_warehouse = inList(["Material Receipt", "Sales Return"], doc.purpose);
-	disable_to_warehouse = inList(["Material Issue", "Purchase Return"], doc.purpose)
+	disable_to_warehouse = inList(["Material Issue", "Purchase Return"], doc.purpose);
 	
 	cur_frm.toggle_enable("from_warehouse", !disable_from_warehouse);
 	cur_frm.toggle_enable("to_warehouse", !disable_to_warehouse);
@@ -302,7 +302,7 @@
 }
 
 cur_frm.cscript.purpose = function(doc, cdt, cdn) {
-	cur_frm.cscript.toggle_related_fields(doc, cdt, cdn);
+	cur_frm.cscript.toggle_related_fields(doc);
 }
 
 // Overloaded query for link batch_no
diff --git a/stock/doctype/stock_entry/stock_entry.txt b/stock/doctype/stock_entry/stock_entry.txt
index ca9b5f2..a63f8a4 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-11-03 14:11:42", 
+  "modified": "2013-12-06 15:15:25", 
   "modified_by": "Administrator", 
   "owner": "Administrator"
  }, 
@@ -108,7 +108,7 @@
   "doctype": "DocField", 
   "fieldname": "delivery_note_no", 
   "fieldtype": "Link", 
-  "hidden": 1, 
+  "hidden": 0, 
   "in_filter": 0, 
   "label": "Delivery Note No", 
   "no_copy": 1, 
@@ -126,7 +126,7 @@
   "doctype": "DocField", 
   "fieldname": "sales_invoice_no", 
   "fieldtype": "Link", 
-  "hidden": 1, 
+  "hidden": 0, 
   "label": "Sales Invoice No", 
   "no_copy": 1, 
   "options": "Sales Invoice", 
@@ -139,7 +139,7 @@
   "doctype": "DocField", 
   "fieldname": "purchase_receipt_no", 
   "fieldtype": "Link", 
-  "hidden": 1, 
+  "hidden": 0, 
   "in_filter": 0, 
   "label": "Purchase Receipt No", 
   "no_copy": 1, 
@@ -299,7 +299,7 @@
   "doctype": "DocField", 
   "fieldname": "production_order", 
   "fieldtype": "Link", 
-  "hidden": 1, 
+  "hidden": 0, 
   "in_filter": 1, 
   "label": "Production Order", 
   "no_copy": 0,