Merge pull request #35771 from arshadqureshi93/fix-readonly-field-filter-population

fix(list_view): prevent filters from populating read-only fields
This commit is contained in:
Ejaaz Khan 2026-01-22 18:04:03 +05:30 committed by GitHub
commit 424d98980b
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -312,7 +312,10 @@ frappe.views.ListView = class ListView extends frappe.views.BaseList {
];
this.filter_area.get().forEach((f) => {
if (allowed_filter_types.includes(f[2]) && frappe.model.is_non_std_field(f[1])) {
options[f[1]] = f[3];
const df = frappe.meta.get_field(doctype, f[1]);
if (df && !df.read_only) {
options[f[1]] = f[3];
}
}
});
frappe.new_doc(doctype, options);