<?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>
        <menuitem
            name="Scheduler"
            parent="menu_administration"
            sequence="50"
            id="menu_scheduler"/>

        <record model="ir.ui.view" id="cron_view_tree">
            <field name="model">ir.cron</field>
            <field name="type">tree</field>
            <field name="name">cron_list</field>
        </record>
        <record model="ir.ui.view" id="cron_view_form">
            <field name="model">ir.cron</field>
            <field name="type">form</field>
            <field name="name">cron_form</field>
        </record>
        <record model="ir.action.act_window" id="act_cron_form">
            <field name="name">Actions</field>
            <field name="res_model">ir.cron</field>
            <field name="context"></field>
        </record>
        <record model="ir.action.act_window.view"
            id="act_cron_form_view1">
            <field name="sequence" eval="1"/>
            <field name="view" ref="cron_view_tree"/>
            <field name="act_window" ref="act_cron_form"/>
        </record>
        <record model="ir.action.act_window.view"
            id="act_cron_form_view2">
            <field name="sequence" eval="2"/>
            <field name="view" ref="cron_view_form"/>
            <field name="act_window" ref="act_cron_form"/>
        </record>
        <menuitem
            parent="ir.menu_scheduler"
            action="act_cron_form"
            sequence="10"
            id="menu_cron_form"/>

        <record model="ir.model.button" id="cron_run_once_button">
            <field name="model">ir.cron</field>
            <field name="name">run_once</field>
            <field name="string">Run Once</field>
        </record>
        <record model="ir.model.button-res.group" id="cron_run_once_button_group_admin">
            <field name="button" ref="cron_run_once_button"/>
            <field name="group" ref="res.group_admin"/>
        </record>

        <record model="ir.model.access" id="access_cron">
            <field name="model">ir.cron</field>
            <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.model.access" id="access_cron_admin">
            <field name="model">ir.cron</field>
            <field name="group" ref="res.group_admin"/>
            <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.ui.view" id="cron_log_view_list">
            <field name="model">ir.cron.log</field>
            <field name="type">tree</field>
            <field name="name">cron_log_list</field>
        </record>

        <record model="ir.ui.view" id="cron_log_view_form">
            <field name="model">ir.cron.log</field>
            <field name="type">form</field>
            <field name="name">cron_log_form</field>
        </record>

        <record model="ir.ui.view" id="cron_log_view_graph">
            <field name="model">ir.cron.log</field>
            <field name="type">graph</field>
            <field name="name">cron_log_graph</field>
        </record>
    </data>

    <data noupdate="1">
        <record model="ir.cron" id="cron_cron_log_clean">
            <field name="method">ir.cron.log|clean</field>
            <field name="interval_number" eval="1"/>
            <field name="interval_type">months</field>
        </record>
    </data>
</tryton>
