Merge pull request #23132 from anupamvs/item-group-filter-portal
fix: [Portal] added filter show in website
This commit is contained in:
commit
93dccd2eaa
@ -13,13 +13,15 @@ def get_field_filter_data():
|
|||||||
for f in fields:
|
for f in fields:
|
||||||
doctype = f.get_link_doctype()
|
doctype = f.get_link_doctype()
|
||||||
|
|
||||||
# apply enable/disable filter
|
# apply enable/disable/show_in_website filter
|
||||||
meta = frappe.get_meta(doctype)
|
meta = frappe.get_meta(doctype)
|
||||||
filters = {}
|
filters = {}
|
||||||
if meta.has_field('enabled'):
|
if meta.has_field('enabled'):
|
||||||
filters['enabled'] = 1
|
filters['enabled'] = 1
|
||||||
if meta.has_field('disabled'):
|
if meta.has_field('disabled'):
|
||||||
filters['disabled'] = 0
|
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)]
|
values = [d.name for d in frappe.get_all(doctype, filters)]
|
||||||
filter_data.append([f, values])
|
filter_data.append([f, values])
|
||||||
|
Loading…
Reference in New Issue
Block a user