<odoo>
    <record id="access_forwardport_maintenance" model="ir.model.access">
        <field name="name">Access to maintenance is useless</field>
        <field name="model_id" ref="model_runbot_merge_maintenance"/>
        <field name="perm_read">0</field>
        <field name="perm_create">0</field>
        <field name="perm_write">0</field>
        <field name="perm_unlink">0</field>
    </record>

    <record model="ir.cron" id="maintenance">
        <field name="name">Maintenance of repo cache</field>
        <field name="model_id" ref="model_runbot_merge_maintenance"/>
        <field name="state">code</field>
        <field name="code">model._run()</field>
        <!--
        run sunday morning as it can take a while, unlikely someone will need
        to stage or forward-port stuff at that point
        -->
        <field name="nextcall" eval="datetime.utcnow() + relativedelta(weekday=6, hour=2, minute=0, second=0, microsecond=0)"/>
        <field name="interval_number">1</field>
        <field name="interval_type">weeks</field>
        <field name="numbercall">-1</field>
        <field name="doall" eval="False"/>
    </record>
</odoo>
