mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-20 13:39:18 +00:00
chore: Remove HR/Payroll related setups and fixtures
- Fixtures moved to HRMS app - 'HR' field in Terms and Conditions removed, added via HRMS setup
This commit is contained in:
@@ -59,21 +59,6 @@ def set_default_settings(args):
|
||||
delivery_settings.dispatch_template = _("Dispatch Notification")
|
||||
delivery_settings.save()
|
||||
|
||||
hr_settings = frappe.get_doc("HR Settings")
|
||||
hr_settings.emp_created_by = "Naming Series"
|
||||
hr_settings.leave_approval_notification_template = _("Leave Approval Notification")
|
||||
hr_settings.leave_status_notification_template = _("Leave Status Notification")
|
||||
|
||||
hr_settings.send_interview_reminder = 1
|
||||
hr_settings.interview_reminder_template = _("Interview Reminder")
|
||||
hr_settings.remind_before = "00:15:00"
|
||||
|
||||
hr_settings.send_interview_feedback_reminder = 1
|
||||
hr_settings.feedback_reminder_notification_template = _("Interview Feedback Reminder")
|
||||
|
||||
hr_settings.exit_questionnaire_notification_template = _("Exit Questionnaire Notification")
|
||||
hr_settings.save()
|
||||
|
||||
|
||||
def set_no_copy_fields_in_variant_settings():
|
||||
# set no copy fields of an item doctype to item variant settings
|
||||
|
||||
@@ -83,91 +83,6 @@ def install(country=None):
|
||||
"is_group": 0,
|
||||
"parent_item_group": _("All Item Groups"),
|
||||
},
|
||||
# salary component
|
||||
{
|
||||
"doctype": "Salary Component",
|
||||
"salary_component": _("Income Tax"),
|
||||
"description": _("Income Tax"),
|
||||
"type": "Deduction",
|
||||
"is_income_tax_component": 1,
|
||||
},
|
||||
{
|
||||
"doctype": "Salary Component",
|
||||
"salary_component": _("Basic"),
|
||||
"description": _("Basic"),
|
||||
"type": "Earning",
|
||||
},
|
||||
{
|
||||
"doctype": "Salary Component",
|
||||
"salary_component": _("Arrear"),
|
||||
"description": _("Arrear"),
|
||||
"type": "Earning",
|
||||
},
|
||||
{
|
||||
"doctype": "Salary Component",
|
||||
"salary_component": _("Leave Encashment"),
|
||||
"description": _("Leave Encashment"),
|
||||
"type": "Earning",
|
||||
},
|
||||
# expense claim type
|
||||
{"doctype": "Expense Claim Type", "name": _("Calls"), "expense_type": _("Calls")},
|
||||
{"doctype": "Expense Claim Type", "name": _("Food"), "expense_type": _("Food")},
|
||||
{"doctype": "Expense Claim Type", "name": _("Medical"), "expense_type": _("Medical")},
|
||||
{"doctype": "Expense Claim Type", "name": _("Others"), "expense_type": _("Others")},
|
||||
{"doctype": "Expense Claim Type", "name": _("Travel"), "expense_type": _("Travel")},
|
||||
# leave type
|
||||
{
|
||||
"doctype": "Leave Type",
|
||||
"leave_type_name": _("Casual Leave"),
|
||||
"name": _("Casual Leave"),
|
||||
"allow_encashment": 1,
|
||||
"is_carry_forward": 1,
|
||||
"max_continuous_days_allowed": "3",
|
||||
"include_holiday": 1,
|
||||
},
|
||||
{
|
||||
"doctype": "Leave Type",
|
||||
"leave_type_name": _("Compensatory Off"),
|
||||
"name": _("Compensatory Off"),
|
||||
"allow_encashment": 0,
|
||||
"is_carry_forward": 0,
|
||||
"include_holiday": 1,
|
||||
"is_compensatory": 1,
|
||||
},
|
||||
{
|
||||
"doctype": "Leave Type",
|
||||
"leave_type_name": _("Sick Leave"),
|
||||
"name": _("Sick Leave"),
|
||||
"allow_encashment": 0,
|
||||
"is_carry_forward": 0,
|
||||
"include_holiday": 1,
|
||||
},
|
||||
{
|
||||
"doctype": "Leave Type",
|
||||
"leave_type_name": _("Privilege Leave"),
|
||||
"name": _("Privilege Leave"),
|
||||
"allow_encashment": 0,
|
||||
"is_carry_forward": 0,
|
||||
"include_holiday": 1,
|
||||
},
|
||||
{
|
||||
"doctype": "Leave Type",
|
||||
"leave_type_name": _("Leave Without Pay"),
|
||||
"name": _("Leave Without Pay"),
|
||||
"allow_encashment": 0,
|
||||
"is_carry_forward": 0,
|
||||
"is_lwp": 1,
|
||||
"include_holiday": 1,
|
||||
},
|
||||
# Employment Type
|
||||
{"doctype": "Employment Type", "employee_type_name": _("Full-time")},
|
||||
{"doctype": "Employment Type", "employee_type_name": _("Part-time")},
|
||||
{"doctype": "Employment Type", "employee_type_name": _("Probation")},
|
||||
{"doctype": "Employment Type", "employee_type_name": _("Contract")},
|
||||
{"doctype": "Employment Type", "employee_type_name": _("Commission")},
|
||||
{"doctype": "Employment Type", "employee_type_name": _("Piecework")},
|
||||
{"doctype": "Employment Type", "employee_type_name": _("Intern")},
|
||||
{"doctype": "Employment Type", "employee_type_name": _("Apprentice")},
|
||||
# Stock Entry Type
|
||||
{"doctype": "Stock Entry Type", "name": "Material Issue", "purpose": "Material Issue"},
|
||||
{"doctype": "Stock Entry Type", "name": "Material Receipt", "purpose": "Material Receipt"},
|
||||
@@ -189,22 +104,6 @@ def install(country=None):
|
||||
"name": "Material Consumption for Manufacture",
|
||||
"purpose": "Material Consumption for Manufacture",
|
||||
},
|
||||
# Designation
|
||||
{"doctype": "Designation", "designation_name": _("CEO")},
|
||||
{"doctype": "Designation", "designation_name": _("Manager")},
|
||||
{"doctype": "Designation", "designation_name": _("Analyst")},
|
||||
{"doctype": "Designation", "designation_name": _("Engineer")},
|
||||
{"doctype": "Designation", "designation_name": _("Accountant")},
|
||||
{"doctype": "Designation", "designation_name": _("Secretary")},
|
||||
{"doctype": "Designation", "designation_name": _("Associate")},
|
||||
{"doctype": "Designation", "designation_name": _("Administrative Officer")},
|
||||
{"doctype": "Designation", "designation_name": _("Business Development Manager")},
|
||||
{"doctype": "Designation", "designation_name": _("HR Manager")},
|
||||
{"doctype": "Designation", "designation_name": _("Project Manager")},
|
||||
{"doctype": "Designation", "designation_name": _("Head of Marketing and Sales")},
|
||||
{"doctype": "Designation", "designation_name": _("Software Developer")},
|
||||
{"doctype": "Designation", "designation_name": _("Designer")},
|
||||
{"doctype": "Designation", "designation_name": _("Researcher")},
|
||||
# territory: with two default territories, one for home country and one named Rest of the World
|
||||
{
|
||||
"doctype": "Territory",
|
||||
@@ -356,11 +255,6 @@ def install(country=None):
|
||||
{"doctype": "Issue Priority", "name": _("Low")},
|
||||
{"doctype": "Issue Priority", "name": _("Medium")},
|
||||
{"doctype": "Issue Priority", "name": _("High")},
|
||||
# Job Applicant Source
|
||||
{"doctype": "Job Applicant Source", "source_name": _("Website Listing")},
|
||||
{"doctype": "Job Applicant Source", "source_name": _("Walk In")},
|
||||
{"doctype": "Job Applicant Source", "source_name": _("Employee Referral")},
|
||||
{"doctype": "Job Applicant Source", "source_name": _("Campaign")},
|
||||
{"doctype": "Email Account", "email_id": "sales@example.com", "append_to": "Opportunity"},
|
||||
{"doctype": "Email Account", "email_id": "support@example.com", "append_to": "Issue"},
|
||||
{"doctype": "Email Account", "email_id": "jobs@example.com", "append_to": "Job Applicant"},
|
||||
@@ -374,18 +268,6 @@ def install(country=None):
|
||||
{"doctype": "Project Type", "project_type": "Internal"},
|
||||
{"doctype": "Project Type", "project_type": "External"},
|
||||
{"doctype": "Project Type", "project_type": "Other"},
|
||||
{"doctype": "Offer Term", "offer_term": _("Date of Joining")},
|
||||
{"doctype": "Offer Term", "offer_term": _("Annual Salary")},
|
||||
{"doctype": "Offer Term", "offer_term": _("Probationary Period")},
|
||||
{"doctype": "Offer Term", "offer_term": _("Employee Benefits")},
|
||||
{"doctype": "Offer Term", "offer_term": _("Working Hours")},
|
||||
{"doctype": "Offer Term", "offer_term": _("Stock Options")},
|
||||
{"doctype": "Offer Term", "offer_term": _("Department")},
|
||||
{"doctype": "Offer Term", "offer_term": _("Job Description")},
|
||||
{"doctype": "Offer Term", "offer_term": _("Responsibilities")},
|
||||
{"doctype": "Offer Term", "offer_term": _("Leaves per Year")},
|
||||
{"doctype": "Offer Term", "offer_term": _("Notice Period")},
|
||||
{"doctype": "Offer Term", "offer_term": _("Incentives")},
|
||||
{"doctype": "Print Heading", "print_heading": _("Credit Note")},
|
||||
{"doctype": "Print Heading", "print_heading": _("Debit Note")},
|
||||
# Share Management
|
||||
@@ -418,73 +300,6 @@ def install(country=None):
|
||||
{"doctype": "Sales Partner Type", "sales_partner_type": _(d)} for d in default_sales_partner_type
|
||||
]
|
||||
|
||||
base_path = frappe.get_app_path("erpnext", "hr", "doctype")
|
||||
response = frappe.read_file(
|
||||
os.path.join(base_path, "leave_application/leave_application_email_template.html")
|
||||
)
|
||||
|
||||
records += [
|
||||
{
|
||||
"doctype": "Email Template",
|
||||
"name": _("Leave Approval Notification"),
|
||||
"response": response,
|
||||
"subject": _("Leave Approval Notification"),
|
||||
"owner": frappe.session.user,
|
||||
}
|
||||
]
|
||||
|
||||
records += [
|
||||
{
|
||||
"doctype": "Email Template",
|
||||
"name": _("Leave Status Notification"),
|
||||
"response": response,
|
||||
"subject": _("Leave Status Notification"),
|
||||
"owner": frappe.session.user,
|
||||
}
|
||||
]
|
||||
|
||||
response = frappe.read_file(
|
||||
os.path.join(base_path, "interview/interview_reminder_notification_template.html")
|
||||
)
|
||||
|
||||
records += [
|
||||
{
|
||||
"doctype": "Email Template",
|
||||
"name": _("Interview Reminder"),
|
||||
"response": response,
|
||||
"subject": _("Interview Reminder"),
|
||||
"owner": frappe.session.user,
|
||||
}
|
||||
]
|
||||
|
||||
response = frappe.read_file(
|
||||
os.path.join(base_path, "interview/interview_feedback_reminder_template.html")
|
||||
)
|
||||
|
||||
records += [
|
||||
{
|
||||
"doctype": "Email Template",
|
||||
"name": _("Interview Feedback Reminder"),
|
||||
"response": response,
|
||||
"subject": _("Interview Feedback Reminder"),
|
||||
"owner": frappe.session.user,
|
||||
}
|
||||
]
|
||||
|
||||
response = frappe.read_file(
|
||||
os.path.join(base_path, "exit_interview/exit_questionnaire_notification_template.html")
|
||||
)
|
||||
|
||||
records += [
|
||||
{
|
||||
"doctype": "Email Template",
|
||||
"name": _("Exit Questionnaire Notification"),
|
||||
"response": response,
|
||||
"subject": _("Exit Questionnaire Notification"),
|
||||
"owner": frappe.session.user,
|
||||
}
|
||||
]
|
||||
|
||||
base_path = frappe.get_app_path("erpnext", "stock", "doctype")
|
||||
response = frappe.read_file(
|
||||
os.path.join(base_path, "delivery_trip/dispatch_notification_template.html")
|
||||
@@ -514,7 +329,6 @@ def set_more_defaults():
|
||||
# Do more setup stuff that can be done here with no dependencies
|
||||
update_selling_defaults()
|
||||
update_buying_defaults()
|
||||
update_hr_defaults()
|
||||
add_uom_data()
|
||||
update_item_variant_settings()
|
||||
|
||||
@@ -539,22 +353,6 @@ def update_buying_defaults():
|
||||
buying_settings.save()
|
||||
|
||||
|
||||
def update_hr_defaults():
|
||||
hr_settings = frappe.get_doc("HR Settings")
|
||||
hr_settings.emp_created_by = "Naming Series"
|
||||
hr_settings.leave_approval_notification_template = _("Leave Approval Notification")
|
||||
hr_settings.leave_status_notification_template = _("Leave Status Notification")
|
||||
|
||||
hr_settings.send_interview_reminder = 1
|
||||
hr_settings.interview_reminder_template = _("Interview Reminder")
|
||||
hr_settings.remind_before = "00:15:00"
|
||||
|
||||
hr_settings.send_interview_feedback_reminder = 1
|
||||
hr_settings.feedback_reminder_notification_template = _("Interview Feedback Reminder")
|
||||
|
||||
hr_settings.save()
|
||||
|
||||
|
||||
def update_item_variant_settings():
|
||||
# set no copy fields of an item doctype to item variant settings
|
||||
doc = frappe.get_doc("Item Variant Settings")
|
||||
|
||||
Reference in New Issue
Block a user