When browsing for 'How to create custom module in OpenERP 7', I stumbled upon this question as to how I can create a kunban view for my custom module.
In all sites regarding custom module creation, they discussed about 'form' and 'tree' views only.
2 Respuestas
6
Best Answer
Hi atchuthan
Of course you can create Kanban
view
below an example
<record model="ir.ui.view" id="My_kanban">
<field name="name">Kanban</field>
<field name="model">my.module</field>
<field name="arch" type="xml">
<kanban>
<field name="name"/>
<field name="code"/>
<field name="lst_price"/>
<templates>
<t t-name="kanban-box">
<div class="oe_kanban_vignette oe_semantic_html_override">
<a type="open"><img t-att-src="kanban_image('my.module', 'image_small', record.id.value)" class="oe_kanban_image"/></a>
<div class="oe_kanban_details">
<h4>
<a type="open">
<t t-if="record.code.raw_value">[<field name="code"/>]</t> <field name="name"/>
</a>
</h4>
<div name="tags"/>
<ul>
<li>Price: <field name="lst_price"></field></li>
</ul>
</div>
</div>
</t>
</templates>
</kanban>
</field>
</record>
Thanks
6
Comentarios
4
Best Answer
Hello,
Yes, you can create a kanban view for a custom module
-This is my simple example of kanban view.
<!-- Product Kanban View -->
<record model="ir.ui.view" id="product.product_kanban_view">
<field name="name">Product Kanban</field>
<field name="model">product.product</field>
<field name="arch" type="xml">
<kanban>
<field name="color"/>
<field name="type"/>
<field name="image_small"/>
<field name="list_price"/>
<templates>
<t t-name="kanban-box">
<div class="oe_kanban_vignette oe_semantic_html_override">
<a type="open"><img t-att-src="kanban_image('product.product', 'image_small', record.id.value)" class="oe_kanban_image"/></a>
<div class="oe_kanban_details">
<h4>
<a type="open">
<t t-if="record.code.raw_value">[<field name="code"/>]</t> <field name="name"/>
</a>
</h4>
<div name="tags"/>
<ul>
<li>Price: <field name="lst_price"></field></li>
</ul>
</div>
</div>
</t>
</templates>
</kanban>
</field>
</record>
Yes can create kanban view for custom module take an example from default openerp product module. product --> product_view.xml "product kanban view" source code.