diff --git a/hrms/patches.txt b/hrms/patches.txt index 24e9297cf9..f387f4cfc0 100644 --- a/hrms/patches.txt +++ b/hrms/patches.txt @@ -19,4 +19,5 @@ hrms.patches.v14_0.create_custom_field_in_loan hrms.patches.v14_0.update_loan_repayment_repay_from_salary hrms.patches.v15_0.migrate_loan_type_to_loan_product hrms.patches.v15_0.rename_and_update_leave_encashment_fields -hrms.patches.v14_0.update_title_in_employee_onboarding_and_separation_templates \ No newline at end of file +hrms.patches.v14_0.update_title_in_employee_onboarding_and_separation_templates +hrms.patches.v15_0.make_hr_settings_tab_in_company_master \ No newline at end of file diff --git a/hrms/patches/v15_0/make_hr_settings_tab_in_company_master.py b/hrms/patches/v15_0/make_hr_settings_tab_in_company_master.py new file mode 100644 index 0000000000..b1ca91a74e --- /dev/null +++ b/hrms/patches/v15_0/make_hr_settings_tab_in_company_master.py @@ -0,0 +1,22 @@ +from frappe.custom.doctype.custom_field.custom_field import create_custom_fields + + +def execute(): + custom_fields = { + "Company": [ + { + "fieldname": "hr_and_payroll_tab", + "fieldtype": "Tab Break", + "label": "HR & Payroll", + "insert_after": "credit_limit", + }, + { + "fieldname": "hr_settings_section", + "fieldtype": "Section Break", + "label": "HR & Payroll Settings", + "insert_after": "hr_and_payroll_tab", + }, + ], + } + + create_custom_fields(custom_fields) diff --git a/hrms/setup.py b/hrms/setup.py index aadb4debf3..3d553707e6 100644 --- a/hrms/setup.py +++ b/hrms/setup.py @@ -132,11 +132,17 @@ def get_custom_fields(): }, ], "Company": [ + { + "fieldname": "hr_and_payroll_tab", + "fieldtype": "Tab Break", + "label": "HR & Payroll", + "insert_after": "credit_limit", + }, { "fieldname": "hr_settings_section", "fieldtype": "Section Break", "label": "HR & Payroll Settings", - "insert_after": "credit_limit", + "insert_after": "hr_and_payroll_tab", }, { "depends_on": "eval:!doc.__islocal",