Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: separate tab for HR and Payroll in company #1379

Merged
merged 3 commits into from
Feb 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion hrms/patches.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
hrms.patches.v14_0.update_title_in_employee_onboarding_and_separation_templates
hrms.patches.v15_0.make_hr_settings_tab_in_company_master
22 changes: 22 additions & 0 deletions hrms/patches/v15_0/make_hr_settings_tab_in_company_master.py
Original file line number Diff line number Diff line change
@@ -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)
8 changes: 7 additions & 1 deletion hrms/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
Loading