feat: additional doctypes access for ESS user (#29317)
This commit is contained in:
parent
7eab945d8c
commit
6c1c85be0c
@ -252,7 +252,7 @@ erpnext.patches.v12_0.add_gst_category_in_delivery_note
|
||||
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
|
||||
|
@ -10,8 +10,15 @@ from erpnext.setup.install import add_non_standard_user_types
|
||||
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():
|
||||
|
@ -189,7 +189,7 @@ def add_non_standard_user_types():
|
||||
|
||||
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 @@ def get_user_types_data():
|
||||
'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']
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user