<?xml version="1.0" encoding="utf-8" ?>
<!-- Copyright 2016 Antiun Ingeniería S.L. - Jairo Llopis
     License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html). -->
<odoo>
    <record id="crm_lead_view_form" model="ir.ui.view">
        <field name="name">Add firstname and lastname</field>
        <field name="model">crm.lead</field>
        <field name="inherit_id" ref="crm.crm_lead_view_form" />
        <field name="arch" type="xml">
            <xpath expr="//label[@for='contact_name']" position="attributes">
                <attribute name="string">Contact Name</attribute>
            </xpath>
            <xpath expr="//field[@name='contact_name']" position="attributes">
                <attribute name="placeholder">Firstname</attribute>
            </xpath>
            <xpath expr="//field[@name='contact_name']" position="after">
                <field name="contact_lastname" placeholder="Lastname" />
            </xpath>
            <xpath
                expr="//page[@name='lead']//label[@for='contact_name_page_lead']"
                position="attributes"
            >
                <attribute name="string">Contact Name</attribute>
            </xpath>
            <xpath
                expr="//page[@name='lead']//field[@name='contact_name']"
                position="attributes"
            >
                <attribute name="placeholder">Firstname</attribute>
            </xpath>
            <xpath
                expr="//page[@name='lead']//field[@name='contact_name']"
                position="after"
            >
                <field name="contact_lastname" placeholder="Lastname" />
            </xpath>
        </field>
    </record>
    <record id="quick_create_opportunity_form" model="ir.ui.view">
        <field name="inherit_id" ref="crm.quick_create_opportunity_form" />
        <field name="model">crm.lead</field>
        <field name="arch" type="xml">
            <xpath expr="//field[@name='contact_name']" position="after">
                <field name="contact_lastname" invisible="1" />
            </xpath>
        </field>
    </record>
</odoo>
