In the previous recipes, we've seen how you we hide fields from some users with group arguments in the Python field definition. There is another way to hide fields in the user interface: by adding security groups on the XML tags in the view definition. You can also use security groups on menus to hide them from a particular user.
Hiding view elements and menus based on groups
Getting ready
For this recipe, we will reuse the my_library add-on module from the previous recipe. In the previous recipe, we added a button in the <header> tag. We will hide that whole header from a few users by adding a groups attribute to it.
Add the model, the views, and the menus for the book.category model. We will hide the category...