Overslaan naar inhoud
Menu
Je moet geregistreerd zijn om te kunnen communiceren met de community.
Deze vraag is gerapporteerd
1 Beantwoorden
3700 Weergaven

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
Annuleer
Beste antwoord

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
Annuleer
Gerelateerde posts Antwoorden Weergaven Activiteit
1
jul. 23
2002
2
mrt. 15
9212
2
feb. 25
876
0
mei 24
1208
1
aug. 23
4083