Odoo Help

Welcome!

This community 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.

0

how to make a kanban view for a new module?

By
willie ho
on 4/17/15, 3:51 AM 603 views

i make a new page with tree view and form view

Now I want to make a kanban view for it and i failed


<record id="custom_kanban" model="ir.ui.view">

<field name="name">custom.kanban</field>

<field name="model">custom</field>

<field name="type">kanban</field>

<field name="arch" type="xml">

<kanban>

<field name="name"/>  

<templates>

<t t-name="kanban-box">

<div class="oe_product_vignette">

<a type="open">

<img class="oe_kanban_image"

t-att-src="kanban_image('custom', 'image', record.id.value)" />

</a>

<div class="oe_product_desc">

<h4>

<a type="edit">

<field name="name"></field>

</a>

</h4>

<ul>

<li>Field 1 : </li>

<li>Field 2 : </li>

</ul>

</div>

</div>

</t>

</templates>

</kanban>

</field>

</record>

When I update the module, it says "except_orm: (u'ValidateError', u'The value "kanban" for the field "ir_act_window.view_type" is not in the selection')"

0

Brett Lehrer

--Brett Lehrer--
1252
| 5 4 8
Milwaukee, United States
--Brett Lehrer--
Director of IT and open source enthusiast.
Brett Lehrer
On 4/17/15, 9:26 AM

The problem isn't your kanban view, it's your action.  In ir.actions.act_window, view_type only refers to one of two options: form or tree.  98% of the time, you want a form type.  An example of the tree type is the Chart of Accounts view - a nested set of groupings where clicking the text calls an action rather than just expanding another grouping.

You need to take kanban out of the view_type and insert it into view_mode, along with any other views you want present on that action.

Your Answer

Please try to give a substantial answer. If you wanted to comment on the question or answer, just use the commenting tool. Please remember that you can always revise your answers - no need to answer the same question twice. Also, please don't forget to vote - it really helps to select the best questions and answers!

About This Community

This community is for professionals and enthusiasts of our products and services. Read Guidelines

Question tools

1 follower(s)

Stats

Asked: 4/17/15, 3:51 AM
Seen: 603 times
Last updated: 4/17/15, 9:27 AM