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:
commit
424d98980b
1 changed files with 4 additions and 1 deletions
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue