Merge pull request #31581 from tarunps/fix/use-more-filter-types

fix(list_view): use more filter type values to set value on new entry
This commit is contained in:
Ejaaz Khan 2025-03-10 12:05:31 +05:30 committed by GitHub
commit 1c3ec9bf81
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

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