Contributors mailing list archives
contributors@odoo-community.org
Browse archives
Re: Modules for read only User Groups
by
Vauxoo, Moisés López Calderón
If you want a user with readonly for all models, you can create a group "readonly" and inherit the "ir_model_access.check" method to check if the user has this group so the permission is just read.
Something like this:
You can use the current groups way to enable menus and models permissions, but if you assign the new readonly group so, this user only will can read (not write, create, unlink) even if the original groups allow.
I hope this can be helpful for you.
Feel free to contribute it to OCA if you think that it is helpful
Disclaimer1: It is only a POC without a depth analysis.
Disclaimer2: Readonly group apply for all models. Maybe, it could be configurable making a few changes.
El mar., 12 may. 2020 a las 5:22, Pedro M. Baeza (Tecnativa) (<pedro.baeza@tecnativa.com>) escribió:
For me the good OCA module is one that allows this as a general switch, not having to create an specific module for each area (and leaving out possible specific modules). I think this can be done at ORM level overriding write/create or even lower layers, or _check_access.Regards._______________________________________________
Mailing-List: https://odoo-community.org/groups/contributors-15
Post to: mailto:contributors@odoo-community.org
Unsubscribe: https://odoo-community.org/groups?unsubscribe
Moisés López Calderón
Mobile: (+521) 477-752-22-30
Twitter: @moylop260
Twitter: @vauxoo
Reference
-
Modules for read only User Groups
by Daniel Reis <dgreis@sapo.pt> - 11/05/2020 11:00:00 - 0-
Re: Modules for read only User Groups
byClosingAp Open Source Integrators Europe, LDA, Daniel Reis