Adding access security
When adding a new data model, you need to define who can create, read, update, and delete records. When creating a totally new application, this can involve defining new user groups. Consequently, if a user doesn't have these access rights, then Odoo will not display your menus and views. In the previous recipe, we accessed our menu by converting an
admin user into a superuser. After completing this recipe, you will be able to access menus and views for our
Library module directly as an
This recipe builds on the
Library Book model from the previous recipes and defines a new security group of users to control who can access or modify the records of the books.
The add-on module that implements the
library.book model, which was provided in the previous recipe, is needed because, in this recipe, we will add the security rules for it. The paths that are used are relative to our add-on module location (for example,