<?xml version="1.0" encoding="utf-8"?>
<terp>
    <data noupdate="1">
        
        <record id="group_crm_manager" model="res.groups">
            <field name="name">Customer Executive - Manager</field>
        </record>
        
        <record id="group_crm_member" model="res.groups">
            <field name="name">Customer Executive</field>
        </record>
        
        <record id="base.user_admin" model="res.users">
            <field eval="[ (4 ,ref('base.group_admin')), (4, ref('group_crm_manager')), (4, ref('group_crm_member')) ]" name="groups_id"/>
        </record>
        
        <!-- CRM Case security -->
        <record id="access_crm_case" model="ir.model.access">
            <field name="name">CRM Case</field>
            <field model="ir.model" name="model_id" search="[('model', '=', 'crm.case')]"/>
            <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_crm_case_member" model="ir.model.access">
            <field name="name">CRM Case</field>
            <field model="ir.model" name="model_id" search="[('model', '=', 'crm.case')]"/>
            <field name="group_id" ref="group_crm_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>
        
        <!-- CRM Case Section security -->
        <record id="access_crm_case_section" model="ir.model.access">
            <field name="name">Case Section</field>
            <field model="ir.model" name="model_id" search="[('model', '=', 'crm.case.section')]"/>
            <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_crm_case_section_manager" model="ir.model.access">
            <field name="name">Case Section</field>
            <field model="ir.model" name="model_id" search="[('model', '=', 'crm.case.section')]"/>
            <field name="group_id" ref="group_crm_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>
        
        <!-- CRM Segmentation security -->
        <record id="access_crm_segmentation" model="ir.model.access">
            <field name="name">Case Segmentation</field>
            <field model="ir.model" name="model_id" search="[('model', '=', 'crm.segmentation')]"/>
            <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_crm_segmentatio_manager" model="ir.model.access">
            <field name="name">Case Segmentation</field>
            <field model="ir.model" name="model_id" search="[('model', '=', 'crm.segmentation')]"/>
            <field name="group_id" ref="group_crm_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>
        
        <!-- CRM Segmentation Rules security -->
        <record id="access_crm_segmentation_rule" model="ir.model.access">
            <field name="name">Case Segmentation Rules</field>
            <field model="ir.model" name="model_id" search="[('model', '=', 'crm.case.rule')]"/>
            <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_crm_segmentatio_rule_manager" model="ir.model.access">
            <field name="name">Case Segmentation Rules</field>
            <field model="ir.model" name="model_id" search="[('model', '=', 'crm.case.rule')]"/>
            <field name="group_id" ref="group_crm_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>
        
        <!-- Case History security -->
        <record id="access_crm_segmentation_rule" model="ir.model.access">
            <field name="name">Case History</field>
            <field model="ir.model" name="model_id" search="[('model', '=', 'crm.case.log')]"/>
            <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_crm_segmentatio_rule_member" model="ir.model.access">
            <field name="name">Case History</field>
            <field model="ir.model" name="model_id" search="[('model', '=', 'crm.case.log')]"/>
            <field name="group_id" ref="group_crm_member"/>
            <field eval="True" name="perm_read"/>
            <field eval="False" name="perm_write"/>
            <field eval="True" name="perm_create"/>
            <field eval="False" name="perm_unlink"/>
        </record>
    </data>
</terp>