<?xml version="1.0" encoding="utf-8"?>
<odoo>

    <!--===== Room Amenities ===== -->
    <!-- Form view of hotel room amenities -->
    <record id="view_hotel_room_amenities_form" model="ir.ui.view">
        <field name="name">hotel.room.amenities.form</field>
        <field name="model">hotel.room.amenities</field>
        <field name="arch" type="xml">
            <form string="Hotel Room Amenities">
                <sheet>
                    <h1>
                        <label string="Amenity" />
                        <field name="name" select="1" />
                    </h1>
                    <group>
                        <field name="default_code" select="1" />
                    </group>
                    <notebook>
                        <page string="Information">
                            <group colspan="4" col="4">
                                <field name="room_amenities_type_id" select="2" string="Amenity Type" />
                                <!-- <field name="categ_id" select="1"
                                    domain="[('isamenitytype','=',True)]" /> -->
                            </group>
                            <newline />
                            <separator colspan='4' string="Supplier Taxes" />
                            <!-- <field name="supplier_taxes_id" colspan="4" nolabel='1'
                                help='Define supplier taxes if there any on the ty. ' /> -->
                            <newline />
                            <separator colspan='4' string="Customer Taxes" />
                            <!-- <field name="taxes_id" colspan="4" nolabel='1'
                                help='List of customer taxes applied on the ty. ' /> -->
                        </page>
                        <page string="Procurement">
                            <group colspan="4" col="4">
                                <field name="active" select="2" />
                                <!-- <field name="list_price" /> -->
                                <!-- <field name="cost_method" string="Cost Method"/> -->
                                <!-- <field name="sale_ok" select="2" /> -->
                                <!-- <field name="standard_price" /> -->
                                <!-- <field name="rental" select="2" /> -->
                            </group>
                            <newline />
                            <group>
                                <separator string="Suppliers" />
                                <!-- <field name="seller_ids" colspan="4" nolabel="1"
                                    widget="one2many_list" /> -->
                            </group>
                        </page>
                        <page string="Descriptions">
                            <!-- <separator string="Description" />
                            <field name="description" colspan="4" nolabel="1" />
                            <separator string="Sale Description" />
                            <field name="description_sale" colspan="4" nolabel="1" />
                            <separator string="Purchase Description" />
                            <field name="description_purchase" colspan="4" nolabel="1" /> -->
                        </page>
                    </notebook>
                </sheet>
            </form>
        </field>
    </record>

    <!-- Search view of hotel room amenities -->
    <record model="ir.ui.view" id="view_hotel_room_aenities_search">
        <field name="name">hotel.room_amenities_search</field>
        <field name="model">hotel.room.amenities</field>
        <field name="arch" type="xml">
            <search string="Hotel Room Amenities">
                <field name="name" />
                <field name="room_amenities_type_id" select="1" />
                <!-- <field name="list_price" string="ty rate" /> -->
                <newline />
                <group expand="0" string="Group By...">
                    <!-- <filter name="categ_id" string="Catagory"
                        icon="terp-stock_symbol-selection" domain="[]"
                        context="{'group_by':'categ_id'}" /> -->
                </group>
            </search>
        </field>
    </record>

    <!-- Tree view of hotel room amenities -->
    <record model="ir.ui.view" id="view_hotel_room_amenities_list">
        <field name="name">hotel.room_amenities_list</field>
        <field name="model">hotel.room.amenities</field>
        <field name="arch" type="xml">
            <tree string="Hotel Room Amenities">
                <field name="name" />
                <field name="room_amenities_type_id" select="1" />
                <!-- <field name="list_price" string="Ty rate" invisible="1" /> -->
            </tree>
        </field>
    </record>

    <!-- Action for hotel room amenities -->
    <record model="ir.actions.act_window" id="action_hotel_room_amenities_view_form">
        <field name="name">Hotel Room Amenities</field>
        <field name="res_model">hotel.room.amenities</field>
        <field name="view_type">form</field>
        <field name="view_mode">tree,form</field>
        <!-- <field name="context">{'default_iscategid':1}</field> -->
        <field name="view_id" ref="view_hotel_room_amenities_list" />
    </record>
    <menuitem name="Amenities" id="menu_action_hotel_room_amenities_view_form"
        action="action_hotel_room_amenities_view_form" sequence="2"
        parent="hotel.menu_amenity" />

    <!-- Amenities Categories -->

    <!-- <record model="ir.actions.act_window" id="hotel_ty_category_action">
        <field name="name">Amenities by Category</field>
        <field name="type">ir.actions.act_window</field>
        <field name="res_model">product.category</field>
        <field name="domain">[('parent_id','=',False),('isamenitytype','=',True)]</field>
        <field name="view_type">tree</field>
        <field name="view_id" ref="product_category_tree_view" />
    </record> -->

    <!--record id="ir_amenities_category_open" ref="model_product_category">
        <field eval="'tree_but_open'" name="key2"/>
        <field eval="'product.category'" name="model"/>
        <field name="name">Amenities</field>
        <field eval="'ir.actions.act_window,%d'%action_room_cate" name="value"/>
    </record-->

    <!-- <menuitem name="Amenities by Type" id="menu_hotel_ty_category_action"
        action="hotel_ty_category_action" sequence="4" parent="hotel.menu_amenity" /> -->

</odoo>
