Create security groups and assign them to users
Security access in Odoo is configured through security groups: permissions are given to groups and then groups are assigned to users. Each functional area has base security groups provided by a central application.
When the addon modules extend an existing application, they should add permissions to the corresponding groups, as shown in the Add security access to models recipe later.
When the addon modules add a new functional area, not yet covered by an existing central application, they should add the corresponding security groups. Usually, we should have at least the user and manager roles.
Taking the Library example we introduced in Chapter 3, Creating Odoo Modules, it doesn't fit neatly in any of the Odoo core apps, so we add the security groups for it.
Getting ready
This recipe assumes you have an instance ready, with the my_module
available, as described in Chapter 3, Creating Odoo Modules
.
How to do it...
To add new access security...