Skip to content

Instantly share code, notes, and snippets.

@mrvdb
Created March 21, 2013 14:03
Show Gist options
  • Save mrvdb/5213241 to your computer and use it in GitHub Desktop.
Save mrvdb/5213241 to your computer and use it in GitHub Desktop.
<!-- Add the address type field in the contacts tab of the partner view -->
<record id="view_partner_form" model="ir.ui.view">
<field name="name">res.partner.form.showtype</field>
<field name="model">res.partner</field>
<field name="inherit_id" ref="base.view_partner_form"/>
<field name="arch" type="xml">
<data>
<!-- Make the type field available -->
<field name="has_image" position="after">
<field name="type"/>
</field>
<!-- Add it in the proper place in the subview -->
<xpath expr="//td[@class='oe_kanban_title1']/h4" position="after">
<t t-if="record.type.raw_value !== 'default' ">
<div class="oe_tags"><span class="oe_tag oe_type"><field name="type"/></span></div>
</t>
</xpath>
<!-- And in the contact detail screen -->
<xpath expr="//group/field[@name='name']"
position="after">
<field name="type"/>
</xpath>
</data>
</field>
</record>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment