1
0
forked from test/crm

fix: do not cached while reloading quick filters

This commit is contained in:
Shariq Ansari 2025-02-28 01:58:45 +05:30
parent 60fa705cac
commit 58523afbf3
2 changed files with 4 additions and 2 deletions

View File

@ -179,8 +179,8 @@ def get_doctype_fields_meta(DocField, doctype, allowed_fieldtypes, restricted_fi
@frappe.whitelist()
def get_quick_filters(doctype: str):
meta = frappe.get_meta(doctype)
def get_quick_filters(doctype: str, cached: bool = True):
meta = frappe.get_meta(doctype, cached)
fields = [field for field in meta.fields if field.in_standard_filter]
quick_filters = []

View File

@ -685,6 +685,8 @@ const updateQuickFilters = createResource({
url: 'crm.api.doc.update_quick_filters',
onSuccess() {
customizeQuickFilter.value = false
quickFilters.update({ params: { doctype: props.doctype, cached: false } })
quickFilters.reload()
createToast({