<?xml version="1.0" encoding="utf-8"?>
<odoo>

    <!-- Add LTC Home tab to Partner Form -->
    <record id="view_partner_form_ltc" model="ir.ui.view">
        <field name="name">res.partner.form.ltc</field>
        <field name="model">res.partner</field>
        <field name="inherit_id" ref="base.view_partner_form"/>
        <field name="arch" type="xml">
            <xpath expr="//notebook" position="inside">
                <page string="LTC Home" name="ltc_info"
                      invisible="x_fc_contact_type not in ('long_term_care_home',)">
                    <group string="LTC Facility Information">
                        <group>
                            <field name="x_fc_ltc_facility_id"/>
                            <field name="x_fc_ltc_room_number"/>
                        </group>
                    </group>
                    <group string="Family Contacts">
                        <field name="x_fc_ltc_family_contact_ids" nolabel="1">
                            <list editable="bottom">
                                <field name="name"/>
                                <field name="relationship"/>
                                <field name="phone"/>
                                <field name="phone2"/>
                                <field name="email"/>
                                <field name="is_poa"/>
                                <field name="notes" optional="hide"/>
                            </list>
                        </field>
                    </group>
                </page>
            </xpath>
        </field>
    </record>

</odoo>
