Field Attributes in Odoo

Опубликовано: 24 Июль 2026
на канале: Odoo Mates
1,613
11

#odoofields #fieldattributes #odoo
Attributes of the Field in the Odoo.

Description:
1. string: the label of the field seen by users (string); if not set, the ORM takes the field name in the class (capitalized)

2. help: the tooltip of the field seen by users (string)

3. readonly: whether the field is readonly (boolean, by default ``False``)

4. required: whether the value of the field is required (boolean, by default ``False``)

5. index: whether the field is indexed in database (boolean, by default ``False``)

6. default: the default value for the field; this is either a static value, or a function taking a recordset and returning a value.

7. states: a dictionary mapping state values to lists of UI attribute-value pairs; possible attributes are: 'readonly', 'required', 'invisible'.

8. groups: comma-separated list of group xml ids (string); this restricts the field access to the users of the given groups only.

9. copy: whether the field value should be copied when the record is duplicated.

10. oldname: the previous name of this field, so that ORM can rename it automatically at migration.

11. compute: name of a method that computes the field

12. inverse: name of a method that inverses the field (optional)

13. search: name of a method that implement search on the field (optional)

14. store: whether the field is stored in database (boolean, by default ``False`` on computed fields)

15. compute_sudo: whether the field should be recomputed as superuser to bypass access rights (boolean, by default ``False``)

16. related: sequence of field names

17.company_dependent: whether the field is company-dependent (boolean)

Email: [email protected]