<?xml version="1.0" encoding="UTF-8" ?>
<!--
    Copyright 2018-2019 Brainbean Apps (https://brainbeanapps.com)
    License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
-->
<odoo>
    <record id="project_role_view_tree" model="ir.ui.view">
        <field name="name">project.role.view.tree</field>
        <field name="model">project.role</field>
        <field name="arch" type="xml">
            <tree>
                <field name="company_id" groups="base.group_multi_company" />
                <field name="complete_name" />
            </tree>
        </field>
    </record>
    <record id="project_role_view_form" model="ir.ui.view">
        <field name="name">project.role.view.form</field>
        <field name="model">project.role</field>
        <field name="arch" type="xml">
            <form>
                <sheet>
                    <div class="oe_button_box" name="button_box" />
                    <widget
                        name="web_ribbon"
                        title="Archived"
                        bg_color="bg-danger"
                        attrs="{'invisible': [('active', '=', True)]}"
                    />
                    <field name="active" invisible="1" />
                    <group>
                        <field name="company_id" groups="base.group_multi_company" />
                        <field name="parent_id" />
                        <field name="name" />
                    </group>
                    <group>
                        <field name="description" />
                    </group>
                </sheet>
            </form>
        </field>
    </record>
    <record id="project_role_search" model="ir.ui.view">
        <field name="name">project.role.search</field>
        <field name="model">project.role</field>
        <field name="arch" type="xml">
            <search>
                <field name="active" />
                <filter
                    name="inactive"
                    string="Archived"
                    domain="[('active','=',False)]"
                />
            </search>
        </field>
    </record>
    <record id="company_project_roles_action" model="ir.actions.act_window">
        <field name="name">Project Roles</field>
        <field name="res_model">project.role</field>
        <field name="view_mode">tree,form</field>
    </record>
    <menuitem
        id="project_menu_config_roles"
        action="company_project_roles_action"
        parent="project.menu_project_config"
    />
</odoo>
