コンテンツへスキップ
メニュー
この質問にフラグが付けられました
1 返信
7542 ビュー

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
4850
1
4月 19
4741
0
2月 16
4828
2
2月 24
2829
1
8月 23
4587