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

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

By
tansadio
on 10/10/14, 2:43 AM 514 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">
                        
                        <ul>
                            <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>
                        </ul>
                        
                    </xpath>
                </field>
            </record>

Advances

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: 10/10/14, 2:43 AM
Seen: 514 times
Last updated: 3/16/15, 8:10 AM