fix: Dimension filter query fix to avoid including disabled dimensions (#26988) (#27006)

* reverting ot v12.7.1

* fix: Dimension filter query fix to not display disabled dimensions

Co-authored-by: Subin Tom <subin-home@Subins-MacBook-Air.local>
Co-authored-by: Afshan <33727827+AfshanKhan@users.noreply.github.com>
(cherry picked from commit 333e44eb47)

Co-authored-by: Subin Tom <36098155+nemesis189@users.noreply.github.com>
Co-authored-by: Afshan <33727827+AfshanKhan@users.noreply.github.com>
This commit is contained in:
Frappe PR Bot
2021-08-18 18:46:25 +05:30
committed by GitHub
parent 77ad668a6f
commit 6a35d580e4

View File

@@ -526,6 +526,9 @@ def get_filtered_dimensions(doctype, txt, searchfield, start, page_len, filters)
if meta.is_tree:
query_filters.append(['is_group', '=', 0])
if meta.has_field('disabled'):
query_filters.append(['disabled', '!=', 1])
if meta.has_field('company'):
query_filters.append(['company', '=', filters.get('company')])