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

Hi everyone,

Is it possible to display one2many list in tree view?

In my case I have model named Shelf. Inside this model there are several fields like:

- shelf color  (char)

- shelf number (integer)

 - product_list  (one2many)  (has data about product like product name,product status etc.)


I want to display all data of this module in one line in tree view. So it would be look like:

shelf color/shelf number/ product name1/ product status 1/ product name2/product status 2.......


but when I write

<tree >
<field name="shelf_color" />
<field name="shelf_number" />
<field name="product_list"></field>
</tree>

It just display number of data in product_list field. How can I expand this field?

May be somebody know work around to display all data in line?


頭像
捨棄
最佳答案

Check this one, 

https://www.odoo.com/forum/help-1/question/one2many-fields-in-tree-views-122826

頭像
捨棄
作者

Yes, I think I will do that in this way. Thank you.

最佳答案

<field name="product_list">
<tree >
<field name="shelf_color" />
<field name="shelf_number" />
</tree>
</field>

Try like that one2many then tree and then other fields.

頭像
捨棄
作者

Thank you for your response, Muhammad.

In this case it still shows number of records instead records.

I also tried put widget many2many_tags, which shows a name of added field but not all field data.

作者 最佳答案


頭像
捨棄
相關帖文 回覆 瀏覽次數 活動
1
10月 15
7729
4
6月 22
14807
0
3月 21
2185
0
5月 18
3163
1
11月 17
4952