fix(list_view): use more filter type values to set value on new entry

This commit is contained in:
Tarun Pratap Singh 2025-03-07 15:55:37 +05:30
parent 38fd079be5
commit 2012c5478f

View file

@ -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];
}
});