コンテンツへスキップ
メニュー
この質問にフラグが付けられました
2 返信
1046 ビュー

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
3154
0
6月 24
1655
1
1月 24
2816
0
10月 23
2562
0
10月 23
1251