Read permission to Auditor Role

I have to give “Read” permission to Auditor for all the Doctypes for which Accounts user have any permission.

There are 80-90 doctypes whose rights are with Accounts User. So, giving read right to auditor for 80-90 doctypes manually from role permission manager is a lengthy task.

Is there any other way of doing that?

Even I am looking for a solution to this. Creating role permission for so many doctypes is very tedious.

Maybe, we should have some feature where we can duplicate the role along with permissions also.

you can use data import tool like below

  1. prepare Excel data like below

  2. create new data import for custom DocPerm and import the above Excel file, click start import.

Hi, @szufisher

Thanks for the reply.

I have tried what you have suggested but after giving permissions to Auditor it is overriding the permissions of Accounts user.
For eg - Accounts user had permissions for doctype “Tax Withholdin Category” but after giving permissions to Auditor for the same doctype the permissions for Accounts user removed. Now there is no permission to Accounts user for doctype “Tax Withholding Category”.

because the internal logic is " if there is Custom DocPerm record for a doctype, then the record in DocPerm (as child table of DocType, which is set by developer) will be ignored, i.e override", there are some doctypes such as Tax Withholding Category, only DocPerm records exist, after you uploaded one r ecord to Custom DocPerm, the default setting by developer in DocPerm is overridden, now please do the following

  1. download via data import tool for doctype Custom DocPerm
  2. download via data import tool for doctype DocType, select only the ID(name) and all fields from child table DocPerm
  3. find out those records in step 2 which doctype not in step 1
  4. upload records from step 3 into Custom DocPerm.

Did you insert new record or update existing one?