<?xml version="1.0" encoding="utf-8"?>
<odoo>
    <!-- Form View -->
    <record id="education_period_view_form" model="ir.ui.view">
        <field name="name">education.period.view.form</field>
        <field name="model">education.period</field>
        <field name="arch" type="xml">
            <form string="Education Periods">
                <sheet>
                    <div class="oe_title">
                        <label for="name" class="oe_edit_only"/>
                        <h1>
                            <field name="name"/>
                        </h1>
                    </div>
                    <group>
                        <field name="start_date"/>
                        <field name="end_date"/>
                    </group>
                    <group>
                        <field name="education_level_ids" widget="many2many_tags"
                               options="{'no_create_edit': True, 'no_create': True}"/>
                        <field name="education_entity_ids" widget="many2many_tags"
                               options="{'no_create_edit': True, 'no_create': True}"/>
                    </group>
                </sheet>
            </form>
        </field>
    </record>

    <!-- List View -->
    <record id="education_period_view_list" model="ir.ui.view">
        <field name="name">education.period.view.list</field>
        <field name="model">education.period</field>
        <field name="arch" type="xml">
            <tree string="Education Periods">
                <field name="name"/>
                <field name="start_date"/>
                <field name="end_date"/>
                <field name="education_level_ids" widget="many2many_tags"
                       options="{'no_create_edit': True, 'no_create': True}"/>
                <field name="education_entity_ids" widget="many2many_tags"
                       options="{'no_create_edit': True, 'no_create': True}"/>
            </tree>
        </field>
    </record>

    <!-- Action -->
    <record id="education_period_action" model="ir.actions.act_window">
        <field name="name">Education Periods</field>
        <field name="res_model">education.period</field>
        <field name="view_mode">tree,form</field>
        <field name="help" type="html">
            <p class="o_view_nocontent_smiling_face">
                Create your first education period!
            </p>
        </field>
    </record>

</odoo>