<?xml version="1.0" encoding="utf-8"?>
<odoo>
    <record id="view_partner_title_tree" model="ir.ui.view">
        <field name="name">res.partner.title.list</field>
        <field name="model">res.partner.title</field>
        <field name="arch" type="xml">
            <list string="Partner Titles" editable="bottom">
                <field name="name"/>
                <field name="shortcut"/>
            </list>
        </field>
    </record>
    <record id="view_partner_title_form" model="ir.ui.view">
        <field name="name">res.partner.title.form</field>
        <field name="model">res.partner.title</field>
        <field name="arch" type="xml">
            <form string="Partner Titles">
                <sheet>
                    <group col="4">
                        <field name="name"/>
                        <field name="shortcut"/>
                    </group>
                </sheet>
            </form>
        </field>
    </record>

    <record id="action_partner_title_contact" model="ir.actions.act_window">
        <field name="name">Contact Titles</field>
        <field name="res_model">res.partner.title</field>
        <field name="domain">[]</field>
        <field name="context">{}</field>
        <field name="help" type="html">
            <p class="o_view_nocontent_smiling_face">
                Create a Title
            </p><p>
                Manage Contact Titles as well as their abbreviations (e.g. "Mr.", "Mrs.", etc).
            </p>
        </field>
    </record>

    <record id="view_partner_form_inherit_title" model="ir.ui.view">
        <field name="name">res.partner.form.inherit.title</field>
        <field name="model">res.partner</field>
        <field name="inherit_id" ref="base.view_partner_form"/>
        <field name="arch" type="xml">
            <xpath expr="//field[@name='function']" position="before">
                <field name="title" options="{'no_open': True}" placeholder="e.g. Mr." invisible="is_company"/>
            </xpath>
        </field>
    </record>

    <menuitem id="menu_partner_title_contact"
              action="action_partner_title_contact"
              name="Contact Titles"
              parent="contacts.res_partner_menu_config"
              sequence="3"/>

</odoo>
