Skip to Content
เมนู
คุณต้องลงทะเบียนเพื่อโต้ตอบกับคอมมูนิตี้
คำถามนี้ถูกตั้งค่าสถานะ
4 ตอบกลับ
8893 มุมมอง

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.

ผู้เขียน คำตอบที่ดีที่สุด


อวตาร
ละทิ้ง
Related Posts ตอบกลับ มุมมอง กิจกรรม
1
ต.ค. 15
7711
4
มิ.ย. 22
14804
0
มี.ค. 21
2183
0
พ.ค. 18
3160
1
พ.ย. 17
4947