5 Campos 📑 AUTOMÁTICOS Creados por Odoo | Fields de creación y actualización
Understanding Automatic Fields in Node Models
Introduction to Automatic Fields
- José introduces the topic of automatic fields created by models in Node, explaining that these fields are generated automatically when a new model is created.
- These automatic fields are managed by the system and cannot be modified directly; however, they can be read if necessary.
Functionality of Automatic Fields
- It is possible to disable certain automatic fields to prevent unnecessary data storage, particularly for models where these fields are not useful.
- The
log_accessfield defaults to the same value as the_autofield. If no value is specified during model creation,_autowill default to true.
Key Automatic Fields Explained
- The unique identifier for each record in a model is stored in the
idfield, which ensures that no two records share the same identifier.
- The
create_datefield captures the timestamp of when a record was created. This field automatically assigns its value without user intervention.
User and Modification Tracking
- The
create_uidfield stores information about the user who created the record and is linked as a many-to-one relationship with the user model.
- The
write_datefield logs the last modification date of a record, whilewrite_uidkeeps track of which user made that modification.
Summary of Automatic Field Creation