Overslaan naar inhoud
Menu
Je moet geregistreerd zijn om te kunnen communiceren met de community.
Deze vraag is gerapporteerd
2 Antwoorden
992 Weergaven

Hello Odooers

Hope you are doing well.

Below is a snipping image.

The o2m field has a reference field of 'maintenance.equipment', How can I display 'Equipment Category'. Thank you for advise.  



Avatar
Annuleer
Auteur Beste antwoord

Hi all,

I change the o2m field to m2m field. All related fields can be displayed. now 

Avatar
Annuleer
Beste antwoord

you can do that
in py file
class YourModel(models.Model):

    _inherit = 'your.model'


    equipment_category = fields.Many2one(

        related='maintenance_equipment_id.category_id', 

        string='Equipment Category'

    )
Xml file


    your.model.form

    your.model

   

       

           

               

                   

                       

                           

                           

                       

                   

               

           

       

   


Avatar
Annuleer
Gerelateerde posts Antwoorden Weergaven Activiteit
0
mrt. 15
3058
0
jun. 24
1575
1
jan. 24
2685
0
okt. 23
2500
0
okt. 23
1202