diff --git a/erpnext/assets/doctype/location/location.py b/erpnext/assets/doctype/location/location.py index 0d87bb2bf4d..5bff3dd8c99 100644 --- a/erpnext/assets/doctype/location/location.py +++ b/erpnext/assets/doctype/location/location.py @@ -200,11 +200,11 @@ def get_children(doctype, parent=None, location=None, is_root=False): name as value, is_group as expandable from - `tab{doctype}` comp + `tabLocation` comp where ifnull(parent_location, "")={parent} """.format( - doctype=doctype, parent=frappe.db.escape(parent) + parent=frappe.db.escape(parent) ), as_dict=1, ) diff --git a/erpnext/hr/doctype/department/department.py b/erpnext/hr/doctype/department/department.py index a9806c529f6..d4834add02b 100644 --- a/erpnext/hr/doctype/department/department.py +++ b/erpnext/hr/doctype/department/department.py @@ -70,11 +70,11 @@ def get_children(doctype, parent=None, company=None, is_root=False): select name as value, is_group as expandable - from `tab{doctype}` + from `tabDepartment` where {condition} order by name""".format( - doctype=doctype, condition=condition + condition=condition ), var_dict, as_dict=1, diff --git a/erpnext/quality_management/doctype/quality_procedure/quality_procedure.py b/erpnext/quality_management/doctype/quality_procedure/quality_procedure.py index 72f9e6d6e44..e8604080fbf 100644 --- a/erpnext/quality_management/doctype/quality_procedure/quality_procedure.py +++ b/erpnext/quality_management/doctype/quality_procedure/quality_procedure.py @@ -79,7 +79,7 @@ def get_children(doctype, parent=None, parent_quality_procedure=None, is_root=Fa ] else: return frappe.get_all( - doctype, + "Quality Procedure", fields=["name as value", "is_group as expandable"], filters=dict(parent_quality_procedure=parent), order_by="name asc", diff --git a/erpnext/setup/doctype/company/company.py b/erpnext/setup/doctype/company/company.py index ee39d3a4ac5..51bae6091bd 100644 --- a/erpnext/setup/doctype/company/company.py +++ b/erpnext/setup/doctype/company/company.py @@ -611,11 +611,11 @@ def get_children(doctype, parent=None, company=None, is_root=False): name as value, is_group as expandable from - `tab{doctype}` comp + `tabCompany` comp where ifnull(parent_company, "")={parent} """.format( - doctype=doctype, parent=frappe.db.escape(parent) + parent=frappe.db.escape(parent) ), as_dict=1, )