<?xml version="1.0" encoding="utf-8"?>
<terp>
    <data noupdate="1">
        
        <record id="group_project_manager" model="res.groups">
            <field name="name">Project Manager</field>
        </record>
        
        <record id="group_project_member" model="res.groups">
            <field name="name">Project Member</field>
        </record>
        
        <record id="base.user_admin" model="res.users">
            <field eval="[(4, ref('group_project_manager')), (4, ref('group_project_member'))]" name="groups_id"/>
        </record>
        
        <!-- Project security -->
        <record id="access_project" model="ir.model.access">
            <field name="name">Project</field>
            <field model="ir.model" name="model_id" search="[('model', '=', 'project.project')]"/>
            <field eval="True" name="perm_read"/>
            <field eval="False" name="perm_write"/>
            <field eval="False" name="perm_create"/>
            <field eval="False" name="perm_unlink"/>
        </record>
        
        <record id="access_project_manager" model="ir.model.access">
            <field name="name">Project</field>
            <field model="ir.model" name="model_id" search="[('model', '=', 'project.project')]"/>
            <field name="group_id" ref="group_project_manager"/>
            <field eval="True" name="perm_read"/>
            <field eval="True" name="perm_write"/>
            <field eval="False" name="perm_create"/>
            <field eval="False" name="perm_unlink"/>
        </record>
        
        <!-- Project Task security -->
        <record id="access_project_task" model="ir.model.access">
            <field name="name">Project Task</field>
            <field model="ir.model" name="model_id" search="[('model', '=', 'project.task')]"/>
            <field eval="True" name="perm_read"/>
            <field eval="False" name="perm_write"/>
            <field eval="False" name="perm_create"/>
            <field eval="False" name="perm_unlink"/>
        </record>
        
        <record id="access_project_task_manager" model="ir.model.access">
            <field name="name">Project Task</field>
            <field model="ir.model" name="model_id" search="[('model', '=', 'project.task')]"/>
            <field name="group_id" ref="group_project_manager"/>
            <field eval="True" name="perm_read"/>
            <field eval="True" name="perm_write"/>
            <field eval="True" name="perm_create"/>
            <field eval="True" name="perm_unlink"/>
        </record>
        
        <record id="access_project_task_member" model="ir.model.access">
            <field name="name">Project Task</field>
            <field model="ir.model" name="model_id" search="[('model', '=', 'project.task')]"/>
            <field name="group_id" ref="group_project_member"/>
            <field eval="True" name="perm_read"/>
            <field eval="True" name="perm_write"/>
            <field eval="False" name="perm_create"/>
            <field eval="False" name="perm_unlink"/>
        </record>
        
        <!-- Project Work security -->
        <record id="access_project_task_work" model="ir.model.access">
            <field name="name">Project Task Work</field>
            <field model="ir.model" name="model_id" search="[('model', '=', 'project.task.work')]"/>
            <field eval="True" name="perm_read"/>
            <field eval="False" name="perm_write"/>
            <field eval="False" name="perm_create"/>
            <field eval="False" name="perm_unlink"/>
        </record>
        
        <record id="access_project_task_work_manager" model="ir.model.access">
            <field name="name">Project Task Work</field>
            <field model="ir.model" name="model_id" search="[('model', '=', 'project.task.work')]"/>
            <field name="group_id" ref="group_project_manager"/>
            <field eval="True" name="perm_read"/>
            <field eval="True" name="perm_write"/>
            <field eval="True" name="perm_create"/>
            <field eval="True" name="perm_unlink"/>
        </record>
        
        <record id="access_project_task_work_member" model="ir.model.access">
            <field name="name">Project Task Work</field>
            <field model="ir.model" name="model_id" search="[('model', '=', 'project.task.work')]"/>
            <field name="group_id" ref="group_project_member"/>
            <field eval="True" name="perm_read"/>
            <field eval="True" name="perm_write"/>
            <field eval="True" name="perm_create"/>
            <field eval="True" name="perm_unlink"/>
        </record>
        
    </data>
</terp>