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

    <record id="view_student_profile_form" model="ir.ui.view">
        <field name="name">encoach.student.profile.form</field>
        <field name="model">encoach.student.profile</field>
        <field name="arch" type="xml">
            <form string="Student Profile">
                <sheet>
                    <group>
                        <group>
                            <field name="user_id"/>
                            <field name="cefr_level"/>
                            <field name="target_band"/>
                            <field name="learning_goal"/>
                            <field name="hours_per_week"/>
                        </group>
                        <group>
                            <field name="study_mode"/>
                            <field name="exam_date"/>
                            <field name="placement_completed"/>
                            <field name="entity_id"/>
                        </group>
                    </group>
                    <group>
                        <field name="learning_style"/>
                    </group>
                </sheet>
            </form>
        </field>
    </record>

    <record id="view_student_profile_list" model="ir.ui.view">
        <field name="name">encoach.student.profile.list</field>
        <field name="model">encoach.student.profile</field>
        <field name="arch" type="xml">
            <list string="Student Profiles">
                <field name="user_id"/>
                <field name="cefr_level"/>
                <field name="target_band"/>
                <field name="study_mode"/>
                <field name="placement_completed"/>
            </list>
        </field>
    </record>

    <record id="view_student_profile_search" model="ir.ui.view">
        <field name="name">encoach.student.profile.search</field>
        <field name="model">encoach.student.profile</field>
        <field name="arch" type="xml">
            <search string="Search Student Profiles">
                <field name="user_id"/>
                <field name="cefr_level"/>
                <separator/>
                <filter string="Pre-A1" name="pre_a1" domain="[('cefr_level', '=', 'pre_a1')]"/>
                <filter string="A1" name="a1" domain="[('cefr_level', '=', 'a1')]"/>
                <filter string="A2" name="a2" domain="[('cefr_level', '=', 'a2')]"/>
                <filter string="B1" name="b1" domain="[('cefr_level', '=', 'b1')]"/>
                <filter string="B2" name="b2" domain="[('cefr_level', '=', 'b2')]"/>
                <filter string="C1" name="c1" domain="[('cefr_level', '=', 'c1')]"/>
                <filter string="C2" name="c2" domain="[('cefr_level', '=', 'c2')]"/>
                <separator/>
                <filter string="Entity" name="group_entity" context="{'group_by': 'entity_id'}"/>
            </search>
        </field>
    </record>

    <record id="action_student_profile" model="ir.actions.act_window">
        <field name="name">Student Profiles</field>
        <field name="res_model">encoach.student.profile</field>
        <field name="view_mode">list,form</field>
    </record>

</odoo>
