<?xml version="1.0" encoding="utf-8" ?>
<odoo>
    <!--==== Amenities Type ==== -->
    <!-- Form view of pms room amenities type -->
    <record model="ir.ui.view" id="pms_room_amenity_type_view_form">
        <field name="name">pms.room_amenity_type_form</field>
        <field name="model">pms.amenity.type</field>
        <field name="arch" type="xml">
            <form string="Room Amenities Type">
                <sheet>
                    <group>
                        <field name="name" string="Amenity Type" />
                        <field
                            name="pms_property_ids"
                            widget="many2many_tags"
                            options="{'no_create': True,'no_open': True}"
                        />
                        <!-- <field name="parent_id" domain="[('isamenitytype','=',True)]" /> -->
                        <!-- <field name="isamenitytype" invisible="1" /> -->
                    </group>
                </sheet>
            </form>
        </field>
    </record>
    <!-- Tree view of pms room amenities type -->
    <record model="ir.ui.view" id="pms_room_amenity_type_view_list">
        <field name="name">pms.room_amenity_type_list</field>
        <field name="model">pms.amenity.type</field>
        <field name="arch" type="xml">
            <tree name="Room Amenities Type">
                <field name="name" />
            </tree>
        </field>
    </record>
    <!-- Action for pms room amenities type -->
    <record model="ir.actions.act_window" id="action_pms_room_amenity_type_view_form">
        <field name="name">Room amenity Type</field>
        <field name="res_model">pms.amenity.type</field>
        <field name="view_mode">tree,form</field>
    </record>

    <menuitem
        name="Amenity Types"
        id="menu_action_pms_room_amenity_type_view_form"
        action="action_pms_room_amenity_type_view_form"
        sequence="15"
        parent="pms.menu_amenity"
    />
</odoo>
