<?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="res.group" id="group_currency_admin">
            <field name="name">Currency Administration</field>
        </record>
        <record model="res.user-res.group" id="user_admin_group_currency_admin">
            <field name="user" ref="res.user_admin"/>
            <field name="group" ref="group_currency_admin"/>
        </record>

        <record model="ir.ui.icon" id="currency_icon">
            <field name="name">tryton-currency</field>
            <field name="path">icons/tryton-currency.svg</field>
        </record>
        <menuitem
            name="Currencies"
            sequence="50"
            id="menu_currency"
            icon="tryton-currency"/>
        <record model="ir.ui.menu-res.group" id="menu_currency_group_currency_admin">
            <field name="menu" ref="menu_currency"/>
            <field name="group" ref="group_currency_admin"/>
        </record>

        <record model="ir.ui.view" id="currency_linked_view_tree">
            <field name="model">currency.linked</field>
            <field name="type">tree</field>
            <field name="name">currency_linked_tree</field>
        </record>

        <record model="ir.ui.view" id="currency_view_form">
            <field name="model">currency.currency</field>
            <field name="type">form</field>
            <field name="name">currency_form</field>
        </record>
        <record model="ir.ui.view" id="currency_view_tree">
            <field name="model">currency.currency</field>
            <field name="type">tree</field>
            <field name="name">currency_tree</field>
        </record>
        <record model="ir.action.act_window" id="act_currency_form">
            <field name="name">Currencies</field>
            <field name="res_model">currency.currency</field>
        </record>
        <record model="ir.action.act_window.view" id="act_currency_form_view1">
            <field name="sequence" eval="10"/>
            <field name="view" ref="currency_view_tree"/>
            <field name="act_window" ref="act_currency_form"/>
        </record>
        <record model="ir.action.act_window.view" id="act_currency_form_view2">
            <field name="sequence" eval="20"/>
            <field name="view" ref="currency_view_form"/>
            <field name="act_window" ref="act_currency_form"/>
        </record>
        <menuitem
            parent="menu_currency"
            action="act_currency_form"
            sequence="10"
            id="menu_currency_form"/>
        <record model="ir.model.access" id="access_currency">
            <field name="model">currency.currency</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_currency_currency_admin">
            <field name="model">currency.currency</field>
            <field name="group" ref="group_currency_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="currency_rate_view_list">
            <field name="model">currency.currency.rate</field>
            <field name="type">tree</field>
            <field name="name">currency_rate_list</field>
        </record>

        <record model="ir.ui.view" id="currency_rate_view_form">
            <field name="model">currency.currency.rate</field>
            <field name="type">form</field>
            <field name="name">currency_rate_form</field>
        </record>

        <record model="ir.ui.view" id="currency_rate_view_graph">
            <field name="model">currency.currency.rate</field>
            <field name="type">graph</field>
            <field name="name">currency_rate_graph</field>
        </record>

        <record model="ir.ui.view" id="cron_view_list">
            <field name="model">currency.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">currency.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">Scheduled Rate Updates</field>
            <field name="res_model">currency.cron</field>
        </record>
        <record model="ir.action.act_window.view" id="act_cron_form_view1">
            <field name="sequence" eval="10"/>
            <field name="view" ref="cron_view_list"/>
            <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="20"/>
            <field name="view" ref="cron_view_form"/>
            <field name="act_window" ref="act_cron_form"/>
        </record>

        <menuitem parent="menu_currency" action="act_cron_form" sequence="20" id="menu_cron_form"/>

        <record model="ir.model.access" id="access_cron">
            <field name="model">currency.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_currency_admin">
            <field name="model">currency.cron</field>
            <field name="group" ref="group_currency_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.model.button" id="cron_run_button">
            <field name="model">currency.cron</field>
            <field name="name">run</field>
            <field name="string">Run</field>
        </record>

        <record model="ir.cron" id="cron_cron">
            <field name="method">currency.cron|update</field>
            <field name="interval_number" eval="1"/>
            <field name="interval_type">days</field>
        </record>
    </data>
</tryton>
