<?xml version="1.0" encoding="utf-8" ?>
<odoo>
    <record id="advanced_filters_wizard" model="ir.ui.view">
        <field name="name">Filter by dates</field>
        <field name="model">pms.advanced.filters.wizard</field>
        <field name="arch" type="xml">
            <form string="Advanced filters" colspan="4">
                <sheet>
                    <script>
                        $(document).ready(function(){
                        $('.modal-dialog').css({'width': '100%', 'height': '85%'});
                        $('.modal-content').css({'height': '80%'});
                        $('.modal-body').css({'height': '80%'});
                        });
                    </script>
                    <group>
                        <field name="pms_model_id" widget="selection" string="Model" />
                        <field
                            name="pms_domain"
                            widget="domain"
                            string="Filters"
                            options="{'model': 'pms_model_name'}"
                        />
                        <field name="pms_model_name" invisible="1" />
                    </group>
                    <footer>
                        <button
                            type="object"
                            class="oe_stat_button"
                            id="reservation_button"
                            name="action_filter"
                            string="Search"
                        />
                        <button string="Cancel" class="oe_link" special="cancel" />
                    </footer>
                    <div>
                        <br />
                        <br />
                    </div>
                </sheet>
            </form>
        </field>
    </record>
    <record id="action_advanced_filters_wizard" model="ir.actions.act_window">
        <field name="name">Advanced Filters</field>
        <field name="type">ir.actions.act_window</field>
        <field name="res_model">pms.advanced.filters.wizard</field>
        <field name="view_id" ref="advanced_filters_wizard" />
        <field name="view_mode">form</field>
        <field name="target">new</field>
    </record>
    <menuitem
        id="menu_pms_advanced_filters"
        name="Advanced Filters"
        parent="pms.pms_configuration_menu"
        sequence="30"
        action="action_advanced_filters_wizard"
    />
</odoo>
