<?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="menu_view_tree_tree">
            <field name="model">ir.ui.menu</field>
            <field name="type">tree</field>
            <field name="field_childs">childs</field>
            <field name="priority" eval="20"/>
            <field name="name">ui_menu_tree</field>
        </record>

        <record model="ir.ui.view" id="menu_view_list">
            <field name="model">ir.ui.menu</field>
            <field name="type">tree</field>
            <field name="priority" eval="10"/>
            <field name="name">ui_menu_list</field>
        </record>

        <record model="ir.ui.view" id="menu_view_form">
            <field name="model">ir.ui.menu</field>
            <field name="type">form</field>
            <field name="name">ui_menu_form</field>
        </record>

        <record model="ir.action.act_window" id="act_menu_tree">
            <field name="name">Menu</field>
            <field name="res_model">ir.ui.menu</field>
            <field name="usage">menu</field>
            <field name="domain" eval="[('parent', '=', None)]" pyson="1"/>
        </record>
        <record model="ir.action.act_window.view"
            id="act_menu_tree_view1">
            <field name="sequence" eval="1"/>
            <field name="view" ref="menu_view_tree_tree"/>
            <field name="act_window" ref="act_menu_tree"/>
        </record>

        <record model="ir.action.act_window" id="act_menu_list">
            <field name="name">Menu</field>
            <field name="res_model">ir.ui.menu</field>
        </record>
        <record model="ir.action.act_window.view"
            id="act_menu_list_view1">
            <field name="sequence" eval="10"/>
            <field name="view" ref="menu_view_list"/>
            <field name="act_window" ref="act_menu_list"/>
        </record>
        <record model="ir.action.act_window.view"
            id="act_menu_list_view2">
            <field name="sequence" eval="20"/>
            <field name="view" ref="menu_view_form"/>
            <field name="act_window" ref="act_menu_list"/>
        </record>

        <menuitem
            parent="menu_ui"
            action="act_menu_list"
            sequence="10"
            id="menu_menu_list"/>

        <record model="ir.model.access" id="access_ui_menu">
            <field name="model">ir.ui.menu</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_ui_menu_admin">
            <field name="model">ir.ui.menu</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.rule.group" id="rule_group_ui_menu">
            <field name="name">User in groups</field>
            <field name="model">ir.ui.menu</field>
            <field name="global_p" eval="True"/>
        </record>
        <record model="ir.rule" id="rule_ui_menu1">
            <field name="domain" eval="[('groups', 'in', Eval('groups', []))]" pyson="1"/>
            <field name="rule_group" ref="rule_group_ui_menu"/>
        </record>
        <record model="ir.rule" id="rule_ui_menu2">
            <field name="domain" eval="[('groups', '=', None)]" pyson="1"/>
            <field name="rule_group" ref="rule_group_ui_menu"/>
        </record>
    </data>
</tryton>
