Odoo Help


How inherits base.res_partner_kanban_view view to replace the ul block?

on 10/10/14, 2:43 AM 591 views


This my code

<record model="ir.ui.view" id="res_partner_kanban_view">
                <field name="name">res.partner.kanban</field>
                 <field name="model">res.partner</field>
                 <field name="inherit_id" ref="base.res_partner_kanban_view"/>
                   <field name="arch" type="xml">
                    <xpath expr="//div[@class='oe_kanban_details']/ul" position="replace">
                            <li t-if="record.parent_id.raw_value and !record.function.raw_value"><field name="parent_id"/></li>
                            <li t-if="!record.parent_id.raw_value and record.function.raw_value"><field name="function"/></li>
                            <li t-if="record.parent_id.raw_value and record.function.raw_value"><field name="function"/> at <field name="parent_id"/></li>
                            <li t-if="record.city.raw_value and !record.country.raw_value and !record.zip.raw_value"><field name="city"/></li>
                            <li t-if="!record.city.raw_value and record.country.raw_value and !record.zip.raw_value"><field name="country"/></li>
                            <li t-if="!record.city.raw_value and !record.country.raw_value and record.zip.raw_value"><field name="zip"/></li>
                                            <!--<li t-if="record.city.raw_value and record.country.raw_value"><field name="city"/>, <field name="country"/></li>-->
                            <li t-if="record.city.raw_value and record.zip.raw_value and !record.country.raw_value"><field name="city"/>, <field name="zip"/></li>
                            <li t-if="record.city.raw_value and record.country.raw_value and !record.zip.raw_value"><field name="city"/>, <field name="country"/></li>
                            <li t-if="record.country.raw_value and record.zip.raw_value and !record.city.raw_value"><field name="zip"/>, <field name="country"/></li>        
                            <li t-if="record.city.raw_value and record.country.raw_value and record.zip.raw_value"><field name="zip" />, <field name="city"/>, <field name="country"/></li>
                            <li t-if="record.email.raw_value"><a t-attf-href="mailto:#{record.email.raw_value}"><field name="email"/></a></li>


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 platform 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.


Odoo Training Center

Access to our E-learning platform and experience all Odoo Apps through learning videos, exercises and Quizz.

Test it now

Question tools

1 follower(s)


Asked: 10/10/14, 2:43 AM
Seen: 591 times
Last updated: 3/16/15, 8:10 AM