Skip to Content
Menu
Dette spørgsmål er blevet anmeldt
2 Besvarelser
1075 Visninger

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
Kassér
Forfatter Bedste svar

Hi all,

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

Avatar
Kassér
Bedste svar

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
Kassér
Related Posts Besvarelser Visninger Aktivitet
0
mar. 15
3200
0
jun. 24
1669
1
jan. 24
2855
0
okt. 23
2603
0
okt. 23
1281