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

        <record id="view_time_table_report_form" model="ir.ui.view">
            <field name="name">time.table.report.form</field>
            <field name="model">time.table.report</field>
            <field name="priority" eval="8"/>
            <field name="arch" type="xml">
                <form string="Time Table Report">
                    <sheet>
                        <div>
                            <group colspan="4" cols="4">
                                <group>
                                    <field name="start_date"/>
                                    <field name="state"/>
                                    <field name="faculty_id"
                                           required="state == 'faculty'" invisible="state != 'faculty'"/>
                                </group>
                                <group>
                                    <field name="end_date"/>
                                    <field name="course_id"
                                           required="state == 'student'" invisible="state != 'student'"/>
                                    <field name="batch_id" context="{'course_id': course_id,'get_parent_batch':1}"
                                           required="state == 'student'" invisible="state != 'student'"/>
                                </group>
                            </group>
                        </div>
                    </sheet>
                    <footer>
                        <span class="w-100" groups="base.group_user" >
                            <button string="Print" type="object"
                                    name="gen_time_table_report" class="oe_highlight m-2"/>
                            <button special="cancel" string="Close" type="object"/>
                        </span>
                    </footer>
                </form>
            </field>
        </record>

        <record model="ir.actions.act_window" id="act_open_time_table_report_view">
            <field name="name">Generate Sessions Report</field>
            <field name="type">ir.actions.act_window</field>
            <field name="res_model">time.table.report</field>
            <field name="binding_view_types">form</field>
            <field name="view_mode">form</field>
            <field name="target">new</field>
        </record>

</odoo>
