Restrict user not to access docutype in draft status

Right now, users can see their salary slips even if it is in draft status. Is it possible to restrict the access to see only submitted salary slips?

1 Like

Hi @kirthi,

Yes, you can restrict the access to users to see only submitted salary slip using hooks
by adding the query conditions to your app’s hook for the salary slip.

Please check the frappe hooks.py and query condition example

Thanks,
Makarand

3 Likes

Thanks a lot @makarand_b That worked like a charm. You saved me lot of time/headache. Thanks again.