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

This is my code 

<record id="class_dashboard" model="ir.ui.view">
        <field name="name">class.kanban</field>
        <field name="model">class.dash</field>
        <field name="priority">10</field>
        <field name="arch" type="xml">
            <kanban>
                <field name = "name"/>
            <templates>
                <t t-name="kanban-box">
                    <div>
                        <ul>
                            <li t-if="record.name.raw_value">Class Name: <field name="name"/></li>
                        </ul>
                    </div>
                </t>
            </templates>
            </kanban>
        </field>
    </record>

頭像
捨棄
最佳答案

Your architecture for Kanban looks proper. Try by putting more fields in your kanban view. For more detail you can refer kanaban view of Project module.

If you are not getting option of kanban view, might be you forgot to put view mode in action.

E.g. 

<field name="view_type">form</field>

<field name="view_mode">kanban,tree,form,calendar</field>

 

 

頭像
捨棄
作者

in view_mode i have already added kanban. the code is running and am getting an error like "Invalid Architecture! There is no view of type 'kanban' defined for the structure!"

Have you put kanban ? view type should be form. form. Please check it.

Modified my answer. Please check view type. I can't put xml code in comment. It doesn't display xml code in comment. You can delete my previous comment if you have access.

作者 最佳答案

Thanks michael, i had not given . <field name="view_id" ref="class_dashboard"/> Now i am getting the view

頭像
捨棄