<?xml version="1.0" encoding="utf-8" ?>
<odoo>
    <record id="view_holidays_public_tree" model="ir.ui.view">
        <field name="name">hr.holidays.public.tree</field>
        <field name="model">hr.holidays.public</field>
        <field name="arch" type="xml">
            <tree>
                <field name="display_name" />
                <field name="country_id" />
            </tree>
        </field>
    </record>
    <record id="view_holidays_public_form" model="ir.ui.view">
        <field name="name">hr.holidays.public.form</field>
        <field name="model">hr.holidays.public</field>
        <field name="arch" type="xml">
            <form string="Public Holidays">
                <group name="group_main">
                    <group name="group_main_left">
                        <field name="year" />
                        <field name="country_id" />
                    </group>
                    <group name="group_main_right">
                        <!-- Left empty for extensions -->
                    </group>
                </group>
                <separator string="Public Holidays" name="group_detail" />
                <field name="line_ids" nolabel="1">
                    <tree editable="top">
                        <field
                            name="date"
                            attrs="{'readonly':[['variable_date', '=', False]]}"
                            force_save="1"
                        />
                        <field name="name" />
                        <field
                            name="state_ids"
                            widget="many2many_tags"
                            domain="[('country_id','=',parent.country_id)]"
                        />
                        <field name="variable_date" />
                    </tree>
                </field>
            </form>
        </field>
    </record>
    <record id="open_holidays_public_view" model="ir.actions.act_window">
        <field name="name">Public Holidays</field>
        <field name="res_model">hr.holidays.public</field>
        <field name="view_mode">tree,form</field>
    </record>
    <menuitem
        id="menu_hr_public_holidays"
        name="Public Holidays"
        parent="hr_holidays.menu_hr_holidays_root"
        sequence="20"
    />
    <menuitem
        action="open_holidays_public_view"
        id="menu_holidays_public_view"
        parent="menu_hr_public_holidays"
        sequence="10"
    />
</odoo>
