Skip to Content
Menú
This question has been flagged
1 Respondre
3661 Vistes

Assumption: fields.related is needed to display the fields of two related tables in the same view.

one2many, many2one and many2many can be specified in Field Type in Settings>Technical>Database Structure>Models Create: Fields

Avatar
Descartar
Best Answer

Pulled from the documentation.  Here are the relevant part:

A special case of computed fields are related (proxy) fields, which provide the value of a sub-field on the current record. They are defined by setting the related parameter and like regular computed fields they can be stored:

nickname = fields.Char(related='user_id.partner_id.name', store=True)

Avatar
Descartar
Related Posts Respostes Vistes Activitat
1
de jul. 23
1963
2
de març 15
9147
2
de febr. 25
805
0
de maig 24
1190
1
d’ag. 23
4050