How to create a kanban view for custom module in openerp 7.0 , i have created a image field for kanban view how can i use
Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:
- CRM
- e-Commerce
- Financeiro
- Inventário
- PoS
- Project
- MRP
Esta pergunta foi sinalizada
1
Responder
22664
Visualizações
Hi,
Kanban view is created based on QWEB technology QWEB and you can define a qWeb template .but
you can use template for product.product
:
in your object
_columns = {
'name': fields.char('Name'),
'image': fields.binary("Image"),
}
in record view :
<record model="ir.ui.view" id="custom_module_kanban_view">
<field name="name">custom.module.kanban</field>
<field name="model">your_model</field>
<field name="type">kanban</field>
<field name="arch" type="xml">
<kanban>
<!--list of field to be loaded -->
<field name="name" />
<field name="image" />
<templates>
<t t-name="kanban-box">
<div class="oe_product_vignette">
<a type="open">
<img class="oe_kanban_image"
t-att-src="kanban_image('your_model', '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>
in record act_window :
<record id="action_custom_modul_form" model="ir.actions.act_window">
<field name="name">Title custom module</field>
<field name="type">ir.actions.act_window</field>
<field name="res_model">your_model</field>
<field name="view_type">form</field>
<field name="view_mode">kanban,tree,form</field>
</record>
This code is tested and it works without problem.
Thanks for your reply, in kanban view nothing is displaying
I edited the answer.
Thank you its working
Está gostando da discussão? Não fique apenas lendo, participe!
Crie uma conta hoje mesmo para aproveitar os recursos exclusivos e interagir com nossa incrível comunidade!
Inscreva-sePublicações relacionadas | Respostas | Visualizações | Atividade | |
---|---|---|---|---|
|
0
fev. 21
|
2748 | ||
|
1
jul. 25
|
1775 | ||
|
1
mai. 25
|
1852 | ||
QWeb: use t-if to check birthday date
Resolvido
|
|
1
abr. 25
|
2332 | |
|
1
fev. 25
|
1613 |