Skip to content

Commit

Permalink
Merge pull request #573 from shariquerik/hide-field-in-list
Browse files Browse the repository at this point in the history
  • Loading branch information
shariquerik authored Feb 3, 2025
2 parents 6a16eca + f5144f4 commit 680218a
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions crm/api/doc.py
Original file line number Diff line number Diff line change
Expand Up @@ -255,6 +255,8 @@ def get_data(
if hasattr(_list, "default_list_data"):
default_rows = _list.default_list_data().get("rows")

meta = frappe.get_meta(doctype)

if view_type != "kanban":
if columns or rows:
custom_view = True
Expand Down Expand Up @@ -296,6 +298,11 @@ def get_data(
if column.get("key") == "_liked_by" and column.get("width") == "10rem":
column["width"] = "50px"

# remove column if column.hidden is True
column_meta = meta.get_field(column.get("key"))
if column_meta and column_meta.get("hidden"):
columns.remove(column)

# check if rows has group_by_field if not add it
if group_by_field and group_by_field not in rows:
rows.append(group_by_field)
Expand Down

0 comments on commit 680218a

Please sign in to comment.