Skip to Content
मेन्यू
This question has been flagged
2 Replies
1035 Views

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
Discard
Author Best Answer

Hi all,

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

Avatar
Discard
Best Answer

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
Discard
Related Posts Replies Views Activity
0
मार्च 15
3153
0
जून 24
1649
1
जन॰ 24
2812
0
अक्तू॰ 23
2562
0
अक्तू॰ 23
1245