Skip to content

Commit

Permalink
feat: add Payroll Entry to Bank Account dashboard (backport #2369) (#…
Browse files Browse the repository at this point in the history
…2371)

Co-authored-by: Raffael Meyer <[email protected]>
  • Loading branch information
mergify[bot] and barredterra authored Oct 31, 2024
1 parent 5ed555f commit b5e51f4
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
1 change: 1 addition & 0 deletions hrms/hooks.py
Original file line number Diff line number Diff line change
Expand Up @@ -258,6 +258,7 @@
"Task": "hrms.overrides.dashboard_overrides.get_dashboard_for_project",
"Project": "hrms.overrides.dashboard_overrides.get_dashboard_for_project",
"Timesheet": "hrms.overrides.dashboard_overrides.get_dashboard_for_timesheet",
"Bank Account": "hrms.overrides.dashboard_overrides.get_dashboard_for_bank_account",
}

# exempt linked doctypes from being automatically cancelled
Expand Down
9 changes: 9 additions & 0 deletions hrms/overrides/dashboard_overrides.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,3 +80,12 @@ def get_dashboard_for_project(data):
)

return data


def get_dashboard_for_bank_account(data):
for section in data["transactions"]:
if section.get("label") == "Transactions":
section["items"].append("Payroll Entry")
break

return data

0 comments on commit b5e51f4

Please sign in to comment.