<?xml version="1.0"?>
<openerp>
    <data noupdate="0">

<!--
 Users Groups
-->
    <record model="res.groups" id="group_system">
        <field name="name">Administration / Configuration</field>
    </record>

    <record model="res.groups" id="group_erp_manager">
        <field name="name">Administration / Access Rights</field>
    </record>

    <record model="res.groups" id="group_user">
        <field name="name">Employee</field>
    </record>

    <record model="res.groups" context="{'noadmin':True}" id="group_multi_company">
        <field name="name">Useability / Multi Companies</field>
    </record>

    <record model="res.groups" context="{'noadmin':True}" id="group_extended">
        <field name="name">Useability / Extended View</field>
    </record>

    <record model="res.groups" id="group_no_one" context="{'noadmin':True}">
        <field name="name">Useability / No One</field>
    </record>

    <record id="group_sale_manager" model="res.groups">
        <field name="name">Sales / Manager</field>
    </record>
    <record id="group_sale_salesman" model="res.groups">
        <field name="name">Sales / User</field>
    </record>
    <!-- Set accesses to menu -->
    <record model="ir.ui.menu" id="base.menu_administration">
        <field name="groups_id" eval="[(6,0, [ref('group_system'), ref('group_erp_manager')])]"/>
    </record>

    <record model="ir.rule" id="res_partner_address_rule">
        <field name="name">res.partner.address company</field>
        <field name="model_id" ref="model_res_partner_address"/>
        <field name="global" eval="True"/>
        <field name="domain_force">[('company_id','child_of',[user.company_id.id])]</field>
    </record>

    <record model="ir.rule" id="res_partner_rule">
        <field name="name">res.partner company</field>
        <field name="model_id" ref="model_res_partner"/>
        <field name="global" eval="True"/>
        <field name="domain_force">[('company_id','child_of',[user.company_id.id])]</field>
    </record>

    <record model="ir.rule" id="multi_company_default_rule">
        <field name="name">Multi_company_default company</field>
        <field name="model_id" ref="model_multi_company_default"/>
        <field name="global" eval="True"/>
        <field name="domain_force">[('company_id','child_of',[user.company_id.id])]</field>
    </record>

    </data>
</openerp>

