My requirement is to show only specific modules in the “Allow Modules” section in the user doctype, to the sub-admin while creating a new user.
I have done this using the following technique
Now the problem I am facing is, after creating the user only specified modules (that I want) are showing but all the modules (even which are not shown) are getting saved as allowed (checked true) when I am saving the user, so now I want all the modules to be unchecked by default.
How to have all the allow modules in user doctype unchecked by default after saving the new user?
when i get values for the block modues from the api. it blocks those module[it unchecked those modules] but i want to check those modules particularly, but by default all the module is checked…how can i uncheck other modules and check the specific module from the api.?
[ the passing block modules is getting unchecked but i want them to be checked specifically and the other modules to be uncheked ]