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

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 -

https://www.odoo.com/apps/modules/8.0/web_one2many_kanban/

It is also available for version 9.

อวตาร
ละทิ้ง
คำตอบที่ดีที่สุด

If it is an image 

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
อวตาร
ละทิ้ง
Related Posts ตอบกลับ มุมมอง กิจกรรม
1
ก.ย. 18
13173
1
ธ.ค. 16
4554
0
ม.ค. 23
2105
2
ธ.ค. 23
12677
3
ก.ค. 22
23023