跳至内容
菜单
此问题已终结
1 回复
7922 查看

i am new to odoo i, am trying to get data from my different model to one single form in tree view .how i can do it please help???

thanks


形象
丢弃
最佳答案

Your tree view can only show fields in a model, but for you to show the data from another model in your tree view, you can create a field and relate the new field to the data you want to get:

many_two_one_field = fields.Many2one('res.partner')
new_field = fields.Char(related='many_two_one_field.data_field')

The above shows there is a connecting field in your current model with the field you want to get that from; many_two_one_field

Regards

形象
丢弃
相关帖文 回复 查看 活动
1
11月 22
4023
2
8月 22
8432
1
1月 25
10293
1
9月 21
7447
1
3月 21
6339