<?xml version="1.0" encoding="utf-8"?>
<openerp>
<data noupdate="0">

    <record id="base.group_sale_salesman" model="res.groups">
        <field name="name">Sales / User - Own Leads Only</field>
    </record>

    <record id="base.group_sale_salesman_all_leads" model="res.groups">
        <field name="name">Sales / User - All Leads</field>
        <field name="implied_ids" eval="[(4, ref('base.group_sale_salesman'))]"/>
    </record>

    <record id="base.group_sale_manager" model="res.groups">
        <field name="name">Sales / Manager</field>
        <field name="implied_ids" eval="[(4, ref('base.group_sale_salesman_all_leads'))]"/>
    </record>

    <record model="res.users" id="base.user_admin">
        <field eval="[(4,ref('base.group_partner_manager'))]" name="groups_id"/>
    </record>

    <record id="crm_rule_personal_lead" model="ir.rule">
        <field name="name">Personal Leads</field>
        <field ref="model_crm_lead" name="model_id"/>
        <field name="domain_force">['|',('user_id','=',user.id),('user_id','=',False)]</field>
        <field name="groups" eval="[(4, ref('base.group_sale_salesman'))]"/>
    </record>
    <record id="crm_rule_all_lead" model="ir.rule">
        <field name="name">All Leads</field>
        <field ref="model_crm_lead" name="model_id"/>
        <field name="domain_force">[(1,'=',1)]</field>
        <field name="groups" eval="[(4, ref('base.group_sale_salesman_all_leads'))]"/>
    </record>

    <record model='ir.ui.menu' id='base.menu_base_partner'>
        <field name="groups_id" eval="[(4,ref('base.group_sale_manager')),(4,ref('base.group_sale_salesman'))]"/>
    </record>

    <record model="ir.ui.menu" id="base.menu_base_config">
        <field eval="[(4, ref('base.group_sale_manager'))]" name="groups_id"/>
    </record>
    
    </data>
</openerp>
