跳至內容
選單
此問題已被標幟
2 回覆
1060 瀏覽次數

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.  



頭像
捨棄
作者 最佳答案

Hi all,

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

頭像
捨棄
最佳答案

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

   

       

           

               

                   

                       

                           

                           

                       

                   

               

           

       

   


頭像
捨棄
相關帖文 回覆 瀏覽次數 活動
0
3月 15
3159
0
6月 24
1660
1
1月 24
2819
0
10月 23
2563
0
10月 23
1257