fix: Don't show no value type fields in options for custom columns (#7497)
* fix: Don't show no value type fields in options for custom columns * fix: Use filter instead of pushing in list
This commit is contained in:
parent
e694c73c53
commit
f01f36b6e5
1 changed files with 4 additions and 2 deletions
|
|
@ -992,9 +992,11 @@ frappe.views.QueryReport = class QueryReport extends frappe.views.BaseList {
|
|||
change: () => {
|
||||
let doctype = d.get_value('doctype');
|
||||
frappe.model.with_doctype(doctype, () => {
|
||||
let fields = frappe.meta.get_docfields(doctype)
|
||||
let options = frappe.meta.get_docfields(doctype)
|
||||
.filter(frappe.model.is_value_type)
|
||||
.map(df => ({ label: df.label, value: df.fieldname }));
|
||||
d.set_df_property('field', 'options', fields);
|
||||
|
||||
d.set_df_property('field', 'options', options);
|
||||
|
||||
});
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue