跳至內容
選單
此問題已被標幟
1 回覆
7822 瀏覽次數

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?

頭像
捨棄
作者 最佳答案

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>
頭像
捨棄
相關帖文 回覆 瀏覽次數 活動
2
9月 19
5139
1
4月 19
4957
0
2月 16
5106
2
2月 24
3294
1
8月 23
4893