<?xml version="1.0"?>
<!-- This file is part of Tryton.  The COPYRIGHT file at the top level of
this repository contains the full copyright notices and license terms. -->
<tryton>
    <data>

        <record model="ir.ui.view" id="todo_view_tree">
            <field name="model">calendar.todo</field>
            <field name="type">tree</field>
            <field name="arch" type="xml">
                <![CDATA[
                <tree string="Todos">
                    <field name="calendar" select="1"/>
                    <field name="summary" select="1"/>
                    <field name="dtstart" select="1"/>
                    <field name="due" select="1"/>
                    <field name="status" select="2"/>
                    <field name="percent_complete" select="2"/>
                </tree>
                ]]>
            </field>
        </record>

        <record model="ir.ui.view" id="todo_view_form">
            <field name="model">calendar.todo</field>
            <field name="type">form</field>
            <field name="arch" type="xml">
                <![CDATA[
                <form string="Todo">
                    <label name="summary"/>
                    <field name="summary"/>
                    <label name="recurrence"/>
                    <field name="recurrence"/>
                    <notebook colspan="4">
                        <page string="General" id="general">
                            <label name="location"/>
                            <field name="location"/>
                            <label name="status"/>
                            <field name="status"/>
                            <label name="classification"/>
                            <field name="classification"/>
                            <label name="calendar"/>
                            <field name="calendar"/>
                            <label name="dtstart"/>
                            <field name="dtstart"/>
                            <label name="due"/>
                            <field name="due"/>
                            <label name="percent_complete"/>
                            <field name="percent_complete"/>
                            <label name="completed"/>
                            <field name="completed"/>
                            <separator name="description" colspan="4"/>
                            <field name="description" colspan="4"/>
                        </page>
                        <page string="Categories" id="categories">
                            <separator name="categories" colspan="4"/>
                            <field name="categories" colspan="4"/>
                        </page>
                        <page string="Attendees" id="attendees">
                            <label name="organizer"/>
                            <field name="organizer"/>
                            <field name="attendees" colspan="4"/>
                        </page>
                        <page string="Occurences" id="occurences"
                            states="{'invisible': Bool(Eval('_parent_parent'))}">
                            <field name="rrules" colspan="2"/>
                            <field name="rdates" colspan="2"/>
                            <field name="exrules" colspan="2"/>
                            <field name="exdates" colspan="2"/>
                            <field name="occurences" colspan="4">
                                <tree string="Todos">
                                    <field name="summary" select="1"/>
                                    <field name="recurrence" select="1"/>
                                    <field name="dtstart" select="2"/>
                                    <field name="due" select="2"/>
                                    <field name="status" select="2"/>
                                    <field name="percent_complete" select="2"/>
                                </tree>
                            </field>
                        </page>
                    </notebook>
                </form>
                ]]>
            </field>
        </record>

        <record model="ir.action.act_window" id="act_todo_form">
            <field name="name">Todos</field>
            <field name="res_model">calendar.todo</field>
            <field name="domain">[('parent', '=', False)]</field>
        </record>
        <record model="ir.action.act_window.view" id="act_todo_form_view1">
            <field name="sequence" eval="10"/>
            <field name="view" ref="todo_view_tree"/>
            <field name="act_window" ref="act_todo_form"/>
        </record>
        <record model="ir.action.act_window.view" id="act_todo_form_view2">
            <field name="sequence" eval="20"/>
            <field name="view" ref="todo_view_form"/>
            <field name="act_window" ref="act_todo_form"/>
        </record>
        <menuitem parent="calendar.menu_calendar_form" sequence="30"
            action="act_todo_form" id="menu_todo_form"/>
        <record model="ir.action.act_window" id="act_todo_form2">
            <field name="name">Todos</field>
            <field name="res_model">calendar.todo</field>
            <field name="domain">[('parent', '=', False)]</field>
        </record>
        <record model="ir.action.act_window.view" id="act_todo_form2_view1">
            <field name="sequence" eval="10"/>
            <field name="view" ref="todo_view_form"/>
            <field name="act_window" ref="act_todo_form2"/>
        </record>
        <record model="ir.action.act_window.view" id="act_todo_form2_view2">
            <field name="sequence" eval="20"/>
            <field name="view" ref="todo_view_tree"/>
            <field name="act_window" ref="act_todo_form2"/>
        </record>
        <menuitem name="New Todo" parent="menu_todo_form" sequence="10"
            action="act_todo_form2" id="menu_todo_form2"/>

        <record model="ir.action.act_window" id="act_todo_form3">
            <field name="name">Todos</field>
            <field name="res_model">calendar.todo</field>
            <field name="domain">[('parent', '=', False), ('calendar', '=', Eval('active_id'))]</field>
        </record>
        <record model="ir.action.act_window.view" id="act_todo_form3_view1">
            <field name="sequence" eval="10"/>
            <field name="view" ref="todo_view_tree"/>
            <field name="act_window" ref="act_todo_form3"/>
        </record>
        <record model="ir.action.act_window.view" id="act_todo_form3_view2">
            <field name="sequence" eval="20"/>
            <field name="view" ref="todo_view_form"/>
            <field name="act_window" ref="act_todo_form3"/>
        </record>
        <record model="ir.action.keyword"
                id="act_open_todo_keyword1">
            <field name="keyword">form_relate</field>
            <field name="model">calendar.calendar,0</field>
            <field name="action" ref="act_todo_form3"/>
        </record>

        <record model="ir.rule.group" id="rule_group_read_todo">
            <field name="model" search="[('model', '=', 'calendar.todo')]"/>
            <field name="global_p" eval="False"/>
            <field name="default_p" eval="True"/>
            <field name="perm_read" eval="True"/>
            <field name="perm_write" eval="False"/>
            <field name="perm_create" eval="False"/>
            <field name="perm_delete" eval="False"/>
        </record>
        <record model="ir.rule" id="rule_group_read_todo_line1">
            <field name="field" search="[('name', '=', 'calendar_owner'), ('model.model', '=', 'calendar.todo')]"/>
            <field name="operator">=</field>
            <field name="operand">User</field>
            <field name="rule_group" ref="rule_group_read_todo"/>
        </record>
        <record model="ir.rule" id="rule_group_read_todo_line2">
            <field name="field" search="[('name', '=', 'calendar_read_users'), ('model.model', '=', 'calendar.todo')]"/>
            <field name="operator">=</field>
            <field name="operand">User</field>
            <field name="rule_group" ref="rule_group_read_todo"/>
        </record>

        <record model="ir.rule.group" id="rule_group_write_todo">
            <field name="model" search="[('model', '=', 'calendar.todo')]"/>
            <field name="global_p" eval="False"/>
            <field name="default_p" eval="True"/>
            <field name="perm_read" eval="True"/>
            <field name="perm_write" eval="True"/>
            <field name="perm_create" eval="True"/>
            <field name="perm_delete" eval="True"/>
        </record>
        <record model="ir.rule" id="rule_group_write_todo_line1">
            <field name="field" search="[('name', '=', 'calendar_owner'), ('model.model', '=', 'calendar.todo')]"/>
            <field name="operator">=</field>
            <field name="operand">User</field>
            <field name="rule_group" ref="rule_group_write_todo"/>
        </record>
        <record model="ir.rule" id="rule_group_write_todo_line2">
            <field name="field" search="[('name', '=', 'calendar_write_users'), ('model.model', '=', 'calendar.todo')]"/>
            <field name="operator">=</field>
            <field name="operand">User</field>
            <field name="rule_group" ref="rule_group_write_todo"/>
        </record>

        <record model="ir.ui.view" id="attendee_view_tree">
            <field name="model">calendar.todo.attendee</field>
            <field name="type">tree</field>
            <field name="arch" type="xml">
                <![CDATA[
                <tree string="Attendees">
                    <field name="todo" select="1"/>
                    <field name="email" select="1"/>
                    <field name="status" select="1"/>
                </tree>
                ]]>
            </field>
        </record>

        <record model="ir.ui.view" id="attendee_view_form">
            <field name="model">calendar.todo.attendee</field>
            <field name="type">form</field>
            <field name="arch" type="xml">
                <![CDATA[
                <form string="Attendee">
                    <label name="todo"/>
                    <field name="todo" colspan="3"/>
                    <label name="email"/>
                    <field name="email"/>
                    <label name="status"/>
                    <field name="status"/>
                </form>
                ]]>
            </field>
        </record>

        <record model="ir.ui.view" id="rdate_view_tree">
            <field name="model">calendar.todo.rdate</field>
            <field name="type">tree</field>
            <field name="arch" type="xml">
                <![CDATA[
                <tree string="Recurrence Dates">
                    <field name="todo" select="1"/>
                    <field name="datetime" select="1"/>
                    <field name="date" select="2"/>
                </tree>
                ]]>
            </field>
        </record>

        <record model="ir.ui.view" id="rdate_view_form">
            <field name="model">calendar.todo.rdate</field>
            <field name="type">form</field>
            <field name="arch" type="xml">
                <![CDATA[
                <form string="Recurrence Date">
                    <label name="todo"/>
                    <field name="todo" colspan="3"/>
                    <label name="datetime"/>
                    <field name="datetime"/>
                    <label name="date"/>
                    <field name="date"/>
                </form>
                ]]>
            </field>
        </record>

        <record model="ir.ui.view" id="exdate_view_tree">
            <field name="model">calendar.todo.exdate</field>
            <field name="type">tree</field>
            <field name="arch" type="xml">
                <![CDATA[
                <tree string="Exception Dates">
                    <field name="todo" select="1"/>
                    <field name="datetime" select="1"/>
                    <field name="date" select="2"/>
                </tree>
                ]]>
            </field>
        </record>

        <record model="ir.ui.view" id="exdate_view_form">
            <field name="model">calendar.todo.exdate</field>
            <field name="type">form</field>
            <field name="arch" type="xml">
                <![CDATA[
                <form string="Exception Date">
                    <label name="todo"/>
                    <field name="todo" colspan="3"/>
                    <label name="datetime"/>
                    <field name="datetime"/>
                    <label name="date"/>
                    <field name="date"/>
                </form>
                ]]>
            </field>
        </record>

        <record model="ir.ui.view" id="rrule_view_tree">
            <field name="model">calendar.todo.rrule</field>
            <field name="type">tree</field>
            <field name="arch" type="xml">
                <![CDATA[
                <tree string="Recurrence Rules">
                    <field name="todo" select="1"/>
                    <field name="freq" select="1"/>
                </tree>
                ]]>
            </field>
        </record>

        <record model="ir.ui.view" id="rrule_view_form">
            <field name="model">calendar.todo.rrule</field>
            <field name="type">form</field>
            <field name="arch" type="xml">
                <![CDATA[
                <form string="Recurrence Rule">
                    <label name="todo"/>
                    <field name="todo" colspan="3"/>
                    <label name="freq"/>
                    <field name="freq" colspan="3"/>
                    <label name="until"/>
                    <field name="until"/>
                    <label name="until_date"/>
                    <field name="until_date"/>
                    <label name="count"/>
                    <field name="count" colspan="3"/>
                    <label name="interval"/>
                    <field name="interval" colspan="3"/>
                    <label name="bysecond"/>
                    <field name="bysecond" colspan="3"/>
                    <label name="byminute"/>
                    <field name="byminute" colspan="3"/>
                    <label name="byhour"/>
                    <field name="byhour" colspan="3"/>
                    <label name="byday"/>
                    <field name="byday" colspan="3"/>
                    <label name="bymonthday"/>
                    <field name="bymonthday" colspan="3"/>
                    <label name="byyearday"/>
                    <field name="byyearday" colspan="3"/>
                    <label name="byweekno"/>
                    <field name="byweekno" colspan="3"/>
                    <label name="bymonth"/>
                    <field name="bymonth" colspan="3"/>
                    <label name="bysetpos"/>
                    <field name="bysetpos" colspan="3"/>
                    <label name="wkst"/>
                    <field name="wkst" colspan="3"/>
                </form>
                ]]>
            </field>
        </record>

        <record model="ir.ui.view" id="exrule_view_tree">
            <field name="model">calendar.todo.exrule</field>
            <field name="type">tree</field>
            <field name="arch" type="xml">
                <![CDATA[
                <tree string="Exception Rules">
                    <field name="todo" select="1"/>
                    <field name="freq" select="1"/>
                </tree>
                ]]>
            </field>
        </record>

        <record model="ir.ui.view" id="exrule_view_form">
            <field name="model">calendar.todo.exrule</field>
            <field name="type">form</field>
            <field name="arch" type="xml">
                <![CDATA[
                <form string="Exception Rule">
                    <label name="todo"/>
                    <field name="todo" colspan="3"/>
                    <label name="freq"/>
                    <field name="freq" colspan="3"/>
                    <label name="until"/>
                    <field name="until"/>
                    <label name="until_date"/>
                    <field name="until_date"/>
                    <label name="count"/>
                    <field name="count" colspan="3"/>
                    <label name="interval"/>
                    <field name="interval" colspan="3"/>
                    <label name="bysecond"/>
                    <field name="bysecond" colspan="3"/>
                    <label name="byminute"/>
                    <field name="byminute" colspan="3"/>
                    <label name="byhour"/>
                    <field name="byhour" colspan="3"/>
                    <label name="byday"/>
                    <field name="byday" colspan="3"/>
                    <label name="bymonthday"/>
                    <field name="bymonthday" colspan="3"/>
                    <label name="byyearday"/>
                    <field name="byyearday" colspan="3"/>
                    <label name="byweekno"/>
                    <field name="byweekno" colspan="3"/>
                    <label name="bymonth"/>
                    <field name="bymonth" colspan="3"/>
                    <label name="bysetpos"/>
                    <field name="bysetpos" colspan="3"/>
                    <label name="wkst"/>
                    <field name="wkst" colspan="3"/>
                </form>
                ]]>
            </field>
        </record>

    </data>
</tryton>
