In Odoo 17 a new feature called property fields, which brings a fresh approach to managing data. With this update, adding custom fields to your model is simple and does not require any special technical knowledge. It simplifies the process so that even non-technical users can effortlessly input data without needing assistance. This useful feature makes it easier for everyone to personalize and improve their experience with Odoo because it saves time and effort.
2. Introduction
Enterprise
In Odoo 17 a new feature called property fields, which brings a
fresh approach to managing data. With this update, adding
custom fields to your model is simple and does not require any
special technical knowledge. It simplifies the process so that
even non-technical users can effortlessly input data without
needing assistance. This useful feature makes it easier for
everyone to personalize and improve their experience with
Odoo because it saves time and effort.
4. Enterprise
● Users can quickly and easily create new fields by clicking
the "Add a property" button to create custom fields using
property fields.
● A variety of pre-existing field types, including text,
checkbox, integer, decimal, many2one, many2many, and
more, are available for selection using this feature.
● Moreover, during the field creation process, users have
the flexibility to define a default value for the field,
ensuring data consistency and efficiency.
6. Enterprise
● Property field functionality is available in a variety of
modules, including tickets, leads, tasks, and articles, and
it is available in both the community and enterprise
versions of Odoo.
● In each of these modules, the property field
encompasses a list of properties, the values of which are
derived from definitions specified in the parent record.
● While these properties function similarly to regular Odoo
fields, it is important to note that they are not stored as
separate entities in the database.
7. Enterprise
How to add a property field to an existing model:
● In Odoo 17, configuring the properties field is as easy as
adding a custom field to an existing module.
● It is important to note, however, that the model in which
the field is being added must either function as a parent
dependent field or as a subrecord of a record.
● This requirement ensures field's proper operation and
relationship within the module.
● The Properties field is a JSONB type field.
8. Enterprise
● To achieve the desired configuration, We have two
models: ParentModel and ChildModel.
● ParentModel has a field properties_definition, where you
define the properties for child records.
● ChildModel has a field properties where the actual
properties will be stored.
● The parent_id field in ChildModel establishes a Many-to-
One relationship with ParentModel.
12. Enterprise
● The property field in parent dependent allows more
control over how the field is used and is more flexible.
● This enables us to alter a specific child record's properties
field without altering the properties field for other child
records belonging to different parents.
● As a result, it cannot be used for essential platform
operations such as filtering, grouping, searching, and
similar functions.
● This restricts the ability to leverage the properties field
for efficient data manipulation and analysis. The
property field is much more effective in the form view,
but it is not as effective in other views, such as list or
kanban.
13. For More Info.
Check our company website for related
blogs and Odoo book.
Check our YouTube channel for
functional and technical videos in Odoo.
Enterprise
www.cybrosys.com