Merge pull request #29471 from frappe/fix-sorting
diff --git a/erpnext/patches.txt b/erpnext/patches.txt
index 94ad2d6..9f7e733 100644
--- a/erpnext/patches.txt
+++ b/erpnext/patches.txt
@@ -252,7 +252,7 @@
erpnext.patches.v12_0.purchase_receipt_status
erpnext.patches.v13_0.fix_non_unique_represents_company
erpnext.patches.v12_0.add_document_type_field_for_italy_einvoicing
-erpnext.patches.v13_0.make_non_standard_user_type #13-04-2021
+erpnext.patches.v13_0.make_non_standard_user_type #13-04-2021 #17-01-2022
erpnext.patches.v13_0.update_shipment_status
erpnext.patches.v13_0.remove_attribute_field_from_item_variant_setting
erpnext.patches.v13_0.germany_make_custom_fields
diff --git a/erpnext/patches/v13_0/make_non_standard_user_type.py b/erpnext/patches/v13_0/make_non_standard_user_type.py
index a7bdf93..ff241a3 100644
--- a/erpnext/patches/v13_0/make_non_standard_user_type.py
+++ b/erpnext/patches/v13_0/make_non_standard_user_type.py
@@ -10,8 +10,15 @@
def execute():
doctype_dict = {
'projects': ['Timesheet'],
- 'payroll': ['Salary Slip', 'Employee Tax Exemption Declaration', 'Employee Tax Exemption Proof Submission'],
- 'hr': ['Employee', 'Expense Claim', 'Leave Application', 'Attendance Request', 'Compensatory Leave Request']
+ 'payroll': [
+ 'Salary Slip', 'Employee Tax Exemption Declaration', 'Employee Tax Exemption Proof Submission',
+ 'Employee Benefit Application', 'Employee Benefit Claim'
+ ],
+ 'hr': [
+ 'Employee', 'Expense Claim', 'Leave Application', 'Attendance Request', 'Compensatory Leave Request',
+ 'Holiday List', 'Employee Advance', 'Training Program', 'Training Feedback',
+ 'Shift Request', 'Employee Grievance', 'Employee Referral', 'Travel Request'
+ ]
}
for module, doctypes in doctype_dict.items():
diff --git a/erpnext/setup/install.py b/erpnext/setup/install.py
index bafaab8..1d7bad2 100644
--- a/erpnext/setup/install.py
+++ b/erpnext/setup/install.py
@@ -189,7 +189,7 @@
user_type_limit = {}
for user_type, data in user_types.items():
- user_type_limit.setdefault(frappe.scrub(user_type), 10)
+ user_type_limit.setdefault(frappe.scrub(user_type), 20)
update_site_config('user_type_doctype_limit', user_type_limit)
@@ -204,15 +204,33 @@
'apply_user_permission_on': 'Employee',
'user_id_field': 'user_id',
'doctypes': {
- 'Salary Slip': ['read'],
+ # masters
+ 'Holiday List': ['read'],
'Employee': ['read', 'write'],
+ # payroll
+ 'Salary Slip': ['read'],
+ 'Employee Benefit Application': ['read', 'write', 'create', 'delete'],
+ # expenses
'Expense Claim': ['read', 'write', 'create', 'delete'],
+ 'Employee Advance': ['read', 'write', 'create', 'delete'],
+ # leave and attendance
'Leave Application': ['read', 'write', 'create', 'delete'],
'Attendance Request': ['read', 'write', 'create', 'delete'],
'Compensatory Leave Request': ['read', 'write', 'create', 'delete'],
+ # tax
'Employee Tax Exemption Declaration': ['read', 'write', 'create', 'delete'],
'Employee Tax Exemption Proof Submission': ['read', 'write', 'create', 'delete'],
- 'Timesheet': ['read', 'write', 'create', 'delete', 'submit', 'cancel', 'amend']
+ # projects
+ 'Timesheet': ['read', 'write', 'create', 'delete', 'submit', 'cancel', 'amend'],
+ # trainings
+ 'Training Program': ['read'],
+ 'Training Feedback': ['read', 'write', 'create', 'delete', 'submit', 'cancel', 'amend'],
+ # shifts
+ 'Shift Request': ['read', 'write', 'create', 'delete', 'submit', 'cancel', 'amend'],
+ # misc
+ 'Employee Grievance': ['read', 'write', 'create', 'delete'],
+ 'Employee Referral': ['read', 'write', 'create', 'delete'],
+ 'Travel Request': ['read', 'write', 'create', 'delete']
}
}
}