Odoo Help

0

How to access one2many fields values on Kanban view odoo 0.8 ?

By
Mostafa Abd El Fattah
on 8/19/16, 8:08 AM 1,894 views

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. 

1
Ajeet Yadav
On 8/20/16, 12:57 AM

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.

1

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>
0
Marcin Pieczyński
On 4/6/17, 6:01 AM

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

About This Community

This platform is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.

Register

Odoo Training Center

Access to our E-learning platform and experience all Odoo Apps through learning videos, exercises and Quizz.

Test it now

Question tools

1 follower(s)

Stats

Asked: 8/19/16, 8:08 AM
Seen: 1894 times
Last updated: 4/6/17, 6:01 AM