Linked Field
No more fields.related fields.
Instead, you simply specify the name argument for your model:
participant_nick = fields.Char(string='Nick name', related='partner_id.name')
The kwarg type is no longer needed.
Configuring the kwarg repository will automatically save the value to the database. With the new API, the value of the associated field will be automatically updated, sweet.
participant_nick = fields.Char(string='Nick name', store=True, related='partner_id.name')
Note
When updating any related area, not all translations of the related area are translated if the field is saved!
Changing related linked fields will invalidate the cache for all items in the chain.
source share