i need to loop over the records of o2m filed in kanban to show what i need from the other model.
all i need in kanban view to do this
<t t-foreach="o2m_field" t-as"record">
<t t-esc="record.name"/>
</t>.
is that possible to do it.
Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:
i need to loop over the records of o2m filed in kanban to show what i need from the other model.
all i need in kanban view to do this
<t t-foreach="o2m_field" t-as"record">
<t t-esc="record.name"/>
</t>.
is that possible to do it.
Below module will work for your requirement -
rooms = fields.One2many('block.rooms', 'block_id')
<t t-foreach="record.rooms.raw_value" t-as="room">
<img t-att-src="kanban_image('block.room', 'image_field_name', room)" t-att-data-member_id="room"/>
</t>
Hello everyone,
i want to know that is there any solution to print other then image field of one2many in kanban without using any module is there any solution??
I got some problem with web_one2many_kanban module.
I have o2many field in model:
quotations = fields.One2many('sale.order', 'lead_id', ondelete='cascade')
I put "quotations" field into kanban tag in kanban view.
In xml:
<t t-foreach="quotations" t-as="r">
<t t-esc="r"/>
</t>
According to description it shoul works but I got error as below:
Error: QWeb2 - template['kanban-box']: Runtime Error: Error: QWeb2 - template['kanban-box']: No enumerator given to foreach
Tạo tài khoản ngay hôm nay để tận hưởng các tính năng độc đáo và tham gia cộng đồng tuyệt vời của chúng tôi!
Đăng kýBài viết liên quan | Trả lời | Lượt xem | Hoạt động | |
---|---|---|---|---|
|
1
thg 9 18
|
13222 | ||
|
1
thg 12 16
|
4585 | ||
|
0
thg 1 23
|
2162 | ||
|
2
thg 12 23
|
12706 | ||
|
3
thg 7 22
|
23077 |
try this: https://learnopenerp.blogspot.com/2021/09/display-access-one2many-field-value-kanban-view-odoo14.html