<?xml version="1.0" encoding="utf-8" ?>
<odoo>
    <!-- Add related event to project form view -->
    <record id="edit_project" model="ir.ui.view">
        <field name="name">Add related event to project</field>
        <field name="model">project.project</field>
        <field name="inherit_id" ref="project.edit_project" />
        <field name="arch" type="xml">
            <xpath expr="//field[@name='partner_id']" position="after">
                <field
                    name="event_id"
                    attrs="{'invisible': [('event_id', '=', False)]}"
                />
            </xpath>
        </field>
    </record>
</odoo>
