<?xml version="1.0"?>
<odoo>

  <!-- FORM availability -->
  <record id="virtual_room_availability_view_form" model="ir.ui.view">
    <field name="name">hotel.virtual.room.availability.form</field>
    <field name="model">hotel.virtual.room.availability</field>
    <field name="arch" type="xml">
      <form string="Availability">
        <sheet>
          <group>
            <!-- <h1><field name="virtual_room_id" required="1"/></h1> -->
            <h1><field name="room_type_id" required="1"/></h1>
          </group>
          <group>
            <field name="date" required="1"/>
            <field name="avail"/>
            <field name="no_ota"/>
            <field name="booked"/>
          </group>
        </sheet>
        <div class="oe_chatter">
          <field name="message_follower_ids" widget="mail_followers"/>
          <field name="message_ids" widget="mail_thread"/>
        </div>
      </form>
    </field>
  </record>

  <!-- TREE restriction -->
  <record id="virtual_room_availability_view_tree" model="ir.ui.view">
    <field name="name">hotel.virtual.room.availability.tree</field>
    <field name="model">hotel.virtual.room.availability</field>
    <field name="arch" type="xml">
      <tree string="Restrictions">
        <!-- <field name="virtual_room_id" required="1"/> -->
        <field name="room_type_id" required="1"/>
        <field name="date" required="1"/>
        <field name="avail"/>
        <field name="no_ota"/>
        <field name="booked"/>
      </tree>
    </field>
  </record>

  <!-- Action of reservation restriction -->
  <record model="ir.actions.act_window" id="virtual_room_availability_action">
    <field name="name">Virtual Room Availability</field>
    <field name="res_model">hotel.virtual.room.availability</field>
    <field name="view_type">form</field>
    <field name="view_mode">tree,form</field>
  </record>

  <!-- MENUS -->
  <menuitem name="Availability" id="virtual_room_availability_menu"
    action="virtual_room_availability_action" sequence="22"
    parent="hotel.configuration_others"/>

 </odoo>
