fix: ignore virtual fields in filter UI (#34224)

This commit is contained in:
Raffael Meyer 2025-10-01 12:56:13 +02:00 committed by GitHub
parent 55328049c5
commit 29e2e0cf86
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -117,6 +117,10 @@ frappe.ui.FieldSelect = class FieldSelect {
// main table
var main_table_fields = std_filters.concat(frappe.meta.docfield_list[me.doctype]);
$.each(frappe.utils.sort(main_table_fields, "label", "string"), function (i, df) {
if (df.is_virtual) {
return;
}
let doctype =
frappe.get_meta(me.doctype).istable && me.parent_doctype
? me.parent_doctype
@ -128,7 +132,7 @@ frappe.ui.FieldSelect = class FieldSelect {
// child tables
$.each(me.table_fields, function (i, table_df) {
if (table_df.options) {
if (table_df.options && !table_df.is_virtual) {
let child_table_fields = [].concat(frappe.meta.docfield_list[table_df.options]);
if (table_df.fieldtype === "Table MultiSelect") {