<odoo>
  <data>
    <!-- explicit list view definition -->

    <record model="ir.ui.view" id="room_list">
      <field name="name">booking_room list</field>
      <field name="model">booking.room</field>
      <field name="arch" type="xml">
        <tree>
          
          <field name="name"/>
          <field name="location_id"/>
          <field name="description"/>
          <field name="capacity"/>
          
          
        </tree>
      </field>
    </record>

    <record model="ir.ui.view" id="room_form">
      <field name="name">booking_room form</field>
      <field name="model">booking.room</field>
      <field name="arch" type="xml">
        <form>
        <sheet>
          <group>
          <field name="name2"/>
          <field name="location_id"/>
          <field name="description"/>
          <field name="capacity"/>
          </group>
        </sheet>
        </form>
      </field>
    </record>


    <record model="ir.actions.act_window" id="room_action">
      <field name="name">Rooms</field>
      <field name="res_model">booking.room</field>
      <field name="view_mode">tree,form</field>
    </record>

 <menuitem id="booking_room_menu" action="room_action" 
        parent="booking_title_menu" groups="event.group_event_user" sequence="2"/>


<record model="ir.ui.view" id="room_occupation_list">
      <field name="name">booking_room_occupation list</field>
      <field name="model">booking.room.occupation</field>
      <field name="arch" type="xml">
        <tree>
          <field name="room_id"/>
          <field name="name"/>
          <field name="event_id"/>
          <field name="date_begin"/>
          <field name="date_end"/>
        </tree>
      </field>
    </record>

    <record model="ir.ui.view" id="room_occupation_form" >
      <field name="name">booking_room_occupation Form</field>
      <field name="model">booking.room.occupation</field>
      <field name="arch" type="xml">
          <form string="">
          <sheet>
            <group name="main"> 
             <field name="room_id"/>
             <field name="event_id"/>
             <field name="event_registration_id"/>
            
            </group>
            
          </sheet>
          
          </form>
      </field>
  </record>

  <record id="view_room_occupation_search" model="ir.ui.view">
            <field name="name">room.occupation.search</field>
            <field name="model">booking.room.occupation</field>
            <field name="priority">1</field>
            <field name="arch" type="xml">
                <search string="Search Room">
                    <field string="Room" name="room_id"/>
                    
                </search>
            </field>
        </record>

    <record model="ir.actions.act_window" id="room_occupation_action">
      <field name="name">Rooms occupation</field>
      <field name="res_model">booking.room.occupation</field>
      <field name="view_mode">tree,form,pivot</field>
    </record>

<record id="action_registration" model="ir.actions.act_window">
            <field name="name">Room occupation</field>
            <field name="res_model">event.registration</field>
            <field name="domain"></field>
            <field name="view_mode">kanban,pivot,graph,tree,form</field>
            <field name="context">{}</field>
            <field name="domain">[('booking_event','=',True),('event_end','=',False)]</field>
           
            <field name="search_view_id" ref="event.view_registration_search"/>
        </record>

 <menuitem id="booking_room_occupation_menu" action="action_registration" 
        parent="booking_title_menu" groups="event.group_event_user" sequence="3"/>





</data>
</odoo>