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

    <record id="view_gap_profile_form" model="ir.ui.view">
        <field name="name">encoach.gap.profile.form</field>
        <field name="model">encoach.gap.profile</field>
        <field name="arch" type="xml">
            <form string="Gap Profile">
                <sheet>
                    <group>
                        <group>
                            <field name="student_id"/>
                            <field name="source_type"/>
                            <field name="source_id"/>
                        </group>
                        <group>
                            <field name="entity_id"/>
                            <field name="created_at"/>
                        </group>
                    </group>
                    <notebook>
                        <page string="Skill Gaps" name="skill_gaps">
                            <field name="skill_gaps"/>
                        </page>
                        <page string="Question Type Weaknesses" name="question_type_weaknesses">
                            <field name="question_type_weaknesses"/>
                        </page>
                        <page string="Topic Weaknesses" name="topic_weaknesses">
                            <field name="topic_weaknesses"/>
                        </page>
                    </notebook>
                </sheet>
            </form>
        </field>
    </record>

    <record id="view_gap_profile_list" model="ir.ui.view">
        <field name="name">encoach.gap.profile.list</field>
        <field name="model">encoach.gap.profile</field>
        <field name="arch" type="xml">
            <list string="Gap Profiles">
                <field name="student_id"/>
                <field name="source_type"/>
                <field name="entity_id"/>
                <field name="created_at"/>
            </list>
        </field>
    </record>

    <record id="view_gap_profile_search" model="ir.ui.view">
        <field name="name">encoach.gap.profile.search</field>
        <field name="model">encoach.gap.profile</field>
        <field name="arch" type="xml">
            <search string="Search Gap Profiles">
                <field name="student_id"/>
                <separator/>
                <filter string="Placement" name="placement" domain="[('source_type', '=', 'placement')]"/>
                <filter string="Exam" name="exam" domain="[('source_type', '=', 'exam')]"/>
                <separator/>
                <filter string="Student" name="group_student" context="{'group_by': 'student_id'}"/>
                <filter string="Entity" name="group_entity" context="{'group_by': 'entity_id'}"/>
            </search>
        </field>
    </record>

    <record id="action_gap_profile" model="ir.actions.act_window">
        <field name="name">Gap Analysis</field>
        <field name="res_model">encoach.gap.profile</field>
        <field name="view_mode">list,form</field>
    </record>

</odoo>
