Help

3

TypeError: node is undefined Kanban view

Avatar
Muhammed Nishad

I'm trying to create a Kanban view that displays some data I have specified , But it shows this error

TypeError: node is undefined

Here is my code:

<record id="projection_view_kanban" model="ir.ui.view">
<field name="name">projection.target.kanban</field>
<field name="model">projection.target</field>
<field name="priority" eval="8"/>
<field name="arch" type="xml">
<kanban class="o_kanban_mobile">
<field name="sales_man"/>
<field name="target"/>
</kanban>
</field>
</record>

Somebody please  tell me how to deal with this?

Avatar
Discard
1 Answer
4
Avatar
Muhammed Nishad
Best Answer

I have found a solution

The error was because Gave different field inside template than on the outside now my code is:

<record id="projection_view_kanban" model="ir.ui.view">
<field name="name">projection.target.kanban</field>
<field name="model">projection.target</field>
<field name="priority" eval="8"/>
<field name="arch" type="xml">
<kanban class="o_res_partner_kanban" create="false">
<field name="sales_man"/>
<field name="target" />
<field name="sal" />
<templates>
<t t-name="kanban-box">
<div class="oe_kanban_global_click o_res_partner_kanban" style="background-color:#00438a;color:#fff;border-radius:15px;">
<div class="oe_kanban_details">
<strong class="o_kanban_record_title oe_partner_heading" style="font-size:16px;">
<field name="sales_man" style="display:block;"/>
</strong>
<span style="display:block;">Target:<field name="target" /></span>
<span style="display:block;">Achievement:<field name="sal" /></span>
</div>
</div>
</t>
</templates>
</kanban>
</field>
</record>
Avatar
Discard