<odoo>

<record id="kalachakra_event_registration_view_form" model="ir.ui.view">
        <field name="name">event.type.view.form.inherit.booking</field>
        <field name="model">event.registration</field>
        <field name="inherit_id" ref="event.view_event_registration_form"/>
        <field name="arch" type="xml">
            <xpath expr="//group[@name='attendee']" position="inside">
            
            <field name="online" attrs="{'invisible':[('booking_event','=',True)]}" />
            <field name="onthespot_payment" attrs="{'invisible':[('booking_event','=',True)]}"/>
            
            
            </xpath>
            <xpath expr="//button[@name='action_cancel']" position="after">
               
                <button name="action_generate_participation_invoice" type="object"
                   string="Generate participation invoice" attrs="{'invisible':['|','|',('booking_event','=',True),('free_participation','=',True),('state','=','draft')]}">
                </button>
                <field name='booking_event' invisible="1"/>
                <field name='free_participation' invisible="1"/>
                

                
            </xpath>
        </field>
</record>



</odoo>