chore: hardcode doctype
diff --git a/erpnext/assets/doctype/location/location.py b/erpnext/assets/doctype/location/location.py
index 0d87bb2..5bff3dd 100644
--- a/erpnext/assets/doctype/location/location.py
+++ b/erpnext/assets/doctype/location/location.py
@@ -200,11 +200,11 @@
 			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/quality_management/doctype/quality_procedure/quality_procedure.py b/erpnext/quality_management/doctype/quality_procedure/quality_procedure.py
index 72f9e6d..e860408 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 @@
 		]
 	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 875f63d..d6f2378 100644
--- a/erpnext/setup/doctype/company/company.py
+++ b/erpnext/setup/doctype/company/company.py
@@ -689,11 +689,11 @@
 			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,
 	)
diff --git a/erpnext/setup/doctype/department/department.py b/erpnext/setup/doctype/department/department.py
index c4766ee..1745178 100644
--- a/erpnext/setup/doctype/department/department.py
+++ b/erpnext/setup/doctype/department/department.py
@@ -63,7 +63,7 @@
 	else:
 		filters["parent_department"] = parent
 
-	return frappe.get_all(doctype, fields=fields, filters=filters, order_by="name")
+	return frappe.get_all("Department", fields=fields, filters=filters, order_by="name")
 
 
 @frappe.whitelist()