Přejít na obsah
Menu
You need to be registered to interact with the community.
This question has been flagged
2 Odpovědi
989 Zobrazení

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
Zrušit
Autor Nejlepší odpověď

Hi all,

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

Avatar
Zrušit
Nejlepší odpověď

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
Zrušit
Related Posts Odpovědi Zobrazení Aktivita
0
bře 15
3057
0
čvn 24
1574
1
led 24
2683
0
říj 23
2498
0
říj 23
1200