Merge remote-tracking branch 'frappe/develop' into dev_hra
diff --git a/erpnext/docs/assets/img/setup/workflow-6.png b/erpnext/docs/assets/img/setup/workflow-6.png
new file mode 100644
index 0000000..a13d17c
--- /dev/null
+++ b/erpnext/docs/assets/img/setup/workflow-6.png
Binary files differ
diff --git a/erpnext/docs/assets/img/setup/workflow-actions-email.png b/erpnext/docs/assets/img/setup/workflow-actions-email.png
new file mode 100644
index 0000000..0fe3bca
--- /dev/null
+++ b/erpnext/docs/assets/img/setup/workflow-actions-email.png
Binary files differ
diff --git a/erpnext/docs/assets/img/setup/workflow-actions-list.png b/erpnext/docs/assets/img/setup/workflow-actions-list.png
new file mode 100644
index 0000000..cb8ccc2
--- /dev/null
+++ b/erpnext/docs/assets/img/setup/workflow-actions-list.png
Binary files differ
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/docs/user/manual/en/setting-up/workflows.md b/erpnext/docs/user/manual/en/setting-up/workflows.md
index 5d037d2..058f537 100644
--- a/erpnext/docs/user/manual/en/setting-up/workflows.md
+++ b/erpnext/docs/user/manual/en/setting-up/workflows.md
@@ -42,6 +42,14 @@
> Note 4: If you wish to give the option to cancel, you will have to write a
workflow transition step that says from submitted you can cancel.
+
+#### Enable/Disable Self approval
+
+> New in Version 11
+
+<img class="screenshot" alt="Workflow" src="{{docs_base_url}}/assets/img/setup/workflow-6.png">
+
+
#### Conditions
> New in Version 11
@@ -71,6 +79,22 @@
<img class="screenshot" alt="Workflow" src="{{docs_base_url}}/assets/img/setup/workflow-5.png">
+#### Workflow Actions
+
+> New in Version 11
+
+Workflow Actions is a single place to manage all the pending actions you can take on Workflows.
+
+If a User is eligible to take action on some workflows, emails will be sent to the user, with the relevant document as attachment, from where the user can `Approve` or `Reject` the Workflow.
+<img class="screenshot" alt="Workflow" src="{{docs_base_url}}/assets/img/setup/workflow-actions-email.png">
+
+Also the users will see entries in their Workflow Action list.
+<img class="screenshot" alt="Workflow" src="{{docs_base_url}}/assets/img/setup/workflow-actions-list.png">
+
+**Note:** You can set email template for Workflow Actions on each state.
+The template might consist message for users to proceed with the next Workflow Actions
+
+
### Video Tutorial:
<div>
@@ -81,3 +105,4 @@
</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/hr/doctype/payroll_entry/payroll_entry.py b/erpnext/hr/doctype/payroll_entry/payroll_entry.py
index aa27e5b..e70a5bd 100644
--- a/erpnext/hr/doctype/payroll_entry/payroll_entry.py
+++ b/erpnext/hr/doctype/payroll_entry/payroll_entry.py
@@ -184,7 +184,7 @@
Get loan details from submitted salary slip based on selected criteria
"""
cond = self.get_filter_condition()
- return frappe.db.sql(""" select eld.loan_account, eld.loan
+ return frappe.db.sql(""" select eld.loan_account, eld.loan,
eld.interest_income_account, eld.principal_amount, eld.interest_amount, eld.total_payment
from
`tabSalary Slip` t1, `tabSalary Slip Loan` eld
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')))