OdooWiki OCA HUB

Attribute Set

attribute_set folder_open OCA/odoo-pim open_in_new
Generic Modules/Others License: AGPL-3

This module allows the user to create Attributes to any model. This is a basic module in the way that it does not provide views to display these new Attributes.

Each Attribute created will be related to an existing field (in case of a "native" Attribute) or to a newly created field (in case of a "custom" Attribute).

A "custom" Attribute can be of any type : Char, Text, Boolean, Date, Binary... but also Many2one or Many2many.

In case of m2o or m2m, these attributes can be related to custom options created for the Attribute, or to existing Odoo objects from other models.

Last but not least an Attribute can be serialized using the Odoo SA module base_sparse_field . It means that all the serialized attributes will be stored in a single "JSON serialization field" and will not create new columns in the database (and better, it will not create new SQL tables in case of Many2many Attributes), increasing significantly the requests speed when dealing with thousands of Attributes.

auto_awesome What this module does

AI-generated from the code · Odoo 19.0

Lets administrators define extra fields (attributes) on any Odoo model and group them into reusable attribute sets, without writing code. Attributes can be simple values, selections, files, images or links to other records.

This module adds a configuration area to create custom fields, called attributes, on any Odoo model. Each attribute is linked to a real field, either a new one created automatically or an existing native field.

  • Attributes can be text, long text, number, date, yes/no, file, image, single choice (select) or multiple choice (multiselect). Choices can be free text or records from another model, and a domain can restrict which records are offered.
  • Attributes are organised in groups and in attribute sets. Sets can have parent and child sets, and a child set inherits all attributes of its parents. A set can only be attached to records of the same model as its parent.
  • A set can be attached to a record through the attribute_set_id field, and the matching attributes then appear on the form. Attributes can be marked as required on views, and can be hidden when the record's set does not include them.
  • A 'Serialized' option stores several attributes together in one JSON field instead of creating a database column each time; it is refused for date, datetime, file and image attributes.
  • Once created, an attribute's type, relational model and serialized setting cannot be changed, to protect existing data. Deleting a custom attribute also deletes its field.
  • A wizard ('Load Attribute Options') helps pick options from a related model. The module also adds the attribute set field to contacts (res.partner) and countries (res.country).

Depends on

webbase_sparse_field

Menus it adds

menu_attribute_attribute_actionmenu_attribute_group_actionmenu_attribute_option_actionmenu_attribute_set_actionAttributes
Models and fields (8)
  • res.country · new model
  • res.partner · new model
  • attribute.set · new modelname, model (Model Name), model_id, child_ids (Child Sets), parent_id (Parent Set), parent_path, attribute_ids (Attributes), complete_attribute_ids (All Attributes (inherited))
  • attribute.group · new modelname, model_id, sequence (Sequence in Set), attribute_ids
  • attribute.option · new modelname, sequence, value_ref (Reference), attribute_id, relation_model_id
  • attribute.attribute · new modelnature (Attribute Nature), widget, field_id, sequence (Sequence in Group), option_ids, serialized, create_date (Created date), attribute_type, sequence_group (Sequence of the Group), attribute_set_ids (Attribute Sets), relation_model_id, required_on_views (Required (on views)), attribute_group_id, allowed_attribute_set_ids
  • attribute.option.wizard · new modeloption_ids (Attribute Options), attribute_id
  • attribute.set.owner.mixin · new modelattribute_set_id

Text generated by AI (DeepSeek) from reading the Odoo 19.0 code on GitHub; it may contain mistakes, so check the code before deciding. The module is very large and only part of the code was read. View the code on GitHub

Availability by version

Reviewed: 2026-11-03
Confirmed (verified in repository and branch) Estimated (unverified) No information

Confirmation status: 7 confirmed, 2 with no information of 9 versions.

terminal Installation and usage

OCA documentation · Odoo 19.0

Even if this module does not provide views to display some model's Attributes, it provides however a Technical menu in _Settings \> Technical \> Database Structure \> Attributes_ to create new Attributes.

An Attribute is related to both an Attribute Group and an Attribute Set :

  • The Attribute Set is related to the _"model's category"_, i.e. all the model's instances which will display the same Attributes.
  • The Attribute Group is related to the _"attribute's category"_. All the attributes from the same Attribute Set and Attribute Group will be displayed under the same field's Group in the model's view. > 🔎 In order to create a custom Attribute many2one or many2many > related to other Odoo model, you need to activate the Technical > Setting "Advanced Attribute Set settings" > (group_advanced_attribute_set).

---

If you want to create a module displaying some specific model's Attributes :

  • Your model must _inherit the mixin "attribute.set.owner.mixin"
  • You need to add a placeholder <separator name="attributes_placeholder" /> at the desired location in the model's form view.
  • Finally, add a context {"include_native_attribute_view_ref": True} on the action leading to this form view if the model's view needs to display attributes related to native fields together with the other "custom" attributes.

No verified information in OCA: Installation, Configuration.

info

Data imported from GitHub: this sheet reflects the latest catalog review, not a live lookup. Always check the module documentation and staging before installing in production.