fix: added filter show in website for filtering product

This commit is contained in:
Anupam K 2020-08-25 08:59:37 +05:30
parent 38cabbd4b8
commit 28f4417fc5

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])