<?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="user_view_form">
            <field name="model">web.user</field>
            <field name="type">form</field>
            <field name="name">user_form</field>
        </record>

        <record model="ir.ui.view" id="user_view_list">
            <field name="model">web.user</field>
            <field name="type">tree</field>
            <field name="name">user_list</field>
        </record>

        <record model="ir.action.act_window" id="act_user_form">
            <field name="name">Web Users</field>
            <field name="res_model">web.user</field>
        </record>
        <record model="ir.action.act_window.view" id="act_user_form_view1">
            <field name="sequence" eval="10"/>
            <field name="view" ref="user_view_list"/>
            <field name="act_window" ref="act_user_form"/>
        </record>
        <record model="ir.action.act_window.view" id="act_user_form_view2">
            <field name="sequence" eval="20"/>
            <field name="view" ref="user_view_form"/>
            <field name="act_window" ref="act_user_form"/>
        </record>

        <menuitem
            parent="res.menu_res"
            action="act_user_form"
            sequence="50"
            id="menu_user_form"/>

        <record model="ir.action.act_window" id="act_user_form_party">
            <field name="name">Web Users</field>
            <field name="res_model">web.user</field>
            <field
                name="domain"
                eval="['OR', ('party', 'in', Eval('active_ids', [])), ('secondary_parties', 'in', Eval('active_ids', []))]"
                pyson="1"/>
        </record>
        <record model="ir.action.act_window.view" id="act_user_form_party_view1">
            <field name="sequence" eval="10"/>
            <field name="view" ref="user_view_list"/>
            <field name="act_window" ref="act_user_form_party"/>
        </record>
        <record model="ir.action.act_window.view" id="act_user_form_party_view2">
            <field name="sequence" eval="20"/>
            <field name="view" ref="user_view_form"/>
            <field name="act_window" ref="act_user_form_party"/>
        </record>
        <record model="ir.action.keyword" id="act_user_form_party_keyword1">
            <field name="keyword">form_relate</field>
            <field name="model">party.party,-1</field>
            <field name="action" ref="act_user_form_party"/>
        </record>

        <record model="ir.model.access" id="access_user">
            <field name="model">web.user</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_admin">
            <field name="model">web.user</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.model.access" id="access_user_party_admin">
            <field name="model">web.user</field>
            <field name="group" ref="party.group_party_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="user_validate_email_button">
            <field name="model">web.user</field>
            <field name="name">validate_email</field>
            <field name="string">Validate Email</field>
        </record>

        <record model="ir.model.button" id="user_reset_password_button">
            <field name="model">web.user</field>
            <field name="name">reset_password</field>
            <field name="string">Reset Password</field>
        </record>

        <record model="ir.action.report" id="report_email_validation">
            <field name="name">Email Validation</field>
            <field name="model">web.user</field>
            <field name="report_name">web.user.email_validation</field>
            <field name="report">web_user/email_validation.html</field>
            <field name="template_extension">html</field>
        </record>
        <record model="ir.action.report" id="report_email_reset_password">
            <field name="name">Reset Password</field>
            <field name="model">web.user</field>
            <field name="report_name">web.user.email_reset_password</field>
            <field name="report">web_user/email_reset_password.html</field>
            <field name="template_extension">html</field>
        </record>
    </data>
</tryton>
