Bỏ qua để đến Nội dung
Menu
Câu hỏi này đã bị gắn cờ
1 Trả lời
6344 Lượt xem

I would like to be able to each item in a list in my form view dynamically so that it will work with 1 or with many items. I have a feeling that the t-foreach is my best bet but I am not really sure how to use it in this instance.


For a single item I would do it as
<field name="item_name" widget="pdf_viewer" />

But with a list I am not trying to display a specific field I am trying to display the data inside a list.

<t t-foreach="list_name" t-as="item">
  <field name="item" widget="pdf_viewer" />
</ t>

Would I be able to do something along these lines?

Ảnh đại diện
Huỷ bỏ
Tác giả

I haven't tried it yet, but I think the information from this post will help me achieve what I am trying to do.

I will post an update once I try it.

https://www.odoo.com/forum/help-1/question/how-to-print-a-one2many-field-values-in-qweb-report-in-odoo12-community-144726

Bài viết liên quan Trả lời Lượt xem Hoạt động
0
thg 9 24
1117
1
thg 8 16
6068
1
thg 5 25
2995
1
thg 5 24
2041
2
thg 8 23
12809