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

<a type="edit"> odoo kanban

By
Juan Muñiz Sobradelo
on 7/13/16, 3:56 AM 288 views

Hello;


Im having problems with the kanban view, i want to make it fully clickable like the odoo default ones, this is my code, the closer i got is making image and content clickable but its not quite the same.


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

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

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

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

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

       <kanban >

          <templates>

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

                     <div class="oe_resource_vignette">

                         <a type="edit"><div class="oe_resource_image">

                                                             <img t-att-src="kanban_image('articulo', 'foto', record.id.value)" class="oe_resource_picture"/>

                                                    </div>

                                    <div class="oe_resource_details">

                                            <ul class="lista">

                                                   <li><b><field name="codigo"/></b></li>

                                                   <li><b><field name="tipo"/></b></li>

                                          </ul>

                                      </div></a>

                        </div>

                    </t>

         </templates>

     </kanban>

  </field>

</record>


I dont know if what im asking can be done. Thanks in advance.

0
kirubanidhi
On 7/13/16, 6:14 AM

This code is helpful for you, right now check it,

<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>
0

Works exactly the same as "edit" just opens in read-only mode.

My real problem is , when i apply the <a type="edit"> or "open"  to  this div

  <div class="oe_resource_vignette"> it stops working, i can click the full kanban but it wont get me to the form view.

Thanks.

0
shameem@axon
On 7/13/16, 4:41 AM

Try by replacing  <a type="edit"> by  <a type="open">

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: 7/13/16, 3:56 AM
Seen: 288 times
Last updated: 7/13/16, 6:14 AM