콘텐츠로 건너뛰기
메뉴
커뮤니티에 참여하려면 회원 가입을 하시기 바랍니다.
신고된 질문입니다
4 답글
16051 화면

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
아바타
취소
관련 게시물 답글 화면 활동
1
9월 18
13289
1
12월 16
4657
0
1월 23
2196
2
12월 23
12815
3
7월 22
23192