From 3e9fee709996b77be7b26a785913b64b6e9bc1e0 Mon Sep 17 00:00:00 2001 From: iamkhanraheel Date: Tue, 24 Mar 2026 17:55:56 +0530 Subject: [PATCH 01/13] fix: default permission for HR User role --- .../employee_onboarding/employee_onboarding.json | 9 ++++++++- .../employee_onboarding_template.json | 12 ++++++++++-- .../employee_skill_map/employee_skill_map.json | 12 ++++++++++-- hrms/hr/doctype/exit_interview/exit_interview.json | 10 ++++++++-- .../expense_claim_type/expense_claim_type.json | 9 +++++++-- .../job_offer_term_template.json | 9 +++++++-- .../job_opening_template/job_opening_template.json | 6 +++++- hrms/hr/doctype/job_requisition/job_requisition.json | 9 +++++++-- hrms/hr/doctype/overtime_type/overtime_type.json | 6 +++++- hrms/hr/doctype/skill/skill.json | 9 +++++++-- hrms/hr/doctype/training_event/training_event.json | 11 +++++++++-- .../doctype/training_feedback/training_feedback.json | 11 +++++++++-- .../doctype/training_program/training_program.json | 11 +++++++++-- hrms/hr/doctype/training_result/training_result.json | 12 ++++++++++-- .../employee_benefit_ledger.json | 7 ++++++- 15 files changed, 117 insertions(+), 26 deletions(-) diff --git a/hrms/hr/doctype/employee_onboarding/employee_onboarding.json b/hrms/hr/doctype/employee_onboarding/employee_onboarding.json index 56546cb5f0..584be2da0f 100644 --- a/hrms/hr/doctype/employee_onboarding/employee_onboarding.json +++ b/hrms/hr/doctype/employee_onboarding/employee_onboarding.json @@ -174,7 +174,7 @@ ], "is_submittable": 1, "links": [], - "modified": "2026-02-05 13:46:25.874832", + "modified": "2026-03-24 17:13:19.990319", "modified_by": "Administrator", "module": "HR", "name": "Employee Onboarding", @@ -207,6 +207,13 @@ "share": 1, "submit": 1, "write": 1 + }, + { + "create": 1, + "read": 1, + "report": 1, + "role": "HR User", + "write": 1 } ], "row_format": "Dynamic", diff --git a/hrms/hr/doctype/employee_onboarding_template/employee_onboarding_template.json b/hrms/hr/doctype/employee_onboarding_template/employee_onboarding_template.json index 29cbc9a884..99acf7add6 100644 --- a/hrms/hr/doctype/employee_onboarding_template/employee_onboarding_template.json +++ b/hrms/hr/doctype/employee_onboarding_template/employee_onboarding_template.json @@ -68,7 +68,7 @@ } ], "links": [], - "modified": "2024-03-27 13:09:40.119200", + "modified": "2026-03-24 17:11:10.175908", "modified_by": "Administrator", "module": "HR", "name": "Employee Onboarding Template", @@ -85,12 +85,20 @@ "role": "System Manager", "share": 1, "write": 1 + }, + { + "create": 1, + "read": 1, + "report": 1, + "role": "HR User", + "write": 1 } ], + "row_format": "Dynamic", "show_title_field_in_link": 1, "sort_field": "creation", "sort_order": "DESC", "states": [], "title_field": "title", "track_changes": 1 -} \ No newline at end of file +} diff --git a/hrms/hr/doctype/employee_skill_map/employee_skill_map.json b/hrms/hr/doctype/employee_skill_map/employee_skill_map.json index c050f9e8b9..b364a905aa 100644 --- a/hrms/hr/doctype/employee_skill_map/employee_skill_map.json +++ b/hrms/hr/doctype/employee_skill_map/employee_skill_map.json @@ -62,7 +62,7 @@ } ], "links": [], - "modified": "2024-03-27 13:09:41.506556", + "modified": "2026-03-24 17:20:54.718151", "modified_by": "Administrator", "module": "HR", "name": "Employee Skill Map", @@ -79,11 +79,19 @@ "role": "System Manager", "share": 1, "write": 1 + }, + { + "create": 1, + "read": 1, + "report": 1, + "role": "HR User", + "write": 1 } ], "quick_entry": 1, + "row_format": "Dynamic", "sort_field": "creation", "sort_order": "ASC", "states": [], "title_field": "employee_name" -} \ No newline at end of file +} diff --git a/hrms/hr/doctype/exit_interview/exit_interview.json b/hrms/hr/doctype/exit_interview/exit_interview.json index 09d14c615b..e24bfa443c 100644 --- a/hrms/hr/doctype/exit_interview/exit_interview.json +++ b/hrms/hr/doctype/exit_interview/exit_interview.json @@ -218,7 +218,7 @@ "index_web_pages_for_search": 1, "is_submittable": 1, "links": [], - "modified": "2024-03-27 13:09:43.272097", + "modified": "2026-03-24 17:28:00.876231", "modified_by": "Administrator", "module": "HR", "name": "Exit Interview", @@ -236,12 +236,18 @@ "role": "System Manager", "share": 1, "write": 1 + }, + { + "read": 1, + "report": 1, + "role": "HR User" } ], + "row_format": "Dynamic", "sender_field": "email", "sort_field": "creation", "sort_order": "DESC", "states": [], "title_field": "employee_name", "track_changes": 1 -} \ No newline at end of file +} diff --git a/hrms/hr/doctype/expense_claim_type/expense_claim_type.json b/hrms/hr/doctype/expense_claim_type/expense_claim_type.json index 65854c11f4..3b47b541cf 100644 --- a/hrms/hr/doctype/expense_claim_type/expense_claim_type.json +++ b/hrms/hr/doctype/expense_claim_type/expense_claim_type.json @@ -48,7 +48,7 @@ "icon": "fa fa-flag", "idx": 1, "links": [], - "modified": "2024-03-27 13:09:44.229749", + "modified": "2026-03-24 12:50:47.737846", "modified_by": "Administrator", "module": "HR", "name": "Expense Claim Type", @@ -67,9 +67,14 @@ { "read": 1, "role": "Employee" + }, + { + "read": 1, + "role": "HR User" } ], + "row_format": "Dynamic", "sort_field": "creation", "sort_order": "ASC", "states": [] -} \ No newline at end of file +} diff --git a/hrms/hr/doctype/job_offer_term_template/job_offer_term_template.json b/hrms/hr/doctype/job_offer_term_template/job_offer_term_template.json index 394f4d8aee..13ecac5b94 100644 --- a/hrms/hr/doctype/job_offer_term_template/job_offer_term_template.json +++ b/hrms/hr/doctype/job_offer_term_template/job_offer_term_template.json @@ -25,7 +25,7 @@ ], "index_web_pages_for_search": 1, "links": [], - "modified": "2024-03-27 13:09:57.850071", + "modified": "2026-03-24 16:34:57.674790", "modified_by": "Administrator", "module": "HR", "name": "Job Offer Term Template", @@ -55,9 +55,14 @@ "role": "HR Manager", "share": 1, "write": 1 + }, + { + "read": 1, + "role": "HR User" } ], + "row_format": "Dynamic", "sort_field": "creation", "sort_order": "DESC", "states": [] -} \ No newline at end of file +} diff --git a/hrms/hr/doctype/job_opening_template/job_opening_template.json b/hrms/hr/doctype/job_opening_template/job_opening_template.json index b1762284b9..cee66033e0 100644 --- a/hrms/hr/doctype/job_opening_template/job_opening_template.json +++ b/hrms/hr/doctype/job_opening_template/job_opening_template.json @@ -59,7 +59,7 @@ "grid_page_length": 50, "index_web_pages_for_search": 1, "links": [], - "modified": "2025-12-12 12:52:12.217926", + "modified": "2026-03-24 16:41:30.040870", "modified_by": "Administrator", "module": "HR", "name": "Job Opening Template", @@ -77,6 +77,10 @@ "role": "System Manager", "share": 1, "write": 1 + }, + { + "read": 1, + "role": "HR User" } ], "row_format": "Dynamic", diff --git a/hrms/hr/doctype/job_requisition/job_requisition.json b/hrms/hr/doctype/job_requisition/job_requisition.json index 043a5ff924..66c6f469e2 100644 --- a/hrms/hr/doctype/job_requisition/job_requisition.json +++ b/hrms/hr/doctype/job_requisition/job_requisition.json @@ -202,7 +202,7 @@ "link_fieldname": "job_requisition" } ], - "modified": "2024-03-27 13:09:58.178411", + "modified": "2026-03-24 16:39:36.702349", "modified_by": "Administrator", "module": "HR", "name": "Job Requisition", @@ -220,10 +220,15 @@ "role": "System Manager", "share": 1, "write": 1 + }, + { + "read": 1, + "role": "HR User" } ], + "row_format": "Dynamic", "sort_field": "creation", "sort_order": "DESC", "states": [], "title_field": "designation" -} \ No newline at end of file +} diff --git a/hrms/hr/doctype/overtime_type/overtime_type.json b/hrms/hr/doctype/overtime_type/overtime_type.json index df02530c70..b6afa10a30 100644 --- a/hrms/hr/doctype/overtime_type/overtime_type.json +++ b/hrms/hr/doctype/overtime_type/overtime_type.json @@ -132,7 +132,7 @@ ], "index_web_pages_for_search": 1, "links": [], - "modified": "2025-08-11 12:05:23.356474", + "modified": "2026-03-24 16:44:58.729676", "modified_by": "Administrator", "module": "HR", "name": "Overtime Type", @@ -150,6 +150,10 @@ "role": "System Manager", "share": 1, "write": 1 + }, + { + "read": 1, + "role": "HR User" } ], "row_format": "Dynamic", diff --git a/hrms/hr/doctype/skill/skill.json b/hrms/hr/doctype/skill/skill.json index c7bde916f5..93428fbb2d 100644 --- a/hrms/hr/doctype/skill/skill.json +++ b/hrms/hr/doctype/skill/skill.json @@ -25,7 +25,7 @@ } ], "links": [], - "modified": "2024-03-27 13:10:42.663583", + "modified": "2026-03-24 14:23:41.134482", "modified_by": "Administrator", "module": "HR", "name": "Skill", @@ -54,11 +54,16 @@ "role": "HR Manager", "share": 1, "write": 1 + }, + { + "read": 1, + "role": "HR User" } ], "quick_entry": 1, + "row_format": "Dynamic", "sort_field": "creation", "sort_order": "ASC", "states": [], "track_changes": 1 -} \ No newline at end of file +} diff --git a/hrms/hr/doctype/training_event/training_event.json b/hrms/hr/doctype/training_event/training_event.json index 546d040380..1bc944f4e0 100644 --- a/hrms/hr/doctype/training_event/training_event.json +++ b/hrms/hr/doctype/training_event/training_event.json @@ -198,7 +198,7 @@ ], "is_submittable": 1, "links": [], - "modified": "2024-03-27 13:10:53.965453", + "modified": "2026-03-24 17:45:41.639205", "modified_by": "Administrator", "module": "HR", "name": "Training Event", @@ -220,12 +220,19 @@ "share": 1, "submit": 1, "write": 1 + }, + { + "read": 1, + "report": 1, + "role": "HR User", + "write": 1 } ], + "row_format": "Dynamic", "search_fields": "event_name", "show_name_in_global_search": 1, "sort_field": "creation", "sort_order": "DESC", "states": [], "title_field": "event_name" -} \ No newline at end of file +} diff --git a/hrms/hr/doctype/training_feedback/training_feedback.json b/hrms/hr/doctype/training_feedback/training_feedback.json index 5e9541fbcd..9f301f0108 100644 --- a/hrms/hr/doctype/training_feedback/training_feedback.json +++ b/hrms/hr/doctype/training_feedback/training_feedback.json @@ -100,7 +100,7 @@ ], "is_submittable": 1, "links": [], - "modified": "2024-03-27 13:10:54.277257", + "modified": "2026-03-24 17:33:21.061679", "modified_by": "Administrator", "module": "HR", "name": "Training Feedback", @@ -133,11 +133,18 @@ "share": 1, "submit": 1, "write": 1 + }, + { + "read": 1, + "report": 1, + "role": "HR User", + "write": 1 } ], + "row_format": "Dynamic", "search_fields": "employee_name, training_event, event_name", "sort_field": "creation", "sort_order": "DESC", "states": [], "title_field": "employee_name" -} \ No newline at end of file +} diff --git a/hrms/hr/doctype/training_program/training_program.json b/hrms/hr/doctype/training_program/training_program.json index 982b69fad9..af4a6053a6 100644 --- a/hrms/hr/doctype/training_program/training_program.json +++ b/hrms/hr/doctype/training_program/training_program.json @@ -102,7 +102,7 @@ } ], "links": [], - "modified": "2024-03-27 13:10:54.420468", + "modified": "2026-03-24 17:33:35.839192", "modified_by": "Administrator", "module": "HR", "name": "Training Program", @@ -119,12 +119,19 @@ "role": "HR Manager", "share": 1, "write": 1 + }, + { + "read": 1, + "report": 1, + "role": "HR User", + "write": 1 } ], + "row_format": "Dynamic", "show_name_in_global_search": 1, "sort_field": "creation", "sort_order": "DESC", "states": [], "title_field": "training_program", "track_changes": 1 -} \ No newline at end of file +} diff --git a/hrms/hr/doctype/training_result/training_result.json b/hrms/hr/doctype/training_result/training_result.json index 5080de20ed..218657fc99 100644 --- a/hrms/hr/doctype/training_result/training_result.json +++ b/hrms/hr/doctype/training_result/training_result.json @@ -52,7 +52,7 @@ ], "is_submittable": 1, "links": [], - "modified": "2024-03-27 13:10:54.562111", + "modified": "2026-03-24 17:46:52.547853", "modified_by": "Administrator", "module": "HR", "name": "Training Result", @@ -73,11 +73,19 @@ "share": 1, "submit": 1, "write": 1 + }, + { + "create": 1, + "read": 1, + "report": 1, + "role": "HR User", + "write": 1 } ], + "row_format": "Dynamic", "search_fields": "training_event", "sort_field": "creation", "sort_order": "DESC", "states": [], "title_field": "training_event" -} \ No newline at end of file +} diff --git a/hrms/payroll/doctype/employee_benefit_ledger/employee_benefit_ledger.json b/hrms/payroll/doctype/employee_benefit_ledger/employee_benefit_ledger.json index fd91e2b7e5..27770b7c4b 100644 --- a/hrms/payroll/doctype/employee_benefit_ledger/employee_benefit_ledger.json +++ b/hrms/payroll/doctype/employee_benefit_ledger/employee_benefit_ledger.json @@ -137,7 +137,7 @@ "grid_page_length": 50, "index_web_pages_for_search": 1, "links": [], - "modified": "2025-09-18 20:31:17.942493", + "modified": "2026-03-24 16:52:52.563748", "modified_by": "Administrator", "module": "Payroll", "name": "Employee Benefit Ledger", @@ -178,6 +178,11 @@ "report": 1, "role": "Administrator", "share": 1 + }, + { + "read": 1, + "report": 1, + "role": "HR User" } ], "row_format": "Dynamic", From c6e46fc0eb17001f56a00d1364e5ac3d6f49e7dc Mon Sep 17 00:00:00 2001 From: iamkhanraheel Date: Thu, 26 Mar 2026 16:40:46 +0530 Subject: [PATCH 02/13] fix: default permission for HR manager role & add custom docperm for doctypes in frappe app --- .../appraisal_overview.json | 18 ++++++++++-- .../claims_by_type/claims_by_type.json | 21 ++++++++++---- .../employees_by_age/employees_by_age.json | 21 ++++++++++---- .../hiring_vs_attrition_count.json | 21 ++++++++++---- .../doctype/job_applicant/job_applicant.json | 28 ++++++++++++++++-- .../job_applicant_source.json | 24 +++++++++++++-- hrms/hr/doctype/job_offer/job_offer.json | 28 +++++++++++++++++- hrms/hr/doctype/job_opening/job_opening.json | 25 +++++++++++++++- .../job_opening_template.json | 11 ++++++- .../job_requisition/job_requisition.json | 14 ++++++++- hrms/hr/doctype/kra/kra.json | 27 +++++++++++++++-- .../leave_block_list/leave_block_list.json | 15 ++++++++-- .../leave_control_panel.json | 11 +++++-- hrms/hr/doctype/offer_term/offer_term.json | 29 +++++++++++++++++-- .../daily_work_summary_replies.json | 15 ++++++++-- hrms/hr/workspace/expenses/expenses.json | 4 +-- .../additional_salary/additional_salary.json | 18 +++++++++--- .../bulk_salary_structure_assignment.json | 14 +++++++-- .../payroll_settings/payroll_settings.json | 7 ++++- .../salary_component/salary_component.json | 15 ++++++++-- hrms/setup.py | 23 +++++++++++++++ 21 files changed, 342 insertions(+), 47 deletions(-) diff --git a/hrms/hr/dashboard_chart/appraisal_overview/appraisal_overview.json b/hrms/hr/dashboard_chart/appraisal_overview/appraisal_overview.json index 1914ccc566..6ef46a9dad 100644 --- a/hrms/hr/dashboard_chart/appraisal_overview/appraisal_overview.json +++ b/hrms/hr/dashboard_chart/appraisal_overview/appraisal_overview.json @@ -11,7 +11,7 @@ "idx": 0, "is_public": 0, "is_standard": 1, - "modified": "2026-01-10 15:16:33.659637", + "modified": "2026-03-26 15:50:08.184379", "modified_by": "Administrator", "module": "HR", "name": "Appraisal Overview", @@ -19,7 +19,21 @@ "owner": "Administrator", "report_name": "Appraisal Overview", "roles": [ - {} + { + "role": "System Manager" + }, + { + "role": "HR Manager" + }, + { + "role": "HR User" + }, + { + "role": "Employee Self Service" + }, + { + "role": "Employee" + } ], "show_values_over_chart": 0, "time_interval": "Yearly", diff --git a/hrms/hr/dashboard_chart/claims_by_type/claims_by_type.json b/hrms/hr/dashboard_chart/claims_by_type/claims_by_type.json index 0e815e5ba9..25c05a2664 100644 --- a/hrms/hr/dashboard_chart/claims_by_type/claims_by_type.json +++ b/hrms/hr/dashboard_chart/claims_by_type/claims_by_type.json @@ -2,7 +2,7 @@ "based_on": "", "chart_name": "Claims by Type", "chart_type": "Group By", - "creation": "2022-08-31 23:04:43.377345", + "creation": "2025-07-15 13:15:12.796881", "docstatus": 0, "doctype": "Dashboard Chart", "document_type": "Expense Claim Detail", @@ -13,15 +13,26 @@ "idx": 0, "is_public": 1, "is_standard": 1, - "last_synced_on": "2022-09-16 11:36:29.484579", - "modified": "2022-09-16 11:39:08.205987", + "last_synced_on": "2026-03-26 15:47:23.289876", + "modified": "2026-03-26 15:47:44.955110", "modified_by": "Administrator", "module": "HR", "name": "Claims by Type", "number_of_groups": 0, "owner": "Administrator", "parent_document_type": "Expense Claim", - "roles": [], + "roles": [ + { + "role": "System Manager" + }, + { + "role": "HR Manager" + }, + { + "role": "HR User" + } + ], + "show_values_over_chart": 0, "source": "", "time_interval": "Yearly", "timeseries": 0, @@ -30,4 +41,4 @@ "use_report_chart": 0, "value_based_on": "", "y_axis": [] -} \ No newline at end of file +} diff --git a/hrms/hr/dashboard_chart/employees_by_age/employees_by_age.json b/hrms/hr/dashboard_chart/employees_by_age/employees_by_age.json index d529e61a20..d9d06b56eb 100644 --- a/hrms/hr/dashboard_chart/employees_by_age/employees_by_age.json +++ b/hrms/hr/dashboard_chart/employees_by_age/employees_by_age.json @@ -2,7 +2,7 @@ "based_on": "", "chart_name": "Employees by Age", "chart_type": "Custom", - "creation": "2022-08-22 19:07:51.906347", + "creation": "2025-07-15 13:15:12.774524", "custom_options": "{\n\t\"colors\": [\"#7cd6fd\"],\n\t\"barOptions\": {\"spaceRatio\": 0.5}\n}", "docstatus": 0, "doctype": "Dashboard Chart", @@ -13,15 +13,26 @@ "idx": 0, "is_public": 1, "is_standard": 1, - "last_synced_on": "2022-08-22 19:00:02.464180", - "modified": "2022-08-22 19:11:20.076166", + "last_synced_on": "2026-03-26 15:46:28.262525", + "modified": "2026-03-26 15:46:47.145092", "modified_by": "Administrator", "module": "HR", "name": "Employees by Age", "number_of_groups": 0, "owner": "Administrator", "parent_document_type": "", - "roles": [], + "roles": [ + { + "role": "System Manager" + }, + { + "role": "HR Manager" + }, + { + "role": "HR User" + } + ], + "show_values_over_chart": 0, "source": "Employees by Age", "time_interval": "Yearly", "timeseries": 0, @@ -30,4 +41,4 @@ "use_report_chart": 0, "value_based_on": "", "y_axis": [] -} \ No newline at end of file +} diff --git a/hrms/hr/dashboard_chart/hiring_vs_attrition_count/hiring_vs_attrition_count.json b/hrms/hr/dashboard_chart/hiring_vs_attrition_count/hiring_vs_attrition_count.json index 1e73fa2f61..34c3a84c96 100644 --- a/hrms/hr/dashboard_chart/hiring_vs_attrition_count/hiring_vs_attrition_count.json +++ b/hrms/hr/dashboard_chart/hiring_vs_attrition_count/hiring_vs_attrition_count.json @@ -2,7 +2,7 @@ "based_on": "", "chart_name": "Hiring vs Attrition Count", "chart_type": "Custom", - "creation": "2022-08-21 22:58:12.740936", + "creation": "2025-07-15 13:15:12.786726", "custom_options": "{\n\t\"type\": \"axis-mixed\",\n\t\"axisOptions\": {\n\t\t\"xIsSeries\": 1\n\t},\n\t\"lineOptions\": {\n\t \"regionFill\": 1\n\t},\n\t\"colors\": [\"#7cd6fd\", \"#5e64ff\"]\n}", "docstatus": 0, "doctype": "Dashboard Chart", @@ -13,15 +13,26 @@ "idx": 0, "is_public": 1, "is_standard": 1, - "last_synced_on": "2022-08-22 10:57:55.011020", - "modified": "2022-08-22 11:03:30.080835", + "last_synced_on": "2026-03-26 15:45:20.553274", + "modified": "2026-03-26 15:46:19.045676", "modified_by": "Administrator", "module": "HR", "name": "Hiring vs Attrition Count", "number_of_groups": 0, "owner": "Administrator", "parent_document_type": "", - "roles": [], + "roles": [ + { + "role": "System Manager" + }, + { + "role": "HR Manager" + }, + { + "role": "HR User" + } + ], + "show_values_over_chart": 0, "source": "Hiring vs Attrition Count", "time_interval": "Yearly", "timeseries": 0, @@ -30,4 +41,4 @@ "use_report_chart": 0, "value_based_on": "", "y_axis": [] -} \ No newline at end of file +} diff --git a/hrms/hr/doctype/job_applicant/job_applicant.json b/hrms/hr/doctype/job_applicant/job_applicant.json index 1147f51565..5b171c6c73 100644 --- a/hrms/hr/doctype/job_applicant/job_applicant.json +++ b/hrms/hr/doctype/job_applicant/job_applicant.json @@ -195,7 +195,7 @@ "idx": 1, "index_web_pages_for_search": 1, "links": [], - "modified": "2025-01-16 13:06:05.312255", + "modified": "2026-03-26 16:00:40.248633", "modified_by": "Administrator", "module": "HR", "name": "Job Applicant", @@ -206,14 +206,38 @@ "create": 1, "delete": 1, "email": 1, + "export": 1, + "print": 1, + "read": 1, + "report": 1, + "role": "System Manager", + "share": 1, + "write": 1 + }, + { + "create": 1, + "email": 1, "print": 1, "read": 1, "report": 1, "role": "HR User", "share": 1, "write": 1 + }, + { + "create": 1, + "delete": 1, + "email": 1, + "export": 1, + "print": 1, + "read": 1, + "report": 1, + "role": "HR Manager", + "share": 1, + "write": 1 } ], + "row_format": "Dynamic", "search_fields": "applicant_name, email_id, job_title, phone_number", "sender_field": "email_id", "sort_field": "creation", @@ -221,4 +245,4 @@ "states": [], "subject_field": "notes", "title_field": "applicant_name" -} \ No newline at end of file +} diff --git a/hrms/hr/doctype/job_applicant_source/job_applicant_source.json b/hrms/hr/doctype/job_applicant_source/job_applicant_source.json index 893eaa4a9d..92b48ce313 100644 --- a/hrms/hr/doctype/job_applicant_source/job_applicant_source.json +++ b/hrms/hr/doctype/job_applicant_source/job_applicant_source.json @@ -27,7 +27,7 @@ } ], "links": [], - "modified": "2024-03-27 13:09:56.505846", + "modified": "2026-03-26 16:06:22.248004", "modified_by": "Administrator", "module": "HR", "name": "Job Applicant Source", @@ -41,13 +41,33 @@ "print": 1, "read": 1, "report": 1, + "role": "System Manager", + "share": 1, + "write": 1 + }, + { + "create": 1, + "read": 1, + "report": 1, "role": "HR User", + "write": 1 + }, + { + "create": 1, + "delete": 1, + "email": 1, + "export": 1, + "print": 1, + "read": 1, + "report": 1, + "role": "HR Manager", "share": 1, "write": 1 } ], "quick_entry": 1, + "row_format": "Dynamic", "sort_field": "creation", "sort_order": "DESC", "states": [] -} \ No newline at end of file +} diff --git a/hrms/hr/doctype/job_offer/job_offer.json b/hrms/hr/doctype/job_offer/job_offer.json index 3c39ab2da5..0b8b548999 100644 --- a/hrms/hr/doctype/job_offer/job_offer.json +++ b/hrms/hr/doctype/job_offer/job_offer.json @@ -170,7 +170,7 @@ ], "is_submittable": 1, "links": [], - "modified": "2025-12-11 11:44:33.901454", + "modified": "2026-03-26 16:03:29.815627", "modified_by": "Administrator", "module": "HR", "name": "Job Offer", @@ -188,10 +188,36 @@ "print": 1, "read": 1, "report": 1, + "role": "System Manager", + "share": 1, + "submit": 1, + "write": 1 + }, + { + "create": 1, + "email": 1, + "print": 1, + "read": 1, + "report": 1, "role": "HR User", "share": 1, "submit": 1, "write": 1 + }, + { + "amend": 1, + "cancel": 1, + "create": 1, + "delete": 1, + "email": 1, + "export": 1, + "print": 1, + "read": 1, + "report": 1, + "role": "HR Manager", + "share": 1, + "submit": 1, + "write": 1 } ], "row_format": "Dynamic", diff --git a/hrms/hr/doctype/job_opening/job_opening.json b/hrms/hr/doctype/job_opening/job_opening.json index 96b587f393..23651a3441 100644 --- a/hrms/hr/doctype/job_opening/job_opening.json +++ b/hrms/hr/doctype/job_opening/job_opening.json @@ -265,7 +265,7 @@ "idx": 1, "is_published_field": "publish", "links": [], - "modified": "2025-12-11 19:18:36.145062", + "modified": "2026-03-26 15:59:46.904459", "modified_by": "Administrator", "module": "HR", "name": "Job Opening", @@ -276,12 +276,35 @@ "create": 1, "delete": 1, "email": 1, + "export": 1, + "print": 1, + "read": 1, + "report": 1, + "role": "System Manager", + "share": 1, + "write": 1 + }, + { + "create": 1, + "email": 1, "print": 1, "read": 1, "report": 1, "role": "HR User", "share": 1, "write": 1 + }, + { + "create": 1, + "delete": 1, + "email": 1, + "export": 1, + "print": 1, + "read": 1, + "report": 1, + "role": "HR Manager", + "share": 1, + "write": 1 } ], "row_format": "Dynamic", diff --git a/hrms/hr/doctype/job_opening_template/job_opening_template.json b/hrms/hr/doctype/job_opening_template/job_opening_template.json index cee66033e0..600ece31b5 100644 --- a/hrms/hr/doctype/job_opening_template/job_opening_template.json +++ b/hrms/hr/doctype/job_opening_template/job_opening_template.json @@ -59,7 +59,7 @@ "grid_page_length": 50, "index_web_pages_for_search": 1, "links": [], - "modified": "2026-03-24 16:41:30.040870", + "modified": "2026-03-26 16:12:56.854860", "modified_by": "Administrator", "module": "HR", "name": "Job Opening Template", @@ -81,6 +81,15 @@ { "read": 1, "role": "HR User" + }, + { + "create": 1, + "delete": 1, + "export": 1, + "read": 1, + "report": 1, + "role": "HR Manager", + "write": 1 } ], "row_format": "Dynamic", diff --git a/hrms/hr/doctype/job_requisition/job_requisition.json b/hrms/hr/doctype/job_requisition/job_requisition.json index 66c6f469e2..fb287d9cb6 100644 --- a/hrms/hr/doctype/job_requisition/job_requisition.json +++ b/hrms/hr/doctype/job_requisition/job_requisition.json @@ -202,7 +202,7 @@ "link_fieldname": "job_requisition" } ], - "modified": "2026-03-24 16:39:36.702349", + "modified": "2026-03-26 15:56:44.142590", "modified_by": "Administrator", "module": "HR", "name": "Job Requisition", @@ -224,6 +224,18 @@ { "read": 1, "role": "HR User" + }, + { + "create": 1, + "delete": 1, + "email": 1, + "export": 1, + "print": 1, + "read": 1, + "report": 1, + "role": "HR Manager", + "share": 1, + "write": 1 } ], "row_format": "Dynamic", diff --git a/hrms/hr/doctype/kra/kra.json b/hrms/hr/doctype/kra/kra.json index 9e7fdf33ed..18ca168349 100644 --- a/hrms/hr/doctype/kra/kra.json +++ b/hrms/hr/doctype/kra/kra.json @@ -27,7 +27,7 @@ ], "index_web_pages_for_search": 1, "links": [], - "modified": "2024-03-27 13:09:59.100557", + "modified": "2026-03-26 15:54:05.374598", "modified_by": "Administrator", "module": "HR", "name": "KRA", @@ -45,12 +45,35 @@ "role": "System Manager", "share": 1, "write": 1 + }, + { + "create": 1, + "email": 1, + "print": 1, + "read": 1, + "report": 1, + "role": "HR Manager", + "share": 1, + "write": 1 + }, + { + "create": 1, + "delete": 1, + "email": 1, + "export": 1, + "print": 1, + "read": 1, + "report": 1, + "role": "HR User", + "share": 1, + "write": 1 } ], "quick_entry": 1, + "row_format": "Dynamic", "search_fields": "description", "sort_field": "creation", "sort_order": "DESC", "states": [], "track_changes": 1 -} \ No newline at end of file +} diff --git a/hrms/hr/doctype/leave_block_list/leave_block_list.json b/hrms/hr/doctype/leave_block_list/leave_block_list.json index 3e208f2df9..50a205ad73 100644 --- a/hrms/hr/doctype/leave_block_list/leave_block_list.json +++ b/hrms/hr/doctype/leave_block_list/leave_block_list.json @@ -89,7 +89,7 @@ "icon": "fa fa-calendar", "idx": 1, "links": [], - "modified": "2024-03-27 13:10:00.587073", + "modified": "2026-03-26 15:04:08.140416", "modified_by": "Administrator", "module": "HR", "name": "Leave Block List", @@ -104,9 +104,20 @@ "role": "HR User", "share": 1, "write": 1 + }, + { + "create": 1, + "email": 1, + "print": 1, + "read": 1, + "report": 1, + "role": "HR Manager", + "share": 1, + "write": 1 } ], + "row_format": "Dynamic", "sort_field": "creation", "sort_order": "ASC", "states": [] -} \ No newline at end of file +} diff --git a/hrms/hr/doctype/leave_control_panel/leave_control_panel.json b/hrms/hr/doctype/leave_control_panel/leave_control_panel.json index 4aeacfc519..54997a5e06 100644 --- a/hrms/hr/doctype/leave_control_panel/leave_control_panel.json +++ b/hrms/hr/doctype/leave_control_panel/leave_control_panel.json @@ -186,12 +186,18 @@ "idx": 1, "issingle": 1, "links": [], - "modified": "2025-01-13 13:47:55.262534", + "modified": "2026-03-26 14:58:06.256078", "modified_by": "Administrator", "module": "HR", "name": "Leave Control Panel", "owner": "Administrator", "permissions": [ + { + "create": 1, + "read": 1, + "role": "HR Manager", + "write": 1 + }, { "create": 1, "read": 1, @@ -199,7 +205,8 @@ "write": 1 } ], + "row_format": "Dynamic", "sort_field": "creation", "sort_order": "DESC", "states": [] -} \ No newline at end of file +} diff --git a/hrms/hr/doctype/offer_term/offer_term.json b/hrms/hr/doctype/offer_term/offer_term.json index 3d5c2f74d9..1b1d400fd2 100644 --- a/hrms/hr/doctype/offer_term/offer_term.json +++ b/hrms/hr/doctype/offer_term/offer_term.json @@ -20,7 +20,7 @@ } ], "links": [], - "modified": "2024-03-27 13:10:06.439022", + "modified": "2026-03-26 16:08:08.314009", "modified_by": "Administrator", "module": "HR", "name": "Offer Term", @@ -29,13 +29,38 @@ { "create": 1, "delete": 1, + "email": 1, + "export": 1, + "import": 1, + "print": 1, + "read": 1, + "report": 1, + "role": "System Manager", + "share": 1, + "write": 1 + }, + { + "create": 1, "read": 1, "role": "HR User", "write": 1 + }, + { + "create": 1, + "delete": 1, + "email": 1, + "export": 1, + "print": 1, + "read": 1, + "report": 1, + "role": "HR Manager", + "share": 1, + "write": 1 } ], "quick_entry": 1, + "row_format": "Dynamic", "sort_field": "creation", "sort_order": "DESC", "states": [] -} \ No newline at end of file +} diff --git a/hrms/hr/report/daily_work_summary_replies/daily_work_summary_replies.json b/hrms/hr/report/daily_work_summary_replies/daily_work_summary_replies.json index 04c88506d7..8ca90967a0 100644 --- a/hrms/hr/report/daily_work_summary_replies/daily_work_summary_replies.json +++ b/hrms/hr/report/daily_work_summary_replies/daily_work_summary_replies.json @@ -1,16 +1,21 @@ { "add_total_row": 0, + "add_translate_data": 0, + "columns": [], "creation": "2018-06-04 10:30:25.673452", "disabled": 0, "docstatus": 0, "doctype": "Report", + "filters": [], "idx": 0, "is_standard": "Yes", - "modified": "2018-06-04 10:44:04.694509", + "letter_head": null, + "modified": "2026-03-26 15:44:28.577728", "modified_by": "Administrator", "module": "HR", "name": "Daily Work Summary Replies", "owner": "Administrator", + "prepared_report": 0, "ref_doctype": "Daily Work Summary", "report_name": "Daily Work Summary Replies", "report_type": "Script Report", @@ -20,6 +25,10 @@ }, { "role": "HR User" + }, + { + "role": "HR Manager" } - ] -} \ No newline at end of file + ], + "timeout": 0 +} diff --git a/hrms/hr/workspace/expenses/expenses.json b/hrms/hr/workspace/expenses/expenses.json index be3f6cf48f..1cc556b69f 100644 --- a/hrms/hr/workspace/expenses/expenses.json +++ b/hrms/hr/workspace/expenses/expenses.json @@ -6,7 +6,7 @@ "label": "Expense Claims" } ], - "content": "[{\"id\":\"L2zVuWBp7u\",\"type\":\"chart\",\"data\":{\"chart_name\":\"Expense Claims\",\"col\":12}},{\"id\":\"xrNOam-5qD\",\"type\":\"spacer\",\"data\":{\"col\":12}},{\"id\":\"sQTzb1f7Y_\",\"type\":\"header\",\"data\":{\"text\":\"Masters & Reports\",\"col\":12}},{\"id\":\"DuIKEI2BM-\",\"type\":\"card\",\"data\":{\"card_name\":\"Claims\",\"col\":4}},{\"id\":\"YLUHzAMPPI\",\"type\":\"card\",\"data\":{\"card_name\":\"Advances\",\"col\":4}},{\"id\":\"gRpeo_qpkn\",\"type\":\"card\",\"data\":{\"card_name\":\"Fleet Management\",\"col\":4}},{\"id\":\"ZSjP2Kct-c\",\"type\":\"card\",\"data\":{\"card_name\":\"Travel\",\"col\":4}},{\"id\":\"xcW_x4wuLQ\",\"type\":\"card\",\"data\":{\"card_name\":\"Reports\",\"col\":4}},{\"id\":\"KgfEHHa8pF\",\"type\":\"card\",\"data\":{\"card_name\":\"Accounting Reports\",\"col\":4}}]", + "content": "[{\"id\":\"L2zVuWBp7u\",\"type\":\"chart\",\"data\":{\"chart_name\":\"Expense Claims\",\"col\":12}},{\"id\":\"xrNOam-5qD\",\"type\":\"spacer\",\"data\":{\"col\":12}},{\"id\":\"sQTzb1f7Y_\",\"type\":\"header\",\"data\":{\"text\":\"Masters & Reports\",\"col\":12}},{\"id\":\"DuIKEI2BM-\",\"type\":\"card\",\"data\":{\"card_name\":\"Claims\",\"col\":4}},{\"id\":\"YLUHzAMPPI\",\"type\":\"card\",\"data\":{\"card_name\":\"Advances\",\"col\":4}},{\"id\":\"xcW_x4wuLQ\",\"type\":\"card\",\"data\":{\"card_name\":\"Reports\",\"col\":4}},{\"id\":\"KgfEHHa8pF\",\"type\":\"card\",\"data\":{\"card_name\":\"Accounting Reports\",\"col\":4}},{\"id\":\"ZSjP2Kct-c\",\"type\":\"card\",\"data\":{\"card_name\":\"Travel\",\"col\":4}},{\"id\":\"gRpeo_qpkn\",\"type\":\"card\",\"data\":{\"card_name\":\"Fleet Management\",\"col\":4}}]", "creation": "2022-08-20 16:28:40.701015", "custom_blocks": [], "docstatus": 0, @@ -257,7 +257,7 @@ "type": "Link" } ], - "modified": "2026-01-09 18:02:46.503270", + "modified": "2026-03-26 14:46:56.009602", "modified_by": "Administrator", "module": "HR", "name": "Expenses", diff --git a/hrms/payroll/doctype/additional_salary/additional_salary.json b/hrms/payroll/doctype/additional_salary/additional_salary.json index 3f4375f468..229b87b8f8 100644 --- a/hrms/payroll/doctype/additional_salary/additional_salary.json +++ b/hrms/payroll/doctype/additional_salary/additional_salary.json @@ -203,7 +203,7 @@ ], "is_submittable": 1, "links": [], - "modified": "2024-11-14 16:51:17.594568", + "modified": "2026-03-26 15:35:51.723977", "modified_by": "Administrator", "module": "Payroll", "name": "Additional Salary", @@ -227,9 +227,7 @@ }, { "create": 1, - "delete": 1, "email": 1, - "export": 1, "print": 1, "read": 1, "report": 1, @@ -237,12 +235,24 @@ "share": 1, "submit": 1, "write": 1 + }, + { + "create": 1, + "email": 1, + "print": 1, + "read": 1, + "report": 1, + "role": "HR Manager", + "share": 1, + "submit": 1, + "write": 1 } ], + "row_format": "Dynamic", "search_fields": "employee_name", "sort_field": "creation", "sort_order": "DESC", "states": [], "title_field": "employee_name", "track_changes": 1 -} \ No newline at end of file +} diff --git a/hrms/payroll/doctype/bulk_salary_structure_assignment/bulk_salary_structure_assignment.json b/hrms/payroll/doctype/bulk_salary_structure_assignment/bulk_salary_structure_assignment.json index a0abf3760e..e04474b87d 100644 --- a/hrms/payroll/doctype/bulk_salary_structure_assignment/bulk_salary_structure_assignment.json +++ b/hrms/payroll/doctype/bulk_salary_structure_assignment/bulk_salary_structure_assignment.json @@ -147,7 +147,7 @@ "hide_toolbar": 1, "issingle": 1, "links": [], - "modified": "2025-01-13 13:48:46.095481", + "modified": "2026-03-26 15:09:09.658299", "modified_by": "Administrator", "module": "Payroll", "name": "Bulk Salary Structure Assignment", @@ -161,9 +161,19 @@ "role": "HR User", "share": 1, "write": 1 + }, + { + "create": 1, + "email": 1, + "print": 1, + "read": 1, + "role": "HR Manager", + "share": 1, + "write": 1 } ], + "row_format": "Dynamic", "sort_field": "creation", "sort_order": "DESC", "states": [] -} \ No newline at end of file +} diff --git a/hrms/payroll/doctype/payroll_settings/payroll_settings.json b/hrms/payroll/doctype/payroll_settings/payroll_settings.json index a8cd62fbf4..39a73538df 100644 --- a/hrms/payroll/doctype/payroll_settings/payroll_settings.json +++ b/hrms/payroll/doctype/payroll_settings/payroll_settings.json @@ -202,7 +202,7 @@ "index_web_pages_for_search": 1, "issingle": 1, "links": [], - "modified": "2025-09-02 13:28:45.007397", + "modified": "2026-03-26 15:37:55.573986", "modified_by": "Administrator", "module": "Payroll", "name": "Payroll Settings", @@ -216,6 +216,11 @@ "role": "System Manager", "share": 1, "write": 1 + }, + { + "read": 1, + "role": "HR Manager", + "write": 1 } ], "row_format": "Dynamic", diff --git a/hrms/payroll/doctype/salary_component/salary_component.json b/hrms/payroll/doctype/salary_component/salary_component.json index 7963e3aaeb..7a8ce311ab 100644 --- a/hrms/payroll/doctype/salary_component/salary_component.json +++ b/hrms/payroll/doctype/salary_component/salary_component.json @@ -291,7 +291,7 @@ "icon": "fa fa-flag", "index_web_pages_for_search": 1, "links": [], - "modified": "2025-09-23 11:28:17.375819", + "modified": "2026-03-26 15:07:25.464240", "modified_by": "Administrator", "module": "Payroll", "name": "Salary Component", @@ -300,7 +300,6 @@ "permissions": [ { "create": 1, - "delete": 1, "email": 1, "export": 1, "print": 1, @@ -313,6 +312,18 @@ { "read": 1, "role": "Employee" + }, + { + "create": 1, + "delete": 1, + "email": 1, + "export": 1, + "print": 1, + "read": 1, + "report": 1, + "role": "HR Manager", + "share": 1, + "write": 1 } ], "row_format": "Dynamic", diff --git a/hrms/setup.py b/hrms/setup.py index 9d07252d20..78254ece5e 100644 --- a/hrms/setup.py +++ b/hrms/setup.py @@ -1,12 +1,14 @@ import os import frappe +from frappe.core.doctype.custom_docperm.custom_docperm import update_custom_docperm from frappe.custom.doctype.custom_field.custom_field import create_custom_fields from frappe.desk.page.setup_wizard.install_fixtures import ( _, # NOTE: this is not the real translation function ) from frappe.desk.page.setup_wizard.setup_wizard import make_records from frappe.installer import update_site_config +from frappe.permissions import add_permission from hrms.overrides.company import delete_company_fixtures @@ -859,3 +861,24 @@ def get_salary_slip_loan_fields(): }, ], } + + +# Add default permission +def add_docperms(): + role_permissions = { + "HR User": { + "Role": {"read": 1}, + "Currency": {"read": 1}, + }, + "HR Manager": { + "Role": {"read": 1}, + "Currency": {"read": 1}, + "Email Account": {"read": 1}, + }, + } + + for role, permissions in role_permissions.items(): + for doctype, ptypes in permissions.items(): + docperm = add_permission(doctype, role) + if docperm: + update_custom_docperm(docperm, ptypes) From 4a8fff886cdce0068310fff92f8d79bf54bfb4b5 Mon Sep 17 00:00:00 2001 From: iamkhanraheel Date: Tue, 7 Apr 2026 18:33:11 +0530 Subject: [PATCH 03/13] fix: default perm for HR manager & HR user --- .../daily_work_summary/daily_work_summary.json | 16 +++++++++------- .../employee_onboarding_template.json | 11 ++++++++++- .../employee_separation/employee_separation.json | 16 ++++++++++++++-- .../employee_separation_template.json | 16 ++++++++++++++-- .../employee_skill_map/employee_skill_map.json | 11 ++++++++++- .../doctype/exit_interview/exit_interview.json | 12 +++++++++++- hrms/setup.py | 2 ++ 7 files changed, 70 insertions(+), 14 deletions(-) diff --git a/hrms/hr/doctype/daily_work_summary/daily_work_summary.json b/hrms/hr/doctype/daily_work_summary/daily_work_summary.json index 3465a61c02..d7bd894704 100644 --- a/hrms/hr/doctype/daily_work_summary/daily_work_summary.json +++ b/hrms/hr/doctype/daily_work_summary/daily_work_summary.json @@ -36,7 +36,7 @@ ], "in_create": 1, "links": [], - "modified": "2024-09-18 13:30:28.136511", + "modified": "2026-04-07 18:28:53.092864", "modified_by": "Administrator", "module": "HR", "name": "Daily Work Summary", @@ -46,19 +46,21 @@ "read": 1, "role": "Employee" }, + { + "read": 1, + "report": 1, + "role": "HR User" + }, { "delete": 1, - "email": 1, - "export": 1, - "print": 1, "read": 1, "report": 1, - "role": "HR User", - "share": 1 + "role": "HR Manager" } ], "quick_entry": 1, + "row_format": "Dynamic", "sort_field": "creation", "sort_order": "DESC", "states": [] -} \ No newline at end of file +} diff --git a/hrms/hr/doctype/employee_onboarding_template/employee_onboarding_template.json b/hrms/hr/doctype/employee_onboarding_template/employee_onboarding_template.json index 99acf7add6..baa402c0f8 100644 --- a/hrms/hr/doctype/employee_onboarding_template/employee_onboarding_template.json +++ b/hrms/hr/doctype/employee_onboarding_template/employee_onboarding_template.json @@ -68,7 +68,7 @@ } ], "links": [], - "modified": "2026-03-24 17:11:10.175908", + "modified": "2026-04-07 17:54:37.020259", "modified_by": "Administrator", "module": "HR", "name": "Employee Onboarding Template", @@ -92,6 +92,15 @@ "report": 1, "role": "HR User", "write": 1 + }, + { + "create": 1, + "delete": 1, + "export": 1, + "read": 1, + "report": 1, + "role": "HR Manager", + "write": 1 } ], "row_format": "Dynamic", diff --git a/hrms/hr/doctype/employee_separation/employee_separation.json b/hrms/hr/doctype/employee_separation/employee_separation.json index 70c8ddcd6a..18b3f0bffb 100644 --- a/hrms/hr/doctype/employee_separation/employee_separation.json +++ b/hrms/hr/doctype/employee_separation/employee_separation.json @@ -155,7 +155,7 @@ ], "is_submittable": 1, "links": [], - "modified": "2024-03-27 13:09:41.099448", + "modified": "2026-04-07 18:18:56.500261", "modified_by": "Administrator", "module": "HR", "name": "Employee Separation", @@ -175,12 +175,24 @@ "share": 1, "submit": 1, "write": 1 + }, + { + "create": 1, + "read": 1, + "report": 1, + "role": "HR Manager", + "write": 1 + }, + { + "read": 1, + "role": "HR User" } ], "quick_entry": 1, + "row_format": "Dynamic", "sort_field": "creation", "sort_order": "DESC", "states": [], "title_field": "employee_name", "track_changes": 1 -} \ No newline at end of file +} diff --git a/hrms/hr/doctype/employee_separation_template/employee_separation_template.json b/hrms/hr/doctype/employee_separation_template/employee_separation_template.json index ba0c0ff9d9..1648e67e00 100644 --- a/hrms/hr/doctype/employee_separation_template/employee_separation_template.json +++ b/hrms/hr/doctype/employee_separation_template/employee_separation_template.json @@ -68,7 +68,7 @@ } ], "links": [], - "modified": "2024-03-27 13:09:41.257092", + "modified": "2026-04-07 18:18:38.087000", "modified_by": "Administrator", "module": "HR", "name": "Employee Separation Template", @@ -85,12 +85,24 @@ "role": "System Manager", "share": 1, "write": 1 + }, + { + "create": 1, + "delete": 1, + "read": 1, + "role": "HR Manager", + "write": 1 + }, + { + "read": 1, + "role": "HR User" } ], + "row_format": "Dynamic", "show_title_field_in_link": 1, "sort_field": "creation", "sort_order": "DESC", "states": [], "title_field": "title", "track_changes": 1 -} \ No newline at end of file +} diff --git a/hrms/hr/doctype/employee_skill_map/employee_skill_map.json b/hrms/hr/doctype/employee_skill_map/employee_skill_map.json index b364a905aa..03fd8e6194 100644 --- a/hrms/hr/doctype/employee_skill_map/employee_skill_map.json +++ b/hrms/hr/doctype/employee_skill_map/employee_skill_map.json @@ -62,7 +62,7 @@ } ], "links": [], - "modified": "2026-03-24 17:20:54.718151", + "modified": "2026-04-07 17:56:17.634829", "modified_by": "Administrator", "module": "HR", "name": "Employee Skill Map", @@ -86,6 +86,15 @@ "report": 1, "role": "HR User", "write": 1 + }, + { + "create": 1, + "delete": 1, + "export": 1, + "read": 1, + "report": 1, + "role": "HR Manager", + "write": 1 } ], "quick_entry": 1, diff --git a/hrms/hr/doctype/exit_interview/exit_interview.json b/hrms/hr/doctype/exit_interview/exit_interview.json index e24bfa443c..833c0baea3 100644 --- a/hrms/hr/doctype/exit_interview/exit_interview.json +++ b/hrms/hr/doctype/exit_interview/exit_interview.json @@ -218,7 +218,7 @@ "index_web_pages_for_search": 1, "is_submittable": 1, "links": [], - "modified": "2026-03-24 17:28:00.876231", + "modified": "2026-04-07 18:21:45.116409", "modified_by": "Administrator", "module": "HR", "name": "Exit Interview", @@ -241,6 +241,16 @@ "read": 1, "report": 1, "role": "HR User" + }, + { + "create": 1, + "email": 1, + "print": 1, + "read": 1, + "report": 1, + "role": "HR Manager", + "share": 1, + "write": 1 } ], "row_format": "Dynamic", diff --git a/hrms/setup.py b/hrms/setup.py index 6c1b89635a..19a86f4669 100644 --- a/hrms/setup.py +++ b/hrms/setup.py @@ -874,6 +874,8 @@ def add_docperms(): docperm = add_permission(doctype, role) if docperm: update_custom_docperm(docperm, ptypes) + + def make_people_workspace_standard(): if frappe.db.exists("Workspace Sidebar", "People"): frappe.db.set_value("Workspace Sidebar", "People", "standard", 1) From 4ad1deca93d1b97731fae9ab754050ba48ad41d8 Mon Sep 17 00:00:00 2001 From: iamkhanraheel Date: Thu, 9 Apr 2026 19:10:25 +0530 Subject: [PATCH 04/13] fix: deault perm for HR manager & HR user --- .../timesheet_activity_breakup.json | 30 +++++++++++++++---- .../job_applicant_source.json | 9 +++--- hrms/hr/doctype/job_offer/job_offer.json | 4 +-- .../job_offer_term/job_offer_term.json | 5 ++-- .../job_opening_template.json | 12 ++++---- .../job_requisition/job_requisition.json | 2 +- hrms/hr/doctype/kra/kra.json | 15 +++------- hrms/hr/doctype/offer_term/offer_term.json | 16 +++------- .../doctype/overtime_type/overtime_type.json | 13 ++++++-- 9 files changed, 58 insertions(+), 48 deletions(-) diff --git a/hrms/hr/dashboard_chart/timesheet_activity_breakup/timesheet_activity_breakup.json b/hrms/hr/dashboard_chart/timesheet_activity_breakup/timesheet_activity_breakup.json index dd042ad644..f61c02877c 100644 --- a/hrms/hr/dashboard_chart/timesheet_activity_breakup/timesheet_activity_breakup.json +++ b/hrms/hr/dashboard_chart/timesheet_activity_breakup/timesheet_activity_breakup.json @@ -3,7 +3,7 @@ "based_on": "", "chart_name": "Timesheet Activity Breakup", "chart_type": "Group By", - "creation": "2022-08-21 14:31:10.401241", + "creation": "2025-07-15 13:15:12.817847", "docstatus": 0, "doctype": "Dashboard Chart", "document_type": "Timesheet Detail", @@ -14,15 +14,35 @@ "idx": 0, "is_public": 1, "is_standard": 1, - "last_synced_on": "2022-08-21 17:55:44.318686", - "modified": "2022-08-21 17:59:38.576219", + "last_synced_on": "2026-04-09 17:49:28.227780", + "modified": "2026-04-09 17:53:47.303664", "modified_by": "Administrator", "module": "HR", "name": "Timesheet Activity Breakup", "number_of_groups": 0, "owner": "Administrator", "parent_document_type": "Timesheet", - "roles": [], + "roles": [ + { + "role": "System Manager" + }, + { + "role": "HR Manager" + }, + { + "role": "HR User" + }, + { + "role": "Manufacturing User" + }, + { + "role": "Accounts User" + }, + { + "role": "Employee" + } + ], + "show_values_over_chart": 0, "source": "", "time_interval": "Yearly", "timeseries": 0, @@ -31,4 +51,4 @@ "use_report_chart": 0, "value_based_on": "", "y_axis": [] -} \ No newline at end of file +} diff --git a/hrms/hr/doctype/job_applicant_source/job_applicant_source.json b/hrms/hr/doctype/job_applicant_source/job_applicant_source.json index 92b48ce313..21d2b785e1 100644 --- a/hrms/hr/doctype/job_applicant_source/job_applicant_source.json +++ b/hrms/hr/doctype/job_applicant_source/job_applicant_source.json @@ -27,7 +27,7 @@ } ], "links": [], - "modified": "2026-03-26 16:06:22.248004", + "modified": "2026-04-09 18:40:30.740866", "modified_by": "Administrator", "module": "HR", "name": "Job Applicant Source", @@ -36,9 +36,6 @@ { "create": 1, "delete": 1, - "email": 1, - "export": 1, - "print": 1, "read": 1, "report": 1, "role": "System Manager", @@ -63,6 +60,10 @@ "role": "HR Manager", "share": 1, "write": 1 + }, + { + "role": "HR User", + "select": 1 } ], "quick_entry": 1, diff --git a/hrms/hr/doctype/job_offer/job_offer.json b/hrms/hr/doctype/job_offer/job_offer.json index 0b8b548999..6d7107e6e3 100644 --- a/hrms/hr/doctype/job_offer/job_offer.json +++ b/hrms/hr/doctype/job_offer/job_offer.json @@ -170,7 +170,7 @@ ], "is_submittable": 1, "links": [], - "modified": "2026-03-26 16:03:29.815627", + "modified": "2026-04-09 18:26:35.285541", "modified_by": "Administrator", "module": "HR", "name": "Job Offer", @@ -183,8 +183,6 @@ "create": 1, "delete": 1, "email": 1, - "export": 1, - "import": 1, "print": 1, "read": 1, "report": 1, diff --git a/hrms/hr/doctype/job_offer_term/job_offer_term.json b/hrms/hr/doctype/job_offer_term/job_offer_term.json index 398fe7cd67..639348d554 100644 --- a/hrms/hr/doctype/job_offer_term/job_offer_term.json +++ b/hrms/hr/doctype/job_offer_term/job_offer_term.json @@ -32,13 +32,14 @@ ], "istable": 1, "links": [], - "modified": "2024-03-27 13:09:57.736798", + "modified": "2026-04-09 18:25:06.137662", "modified_by": "Administrator", "module": "HR", "name": "Job Offer Term", "owner": "Administrator", "permissions": [], + "row_format": "Dynamic", "sort_field": "creation", "sort_order": "DESC", "states": [] -} \ No newline at end of file +} diff --git a/hrms/hr/doctype/job_opening_template/job_opening_template.json b/hrms/hr/doctype/job_opening_template/job_opening_template.json index 600ece31b5..5fab541aec 100644 --- a/hrms/hr/doctype/job_opening_template/job_opening_template.json +++ b/hrms/hr/doctype/job_opening_template/job_opening_template.json @@ -59,7 +59,7 @@ "grid_page_length": 50, "index_web_pages_for_search": 1, "links": [], - "modified": "2026-03-26 16:12:56.854860", + "modified": "2026-04-09 18:30:25.105332", "modified_by": "Administrator", "module": "HR", "name": "Job Opening Template", @@ -78,18 +78,16 @@ "share": 1, "write": 1 }, - { - "read": 1, - "role": "HR User" - }, { "create": 1, "delete": 1, - "export": 1, "read": 1, - "report": 1, "role": "HR Manager", "write": 1 + }, + { + "role": "HR User", + "select": 1 } ], "row_format": "Dynamic", diff --git a/hrms/hr/doctype/job_requisition/job_requisition.json b/hrms/hr/doctype/job_requisition/job_requisition.json index fb287d9cb6..cfd7a1fa57 100644 --- a/hrms/hr/doctype/job_requisition/job_requisition.json +++ b/hrms/hr/doctype/job_requisition/job_requisition.json @@ -202,7 +202,7 @@ "link_fieldname": "job_requisition" } ], - "modified": "2026-03-26 15:56:44.142590", + "modified": "2026-04-09 18:15:35.113740", "modified_by": "Administrator", "module": "HR", "name": "Job Requisition", diff --git a/hrms/hr/doctype/kra/kra.json b/hrms/hr/doctype/kra/kra.json index 18ca168349..7614712d2c 100644 --- a/hrms/hr/doctype/kra/kra.json +++ b/hrms/hr/doctype/kra/kra.json @@ -27,7 +27,7 @@ ], "index_web_pages_for_search": 1, "links": [], - "modified": "2026-03-26 15:54:05.374598", + "modified": "2026-04-09 18:47:44.330762", "modified_by": "Administrator", "module": "HR", "name": "KRA", @@ -48,25 +48,18 @@ }, { "create": 1, + "delete": 1, "email": 1, + "export": 1, "print": 1, "read": 1, - "report": 1, "role": "HR Manager", "share": 1, "write": 1 }, { - "create": 1, - "delete": 1, - "email": 1, - "export": 1, - "print": 1, - "read": 1, - "report": 1, "role": "HR User", - "share": 1, - "write": 1 + "select": 1 } ], "quick_entry": 1, diff --git a/hrms/hr/doctype/offer_term/offer_term.json b/hrms/hr/doctype/offer_term/offer_term.json index 1b1d400fd2..42429c46e1 100644 --- a/hrms/hr/doctype/offer_term/offer_term.json +++ b/hrms/hr/doctype/offer_term/offer_term.json @@ -20,7 +20,7 @@ } ], "links": [], - "modified": "2026-03-26 16:08:08.314009", + "modified": "2026-04-09 18:33:35.969104", "modified_by": "Administrator", "module": "HR", "name": "Offer Term", @@ -42,20 +42,12 @@ { "create": 1, "read": 1, - "role": "HR User", + "role": "HR Manager", "write": 1 }, { - "create": 1, - "delete": 1, - "email": 1, - "export": 1, - "print": 1, - "read": 1, - "report": 1, - "role": "HR Manager", - "share": 1, - "write": 1 + "role": "HR User", + "select": 1 } ], "quick_entry": 1, diff --git a/hrms/hr/doctype/overtime_type/overtime_type.json b/hrms/hr/doctype/overtime_type/overtime_type.json index b6afa10a30..3998907706 100644 --- a/hrms/hr/doctype/overtime_type/overtime_type.json +++ b/hrms/hr/doctype/overtime_type/overtime_type.json @@ -119,7 +119,7 @@ }, { "default": "Salary Component Based", - "description": "Choose how the hourly overtime amount is calculated:\n
  1. Fixed Hourly Rate: A fixed, manually entered hourly rate.
  2. \n
  3. Salary Component-Based:\n\n(Sum of selected component amounts) \u00f7 (Payment Days) \u00f7 (Standard Daily Hours)
", + "description": "Choose how the hourly overtime amount is calculated:\n
  1. Fixed Hourly Rate: A fixed, manually entered hourly rate.
  2. \n
  3. Salary Component-Based:\n\n(Sum of selected component amounts) \u00f7 (Payment Days) \u00f7 (Standard Daily Hours)
", "fieldname": "overtime_calculation_method", "fieldtype": "Select", "label": "Overtime Amount Calculation", @@ -132,7 +132,7 @@ ], "index_web_pages_for_search": 1, "links": [], - "modified": "2026-03-24 16:44:58.729676", + "modified": "2026-04-09 19:08:42.248177", "modified_by": "Administrator", "module": "HR", "name": "Overtime Type", @@ -152,8 +152,15 @@ "write": 1 }, { + "create": 1, + "delete": 1, "read": 1, - "role": "HR User" + "role": "HR Manager", + "write": 1 + }, + { + "role": "HR User", + "select": 1 } ], "row_format": "Dynamic", From 3e8274a8ff2c16cafe0d94cb52596d622ff17d71 Mon Sep 17 00:00:00 2001 From: iamkhanraheel Date: Thu, 9 Apr 2026 19:34:26 +0530 Subject: [PATCH 05/13] fix: remove unwanted import --- hrms/setup.py | 1 - 1 file changed, 1 deletion(-) diff --git a/hrms/setup.py b/hrms/setup.py index 19a86f4669..d535b3e591 100644 --- a/hrms/setup.py +++ b/hrms/setup.py @@ -7,7 +7,6 @@ _, # NOTE: this is not the real translation function ) from frappe.desk.page.setup_wizard.setup_wizard import make_records -from frappe.installer import update_site_config from frappe.permissions import add_permission from hrms.overrides.company import delete_company_fixtures From 37158b65ffaec8a2e485676fc084c262c6e94167 Mon Sep 17 00:00:00 2001 From: iamkhanraheel Date: Fri, 10 Apr 2026 01:52:22 +0530 Subject: [PATCH 06/13] fix: add update_permission_property to update perm in existing custom docperm --- hrms/setup.py | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/hrms/setup.py b/hrms/setup.py index d535b3e591..4b99e770a3 100644 --- a/hrms/setup.py +++ b/hrms/setup.py @@ -1,13 +1,12 @@ import os import frappe -from frappe.core.doctype.custom_docperm.custom_docperm import update_custom_docperm from frappe.custom.doctype.custom_field.custom_field import create_custom_fields from frappe.desk.page.setup_wizard.install_fixtures import ( _, # NOTE: this is not the real translation function ) from frappe.desk.page.setup_wizard.setup_wizard import make_records -from frappe.permissions import add_permission +from frappe.permissions import add_permission, update_permission_property from hrms.overrides.company import delete_company_fixtures @@ -22,6 +21,7 @@ def after_install(): set_single_defaults() create_default_role_profiles() run_post_install_patches() + add_default_hr_permissions() def before_uninstall(): @@ -854,8 +854,8 @@ def get_salary_slip_loan_fields(): } -# Add default permission -def add_docperms(): +# Add default permission for hr roles +def add_default_hr_permissions(): role_permissions = { "HR User": { "Role": {"read": 1}, @@ -870,9 +870,10 @@ def add_docperms(): for role, permissions in role_permissions.items(): for doctype, ptypes in permissions.items(): - docperm = add_permission(doctype, role) - if docperm: - update_custom_docperm(docperm, ptypes) + add_permission(doctype, role) + + for ptype, value in ptypes.items(): + update_permission_property(doctype, role, permlevel=0, ptype=ptype, value=value) def make_people_workspace_standard(): From 739fdfb546abc0c5dc32a1fd5551bfbb6e38227b Mon Sep 17 00:00:00 2001 From: iamkhanraheel Date: Fri, 10 Apr 2026 15:55:45 +0530 Subject: [PATCH 07/13] patch: add default HR roles permissions --- hrms/patches.txt | 1 + hrms/patches/v16_0/add_default_hr_role_permissions.py | 5 +++++ 2 files changed, 6 insertions(+) create mode 100644 hrms/patches/v16_0/add_default_hr_role_permissions.py diff --git a/hrms/patches.txt b/hrms/patches.txt index 0c080d0361..08656f332f 100644 --- a/hrms/patches.txt +++ b/hrms/patches.txt @@ -43,3 +43,4 @@ hrms.patches.v16_0.create_holiday_list_assignments hrms.patches.v16_0.set_base_paid_amount_in_employee_advance hrms.patches.v16_0.set_currency_and_base_fields_in_expense_claim hrms.patches.v16_0.remove_ess_user_type_limit +hrms.patches.v16_0.add_default_hr_role_permissions diff --git a/hrms/patches/v16_0/add_default_hr_role_permissions.py b/hrms/patches/v16_0/add_default_hr_role_permissions.py new file mode 100644 index 0000000000..637ac4d496 --- /dev/null +++ b/hrms/patches/v16_0/add_default_hr_role_permissions.py @@ -0,0 +1,5 @@ +from hrms.setup import add_default_hr_permissions + + +def execute(): + add_default_hr_permissions() From b83b9e33def220fb99815611d5cf635b4ca426cd Mon Sep 17 00:00:00 2001 From: iamkhanraheel Date: Wed, 15 Apr 2026 20:46:35 +0530 Subject: [PATCH 08/13] fix(pwa): approval actions button for self leaves --- frontend/src/components/RequestActionSheet.vue | 14 ++++++++++++++ frontend/src/components/RequestList.vue | 10 +++++++++- frontend/src/views/leave/Dashboard.vue | 17 +++++++++++++++++ hrms/api/__init__.py | 1 + 4 files changed, 41 insertions(+), 1 deletion(-) diff --git a/frontend/src/components/RequestActionSheet.vue b/frontend/src/components/RequestActionSheet.vue index fba2e51c85..5fd9861ff5 100644 --- a/frontend/src/components/RequestActionSheet.vue +++ b/frontend/src/components/RequestActionSheet.vue @@ -85,6 +85,7 @@ class="flex w-full flex-row items-center justify-between gap-3 sticky bottom-0 border-t z-[100] p-4" >