Merge branch 'master' of github.com:webnotes/erpnext
diff --git a/erpnext/patches/patch.py b/erpnext/patches/patch.py
index 876c512..384a994 100644
--- a/erpnext/patches/patch.py
+++ b/erpnext/patches/patch.py
@@ -1,7 +1,7 @@
 # REMEMBER to update this
 # ========================
 
-last_patch = 355
+last_patch = 358
 
 #-------------------------------------------
 
@@ -251,6 +251,8 @@
 		reload_doc('stock','doctype','item_customer_detail')
 	elif patch_no == 344:
 		sql("delete from `tabDocFormat` where ifnull(format, '') = '' and parent = 'Delivery Note'")
+		reload_doc('stock', 'doctype', 'delivery_note_detail')
+		reload_doc('stock', 'doctype', 'item_customer_detail')
 	elif patch_no == 345:
 		# rerun 343 (merge confict)
 		reload_doc('stock','doctype','item_customer_detail')
@@ -303,4 +305,11 @@
 	elif patch_no == 355:
 		reload_doc('hr', 'doctype', 'salary_slip')
 		delete_doc('DocType', 'Salary Control Panel')
-
+	elif patch_no == 356:
+		reload_doc('core', 'doctype', 'doctype')
+		sql("update `tabDocType` set default_print_format = 'Standard' where name = 'Delivery Note'")
+	elif patch_no == 357:
+		sql("delete from `tabDocField` where (fieldname in ('client_string', 'server_code_error', 'server_code_compiled', 'server_code', 'server_code_core', 'client_script', 'client_script_core', 'dt_template', 'change_log') or label = 'Template') and parent = 'DocType'")
+	elif patch_no == 358:
+		reload_doc('stock', 'doctype', 'delivery_note')
+		reload_doc('stock', 'doctype', 'delivery_note_detail')