<?xml version="1.0" encoding="utf-8"?>
<odoo>
    <!-- Vista de lista de bloqueos -->
    <record id="view_skeen_cita_bloqueo_tree" model="ir.ui.view">
        <field name="name">skeen.cita.bloqueo.tree</field>
        <field name="model">skeen.cita.bloqueo</field>
        <field name="arch" type="xml">
            <tree>
                <field name="date"/>
                <field name="doctor_id"/>
                <field name="all_day"/>
                <field name="time_from" widget="float_time"/>
                <field name="time_to" widget="float_time"/>
                <field name="motivo"/>
            </tree>
        </field>
    </record>

    <!-- Vista de formulario de bloqueos -->
    <record id="view_skeen_cita_bloqueo_form" model="ir.ui.view">
        <field name="name">skeen.cita.bloqueo.form</field>
        <field name="model">skeen.cita.bloqueo</field>
        <field name="arch" type="xml">
            <form>
                <sheet>
                    <group>
                        <group>
                            <field name="doctor_id"/>
                            <field name="date"/>
                            <field name="motivo"/>
                        </group>
                        <group>
                            <field name="all_day"/>
                            <field name="time_from" widget="float_time" invisible="all_day"/>
                            <field name="time_to" widget="float_time" invisible="all_day"/>
                        </group>
                    </group>
                </sheet>
            </form>
        </field>
    </record>

    <!-- Acción para bloqueos -->
    <record id="action_skeen_cita_bloqueo_tree" model="ir.actions.act_window">
        <field name="name">Bloqueos de Agenda</field>
        <field name="res_model">skeen.cita.bloqueo</field>
        <field name="view_mode">tree,form</field>
    </record>

    <!-- Menú Bloqueos (bajo el menú Citas) -->
    <menuitem id="menu_skeen_citas_bloqueos" name="Bloqueos de Agenda" parent="menu_skeen_citas"
              action="action_skeen_cita_bloqueo_tree" sequence="20"/>
</odoo>
