Hi all,
I am trying to implement a role permission, but have not been successful so far.
In our company, the expense request is sent by the concerned employee, and after approval by the manager, the employee recieves the payment from the accountant.
Now, what I have done is set a READ permission for (Accounts User) role for Employee document. This has enabled the accounts user to see a dropdown list of the employees in the payment entry form and select the appropriate employee.
The problem is, the accounts user is able to now also see the employee records in the Employee module.
Now, we do not want the accounts user to access the employee records as they should only be accessed by authorized HR personnel.
We only want the accounts user to see the dropdown list in the payment entry form without seeing the employee records. How can this be achieved?
Your help would be appreciated.
Thanks.
Ziryab
u can fix the issue with permission level in field that u want to hide from accountant
@ziryabimad_87 Could you screen shot or tell more clear about it? Users and Permissions may help you.
Any solutions for this? I’m encountering the exact same issue.
In an Enterprise Company, the Account User should be able to list all the Employees when filling a ‘Payment Entry’ Form, but currently in the ERPNext it is not possible.
Was able to find a work around.
ERPNext v14;
Pre-requisites: Should have create User Permission for the relevant Employee.
Steps;
- Go to ‘Payment Entry’ and click ‘Customization’.
- Find the ‘Party’ field’, click edit, check the ‘Ignore User Permissions’ and Save changes.
- Open a new ‘Client Script’, DocType = Payment Entry, and write the below script;
frappe.ui.form.on('Payment Entry', {
party_type: function (frm) {
if (frm.doc.party_type === 'Employee') {
frm.set_query('party', function () {
return {
filters: {
docstatus: ['<', 2] // Optional: filter active Employees
}
};
});
}
}
});
- Check the ‘Enabled’ checkbox and Click 'Save.