Перейти к содержимому
Меню
Чтобы взаимодействовать с сообществом, необходимо зарегистрироваться.
Этот вопрос был отмечен
2 Ответы
1045 Представления

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

   

       

           

               

                   

                       

                           

                           

                       

                   

               

           

       

   


Аватар
Отменить
Related Posts Ответы Просмотры Активность
0
мар. 15
3154
0
июн. 24
1653
1
янв. 24
2816
0
окт. 23
2562
0
окт. 23
1251