Se rendre au contenu
Menu
Cette question a été signalée
1 Répondre
3758 Vues

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
Ignorer
Meilleure réponse

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
Ignorer
Publications associées Réponses Vues Activité
1
juil. 23
2055
2
mars 15
9291
2
févr. 25
911
0
mai 24
1233
1
août 23
4131