Dynamic attributes

Some attributes allow us to dynamically change the display of view elements, depending on the record's values.

A couple of attributes provide an easy way to control the visibility of a particular user interface element:

  • groups can make an element visible depending on the security groups the current user belongs to. Only the members of the specified groups will see it. It expects a comma-separated list of Group XML IDs.
  • states can make an element visible depending on the record's State field. It expects a comma-separated list of State values, and only works on models with an actual state field.

Other than these, we also have a flexible method available to set element visibility depending on a client-side dynamically evaluated ...

Get Odoo 11 Development Essentials - Third Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.