Dont show single doctypes in permitted_documents_for_users_filters
This commit is contained in:
parent
6073da3e79
commit
bf07c86b9d
1 changed files with 3 additions and 1 deletions
|
|
@ -44,9 +44,11 @@ def query_doctypes(doctype, txt, searchfield, start, page_len, filters):
|
|||
user_obj.build_permissions()
|
||||
can_read = user_obj.can_read
|
||||
|
||||
single_doctypes = [d[0] for d in frappe.db.get_values("DocType", {"issingle": 1})]
|
||||
|
||||
out = []
|
||||
for dt in can_read:
|
||||
if txt.lower().replace("%", "") in dt.lower():
|
||||
if txt.lower().replace("%", "") in dt.lower() and dt not in single_doctypes:
|
||||
out.append([dt])
|
||||
|
||||
return out
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue