From 2012c5478f45d5a36ce611ee5af83f3c0665bf49 Mon Sep 17 00:00:00 2001 From: Tarun Pratap Singh Date: Fri, 7 Mar 2025 15:55:37 +0530 Subject: [PATCH] fix(list_view): use more filter type values to set value on new entry --- frappe/public/js/frappe/list/list_view.js | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/frappe/public/js/frappe/list/list_view.js b/frappe/public/js/frappe/list/list_view.js index 7237485af3..e2989ef8b2 100644 --- a/frappe/public/js/frappe/list/list_view.js +++ b/frappe/public/js/frappe/list/list_view.js @@ -294,8 +294,14 @@ frappe.views.ListView = class ListView extends frappe.views.BaseList { make_new_doc() { const doctype = this.doctype; const options = {}; + const allowed_filter_types = [ + "=", + "descendants of (inclusive)", + "descendants of", + "ancestors of", + ]; this.filter_area.get().forEach((f) => { - if (f[2] === "=" && frappe.model.is_non_std_field(f[1])) { + if (allowed_filter_types.includes(f[2]) && frappe.model.is_non_std_field(f[1])) { options[f[1]] = f[3]; } });