fix: review changes
diff --git a/erpnext/quality_management/doctype/quality_procedure/quality_procedure.json b/erpnext/quality_management/doctype/quality_procedure/quality_procedure.json
index b6be5d0..1ed921c 100644
--- a/erpnext/quality_management/doctype/quality_procedure/quality_procedure.json
+++ b/erpnext/quality_management/doctype/quality_procedure/quality_procedure.json
@@ -18,7 +18,6 @@
],
"fields": [
{
- "depends_on": "eval: doc.is_group == 0",
"fieldname": "parent_quality_procedure",
"fieldtype": "Link",
"label": "Parent Procedure",
@@ -73,7 +72,7 @@
],
"is_tree": 1,
"links": [],
- "modified": "2020-09-22 14:22:49.874515",
+ "modified": "2020-10-13 11:46:07.744194",
"modified_by": "Administrator",
"module": "Quality Management",
"name": "Quality Procedure",
diff --git a/erpnext/quality_management/doctype/quality_procedure/quality_procedure.py b/erpnext/quality_management/doctype/quality_procedure/quality_procedure.py
index 1952e57..797c26b 100644
--- a/erpnext/quality_management/doctype/quality_procedure/quality_procedure.py
+++ b/erpnext/quality_management/doctype/quality_procedure/quality_procedure.py
@@ -4,7 +4,7 @@
from __future__ import unicode_literals
import frappe
-from frappe.utils.nestedset import NestedSet
+from frappe.utils.nestedset import NestedSet, rebuild_tree
from frappe import _
class QualityProcedure(NestedSet):
@@ -42,6 +42,8 @@
doc.save(ignore_permissions=True)
def set_parent(self):
+ rebuild_tree('Quality Procedure', 'parent_quality_procedure')
+
for process in self.processes:
# Set parent for only those children who don't have a parent
parent_quality_procedure = frappe.db.get_value("Quality Procedure", process.procedure, "parent_quality_procedure")