<?xml version="1.0" encoding="utf-8" ?>
<odoo>
    <!-- Rename old 'Project Administrator' access group name and unlink
    the access rule for the projects -->
    <record id="project.group_project_manager" model="res.groups">
        <field name="name">Restricted Administrator</field>
        <field
            name="rule_groups"
            eval="[(3, ref('project.project_project_manager_rule'))]"
        />
    </record>
    <!-- Restricted Project Manager are allowed to manage its own projects -->
    <record model="ir.rule" id="project_project_restricted_manage_own_project_rule">
        <field name="name">Project: Can manage its own projects</field>
        <field name="model_id" ref="project.model_project_project" />
        <field name="domain_force">[('user_id', '=', user.id)]</field>
        <field name="groups" eval="[(4, ref('project.group_project_manager'))]" />
    </record>
    <!-- Create a new 'Project Administrator' access group with
    the original 'Project Administrator' access rule for project -->
    <record id="group_full_project_manager" model="res.groups">
        <field name="name">Full Administrator</field>
        <field name="category_id" ref="base.module_category_services_project" />
        <field name="implied_ids" eval="[(4, ref('project.group_project_manager'))]" />
        <field
            name="rule_groups"
            eval="[(4, ref('project.project_project_manager_rule'))]"
        />
    </record>
</odoo>
