<?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="role_view_form">
            <field name="model">res.role</field>
            <field name="type">form</field>
            <field name="name">role_form</field>
        </record>

        <record model="ir.ui.view" id="role_view_list">
            <field name="model">res.role</field>
            <field name="type">tree</field>
            <field name="name">role_list</field>
        </record>

        <record model="ir.action.act_window" id="act_role_form">
            <field name="name">Roles</field>
            <field name="res_model">res.role</field>
        </record>
        <record model="ir.action.act_window.view" id="act_role_form_view1">
            <field name="sequence" eval="10"/>
            <field name="view" ref="role_view_list"/>
            <field name="act_window" ref="act_role_form"/>
        </record>
        <record model="ir.action.act_window.view" id="act_role_form_view2">
            <field name="sequence" eval="20"/>
            <field name="view" ref="role_view_form"/>
            <field name="act_window" ref="act_role_form"/>
        </record>
        <menuitem
            parent="res.menu_res"
            action="act_role_form"
            sequence="50"
            id="menu_role_form"/>

        <record model="ir.model.access" id="access_role">
            <field name="model">res.role</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_role_admin">
            <field name="model">res.role</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="user_view_form">
            <field name="model">res.user</field>
            <field name="inherit" ref="res.user_view_form"/>
            <field name="name">user_form</field>
        </record>

        <record model="ir.ui.view" id="user_role_form">
            <field name="model">res.user.role</field>
            <field name="type">form</field>
            <field name="name">user_role_form</field>
        </record>

        <record model="ir.ui.view" id="user_role_list">
            <field name="model">res.user.role</field>
            <field name="type">tree</field>
            <field name="name">user_role_list</field>
        </record>

        <record model="ir.model.access" id="access_user_role">
            <field name="model">res.user.role</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_user_role_admin">
            <field name="model">res.user.role</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.cron" id="cron_sync_roles">
            <field name="method">res.user|sync_roles</field>
            <field name="interval_number" eval="1"/>
            <field name="interval_type">days</field>
        </record>
    </data>
</tryton>
