mirror of
https://github.com/frappe/erpnext.git
synced 2026-04-27 02:28:30 +00:00
chore: hardcode doctype
This commit is contained in:
@@ -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,
|
||||
)
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -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",
|
||||
|
||||
@@ -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,
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user