Limiting record access using record rules

A common need for an application is to be able to limit which records are available to each user on a specific model.

This is achieved using record rules. A record rule is a domain filter expression defined on a model that will then be added on every data query made by the affected users.

As an example, we will add a record rule on the Library Books model so that users in the Employee group will only have access to the public books.

This recipe assumes that you have an instance ready, with my_library available, as described in Chapter 4, Creating Odoo Add-On Modules.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset