Merge pull request #23132 from anupamvs/item-group-filter-portal

fix: [Portal] added filter show in website
This commit is contained in:
rohitwaghchaure 2020-09-08 17:03:54 +05:30 committed by GitHub
commit 93dccd2eaa
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -13,13 +13,15 @@ def get_field_filter_data():
for f in fields:
doctype = f.get_link_doctype()
# apply enable/disable filter
# apply enable/disable/show_in_website filter
meta = frappe.get_meta(doctype)
filters = {}
if meta.has_field('enabled'):
filters['enabled'] = 1
if meta.has_field('disabled'):
filters['disabled'] = 0
if meta.has_field('show_in_website'):
filters['show_in_website'] = 1
values = [d.name for d in frappe.get_all(doctype, filters)]
filter_data.append([f, values])