Merge pull request #14267 from surajshetty3416/workflow-doc-changes

Add doc related to workflow action
diff --git a/erpnext/docs/user/manual/en/education/Attendance/student-attendance-tool.md b/erpnext/docs/user/manual/en/education/Attendance/student-attendance-tool.md
index 9d3d82a..0425072 100644
--- a/erpnext/docs/user/manual/en/education/Attendance/student-attendance-tool.md
+++ b/erpnext/docs/user/manual/en/education/Attendance/student-attendance-tool.md
@@ -2,13 +2,13 @@
 
 The Student Attendance tool allow you to bulk update the attendance for students based on **Student Group and Course Schedule**.
 
-To mark the **Attedance* based on Student Group select the group based on 
+To mark the **Attedance* based on Student Group select the group based on
 
 **1. Batch
   2. Course
   3. Activity **
 
-Student detials will be autofetched and you can mark the attendance of the given date. 
+Student detials will be autofetched and you can mark the attendance of the given date.
 
 <img class="screenshot" alt="Student Attendance" src="{{docs_base_url}}/assets/img/education/setup/student-attendance-tool.gif">
 
diff --git a/erpnext/docs/user/manual/en/education/index.md b/erpnext/docs/user/manual/en/education/index.md
index ff505f0..4f96b79 100644
--- a/erpnext/docs/user/manual/en/education/index.md
+++ b/erpnext/docs/user/manual/en/education/index.md
@@ -1,7 +1,7 @@
 <!-- add-breadcrumbs -->
 # ERPNext for Education
 
-The Education domain in ERPNext is designed to meet requirements of any organization which imparts knowledge and believe in doing it in an organized fashion. It has already been used at the schools, colleges and even at the private firms. 
+The Education domain in ERPNext is designed to meet requirements of any organization which imparts knowledge and believe in doing it in an organized fashion. It has already been used at the schools, colleges and even at the private firms.
 
 It helps you effectively manage administrative side and allows you to focus on what is most important for your institute, **to educate!**
 
@@ -32,7 +32,7 @@
         <iframe src='https://www.youtube.com/embed/t8ZDDq4qtIk?end=52' frameborder='0' allowfullscreen>
         </iframe>
     </div>
-<div>
+</div>
 
 ### User Manual
 
diff --git a/erpnext/docs/user/manual/en/healthcare/index.md b/erpnext/docs/user/manual/en/healthcare/index.md
index 62e537d..7755158 100755
--- a/erpnext/docs/user/manual/en/healthcare/index.md
+++ b/erpnext/docs/user/manual/en/healthcare/index.md
@@ -19,7 +19,7 @@
         <iframe src='https://www.youtube.com/embed/1n4_YqX8ArA' frameborder='0' allowfullscreen>
         </iframe>
     </div>
-<div>
+</div>
 
 ### User Manual
 
diff --git a/erpnext/docs/user/manual/en/non_profit/index.md b/erpnext/docs/user/manual/en/non_profit/index.md
index 819cf79..db1fbe4 100644
--- a/erpnext/docs/user/manual/en/non_profit/index.md
+++ b/erpnext/docs/user/manual/en/non_profit/index.md
@@ -21,7 +21,7 @@
         <iframe src='https://www.youtube.com/embed/p3l0Kq-TU5Y' frameborder='0' allowfullscreen>
         </iframe>
     </div>
-<div>
+</div>
 
 ### User Manual
 
diff --git a/erpnext/docs/user/manual/en/setting-up/setting-up-taxes.md b/erpnext/docs/user/manual/en/setting-up/setting-up-taxes.md
index 2886c05..cf688c7 100644
--- a/erpnext/docs/user/manual/en/setting-up/setting-up-taxes.md
+++ b/erpnext/docs/user/manual/en/setting-up/setting-up-taxes.md
@@ -102,7 +102,7 @@
   <div class="embed-container">
     <iframe src="https://www.youtube.com/embed/a8Eh4zLIrkU?rel=0" frameborder="0" allow="autoplay; encrypted-media" allowfullscreen>
     </iframe>
-  <div> 
+  </div>
 </div>
 
 {next}
diff --git a/erpnext/hr/doctype/department/department.py b/erpnext/hr/doctype/department/department.py
index 063ed05..09cd6d3 100644
--- a/erpnext/hr/doctype/department/department.py
+++ b/erpnext/hr/doctype/department/department.py
@@ -3,7 +3,6 @@
 
 from __future__ import unicode_literals
 import frappe
-from frappe import _
 from frappe.utils.nestedset import NestedSet, get_root_of
 from erpnext.utilities.transaction_base import delete_events
 from frappe.model.document import Document
@@ -12,7 +11,8 @@
 	nsm_parent_field = 'parent_department'
 
 	def autoname(self):
-		if self.department_name != get_root_of("Department"):
+		root = get_root_of("Department")
+		if root and self.department_name != root:
 			abbr = frappe.db.get_value('Company', self.company, 'abbr')
 			self.name = '{0} - {1}'.format(self.department_name, abbr)
 		else:
diff --git a/erpnext/patches/v11_0/rename_supplier_type_to_supplier_group.py b/erpnext/patches/v11_0/rename_supplier_type_to_supplier_group.py
index e9c81bf..1735c12 100644
--- a/erpnext/patches/v11_0/rename_supplier_type_to_supplier_group.py
+++ b/erpnext/patches/v11_0/rename_supplier_type_to_supplier_group.py
@@ -25,13 +25,11 @@
 		where is_group = 0""".format(_('All Supplier Groups')))
 
 	if not frappe.db.exists("Supplier Group", _('All Supplier Groups')):
-		supplier_group = frappe.get_doc({
+		frappe.get_doc({
 			'doctype': 'Supplier Group',
 			'supplier_group_name': _('All Supplier Groups'),
 			'is_group': 1,
 			'parent_supplier_group': ''
-		})
-		supplier_group.flags.ignore_validate=True
-		supplier_group.insert(ignore_permissions=True)
+		}).insert(ignore_permissions=True)
 
 	rebuild_tree("Supplier Group", "parent_supplier_group")
diff --git a/erpnext/patches/v11_0/update_department_lft_rgt.py b/erpnext/patches/v11_0/update_department_lft_rgt.py
index 533055a..0cb9aec 100644
--- a/erpnext/patches/v11_0/update_department_lft_rgt.py
+++ b/erpnext/patches/v11_0/update_department_lft_rgt.py
@@ -5,15 +5,12 @@
 def execute():
 	""" assign lft and rgt appropriately """
 	frappe.reload_doc("hr", "doctype", "department")
-
 	if not frappe.db.exists("Department", _('All Departments')):
-		dept = frappe.get_doc({
+		frappe.get_doc({
 			'doctype': 'Department',
 			'department_name': _('All Departments'),
 			'is_group': 1
-		})
-		dept.flags.ignore_validate=True
-		dept.insert(ignore_permissions=True)
+		}).insert(ignore_permissions=True)
 
 	frappe.db.sql("""update `tabDepartment` set parent_department = '{0}'
 		where is_group = 0""".format(_('All Departments')))