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.

6

create Kanban view in openerp 7.0

By
Maniganda
on 6/6/13, 5:24 AM 9,913 views

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

6

Borni DHIFI

--Borni DHIFI--
5102
| 6 8 9
Tunis, Tunisia
--Borni DHIFI--

Techno Functional Consultant Odoo(OpenERP) 

http://www.linkedin.com/in/borni

Skype : dhifi.borni

Borni DHIFI
On 6/6/13, 5:49 AM

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

Maniganda
on 6/6/13, 6:01 AM

I edited the answer.

Borni DHIFI
on 6/6/13, 7:23 AM

Thank you its working

Maniganda
on 6/6/13, 7:25 AM

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

2 follower(s)

Stats

Asked: 6/6/13, 5:24 AM
Seen: 9913 times
Last updated: 3/16/15, 8:10 AM