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

    <record id="group_account_invoice" model="res.groups">
        <field name="name">Accounting / Invoice</field>
    </record>

    <record id="group_account_user" model="res.groups">
        <field name="name">Accounting / Accountant</field>
    </record>

    <record id="group_account_manager" model="res.groups">
        <field name="name">Accounting / Manager</field>
    </record>

    <record model="res.groups" id="group_accounting_accountant">
        <field name="name">Accounting / Accountant and Manager</field>
    </record>


    <record id="menu_finance_reporting" model="ir.ui.menu">
        <field eval="[(6,0,[ref('group_account_manager'), ref('analytic.group_analytic_accounting')])]" name="groups_id"/>
    </record>

    <record id="menu_finance_legal_statement" model="ir.ui.menu">
        <field eval="[(6,0,[ref('group_account_manager'),ref('base.group_system')])]" name="groups_id"/>
    </record>

    <record id="menu_finance_receivables" model="ir.ui.menu">
        <field eval="[(6,0,[ref('group_account_invoice'),ref('group_account_manager'),ref('group_account_user')])]" name="groups_id"/>
    </record>

    <record id="menu_finance_payables" model="ir.ui.menu">
        <field eval="[(6,0,[ref('group_account_invoice'), ref('group_account_user'),ref('group_account_manager')])]" name="groups_id"/>
    </record>

    <record id="menu_finance_charts" model="ir.ui.menu">
        <field eval="[(6,0,[ref('group_account_user'), ref('group_account_manager'), ref('analytic.group_analytic_accounting')])]" name="groups_id"/>
    </record>

    <record id="menu_eaction_account_moves_sale" model="ir.ui.menu">
        <field eval="[(6,0,[ref('group_account_user'),ref('group_account_invoice')])]" name="groups_id"/>
    </record>

    <record id="menu_eaction_account_moves_purchase" model="ir.ui.menu">
        <field eval="[(6,0,[ref('group_account_user'),ref('group_account_invoice')])]" name="groups_id"/>
    </record>

    <record id="menu_action_invoice_tree1" model="ir.ui.menu">
        <field eval="[(6,0,[ref('group_account_user'),ref('group_account_invoice'),ref('group_account_manager'),ref('base.group_system')])]" name="groups_id"/>
    </record>

    <record id="menu_action_invoice_tree2" model="ir.ui.menu">
        <field eval="[(6,0,[ref('group_account_user'),ref('group_account_invoice'),ref('group_account_manager'),ref('base.group_system')])]" name="groups_id"/>
    </record>

    <record id="menu_action_invoice_tree3" model="ir.ui.menu">
        <field eval="[(6,0,[ref('group_account_user'),ref('group_account_invoice'),ref('group_account_manager'),ref('base.group_system')])]" name="groups_id"/>
    </record>

    <record id="menu_action_invoice_tree4" model="ir.ui.menu">
        <field eval="[(6,0,[ref('group_account_user'),ref('group_account_invoice'),ref('group_account_manager'),ref('base.group_system')])]" name="groups_id"/>
    </record>

    <record id="menu_finance_bank_and_cash" model="ir.ui.menu">
        <field eval="[(6,0,[ref('group_account_user'),ref('group_account_manager'),ref('base.group_system')])]" name="groups_id"/>
    </record>

    <record id="menu_action_account_tree2" model="ir.ui.menu">
        <field eval="[(6,0,[ref('group_account_user'),ref('group_account_manager'),ref('base.group_system')])]" name="groups_id"/>
    </record>

    <record id="menu_finance_entries" model="ir.ui.menu">
        <field eval="[(6,0,[ref('group_account_user')])]" name="groups_id"/>
    </record>

    <record id="menu_action_move_journal_line_form" model="ir.ui.menu">
        <field eval="[(6,0,[ref('group_account_user'),ref('group_account_manager'),ref('base.group_system')])]" name="groups_id"/>
    </record>

    <record id="menu_eaction_account_moves_all" model="ir.ui.menu">
        <field eval="[(6,0,[ref('group_account_user')])]" name="groups_id"/>
    </record>

    <record id="menu_dashboard_acc" model="ir.ui.menu">
        <field eval="[(6, 0, [ref('group_account_user')])]" name="groups_id"/>
    </record>

    <record id="final_accounting_reports" model="ir.ui.menu">
        <field eval="[(6,0,[ref('group_account_manager'),ref('base.group_system'), ref('analytic.group_analytic_accounting')])]" name="groups_id"/>
    </record>

    <record id="menu_journals_report" model="ir.ui.menu">
        <field eval="[(6,0,[ref('group_account_manager'),ref('base.group_system')])]" name="groups_id"/>
    </record>

    <record id="menu_action_tax_code_tree" model="ir.ui.menu">
        <field eval="[(6,0,[ref('group_account_user'),ref('group_account_manager'),ref('base.group_system')])]" name="groups_id"/>
    </record>

    <record id="menu_finance_periodical_processing" model="ir.ui.menu">
        <field eval="[(6,0,[ref('group_account_user')])]" name="groups_id"/>
    </record>

    <record id="menu_general_ledger" model="ir.ui.menu">
        <field eval="[(6,0,[ref('group_account_manager'),ref('base.group_system')])]" name="groups_id"/>
    </record>

    <record id="menu_general_Balance_report" model="ir.ui.menu">
        <field eval="[(6,0,[ref('group_account_manager'),ref('base.group_system')])]" name="groups_id"/>
    </record>

    <record id="menu_account_bs_report" model="ir.ui.menu">
        <field eval="[(6,0,[ref('group_account_manager'),ref('base.group_system')])]" name="groups_id"/>
    </record>

    <record id="menu_account_pl_report" model="ir.ui.menu">
        <field eval="[(6,0,[ref('group_account_manager'),ref('base.group_system')])]" name="groups_id"/>
    </record>

    <record id="menu_tax_report" model="ir.ui.menu">
        <field eval="[(6,0,[ref('group_account_manager'),ref('base.group_system')])]" name="groups_id"/>
    </record>

    <record id="next_id_22" model="ir.ui.menu">
        <field eval="[(6,0,[ref('group_account_manager'),ref('base.group_system')])]" name="groups_id"/>
    </record>

    <record id="menu_action_account_invoice_report_all" model="ir.ui.menu">
        <field eval="[(6,0,[ref('group_account_manager')])]" name="groups_id"/>
    </record>

    <record id="menu_action_account_entries_report_all" model="ir.ui.menu">
        <field eval="[(6,0,[ref('group_account_manager')])]" name="groups_id"/>
    </record>

    <record id="menu_finance_statistic_report_statement" model="ir.ui.menu">
        <field eval="[(6,0,[ref('group_account_manager')])]" name="groups_id"/>
    </record>

    <record id="menu_finance_generic_reporting" model="ir.ui.menu">
        <field eval="[(6,0,[ref('analytic.group_analytic_accounting')])]" name="groups_id"/>
    </record>

    <record id="menu_finance_configuration" model="ir.ui.menu">
        <field eval="[(6,0,[ref('analytic.group_analytic_accounting')])]" name="groups_id"/>
    </record>

    <record id="menu_finance_entries" model="ir.ui.menu">
        <field eval="[(6,0,[ref('analytic.group_analytic_accounting')])]" name="groups_id"/>
    </record>

    <record id="menu_analytic_accounting" model="ir.ui.menu">
        <field eval="[(6,0,[ref('analytic.group_analytic_accounting')])]" name="groups_id"/>
    </record>

    <record id="account_move_comp_rule" model="ir.rule">
        <field name="name">Account Entry</field>
        <field ref="model_account_move" name="model_id"/>
        <field eval="True" name="global"/>
        <field name="domain_force">['|',('company_id','=',False),('company_id','child_of',[user.company_id.id])]</field>
    </record>

    <record id="account_move_line_comp_rule" model="ir.rule">
         <field name="name">Entry lines</field>
        <field model="ir.model" name="model_id" ref="model_account_move_line"/>
        <field eval="True" name="global"/>
        <field name="domain_force">['|',('company_id','=',False),('company_id','child_of',[user.company_id.id])]</field>
    </record>

    <record id="journal_period_comp_rule" model="ir.rule">
        <field name="name">Journal Period</field>
        <field model="ir.model" name="model_id" ref="model_account_journal_period"/>
        <field eval="True" name="global"/>
        <field name="domain_force">['|',('company_id','=',False),('company_id','child_of',[user.company_id.id])]</field>
    </record>

    <record id="journal_comp_rule" model="ir.rule">
        <field name="name">Journal multi-company</field>
        <field model="ir.model" name="model_id" ref="model_account_journal"/>
        <field eval="True" name="global"/>
        <field name="domain_force">['|',('company_id','=',False),('company_id','child_of',[user.company_id.id])]</field>
    </record>

    <record id="analytic_journal_comp_rule" model="ir.rule">
        <field name="name">Analytic journal multi-company</field>
        <field model="ir.model" name="model_id" ref="model_account_analytic_journal"/>
        <field eval="True" name="global"/>
        <field name="domain_force">['|',('company_id','=',False),('company_id','child_of',[user.company_id.id])]</field>
    </record>

    <record id="analytic_journal_comp_rule_false" model="ir.rule">
        <field name="name">Analytic journal multi-company</field>
        <field model="ir.model" name="model_id" ref="model_account_analytic_journal"/>
        <field eval="True" name="global"/>
        <field name="domain_force">['|',('company_id','=',False),('company_id','child_of',[user.company_id.id])]</field>
    </record>

    <record id="period_comp_rule" model="ir.rule">
        <field name="name">Period multi-company</field>
        <field model="ir.model" name="model_id" ref="model_account_period"/>
        <field eval="True" name="global"/>
        <field name="domain_force">['|',('company_id','=',False),('company_id','child_of',[user.company_id.id])]</field>
    </record>

    <record id="fiscal_year_comp_rule" model="ir.rule">
        <field name="name">Fiscal year multi-company</field>
        <field model="ir.model" name="model_id" ref="model_account_fiscalyear"/>
        <field eval="True" name="global"/>
        <field name="domain_force">['|',('company_id','=',False),('company_id','child_of',[user.company_id.id])]</field>
    </record>

    <record id="account_comp_rule" model="ir.rule">
        <field name="name">Account multi-company</field>
        <field model="ir.model" name="model_id" ref="model_account_account"/>
        <field eval="True" name="global"/>
        <field name="domain_force">['|',('company_id','=',False),('company_id','child_of',[user.company_id.id])]</field>
    </record>

    <record id="tax_comp_rule" model="ir.rule">
         <field name="name">Tax multi-company</field>
        <field model="ir.model" name="model_id" ref="model_account_tax"/>
        <field eval="True" name="global"/>
        <field name="domain_force">['|',('company_id','=',False),('company_id','child_of',[user.company_id.id])]</field>
    </record>

    <record id="tax_code_comp_rule" model="ir.rule">
        <field name="name">Tax code multi-company</field>
        <field model="ir.model" name="model_id" ref="model_account_tax_code"/>
        <field eval="True" name="global"/>
        <field name="domain_force">['|',('company_id','=',False),('company_id','child_of',[user.company_id.id])]</field>
    </record>

    <record id="invoice_comp_rule" model="ir.rule">
        <field name="name">Invoice multi-company</field>
        <field model="ir.model" name="model_id" ref="model_account_invoice"/>
        <field eval="True" name="global"/>
        <field name="domain_force">['|',('company_id','=',False),('company_id','child_of',[user.company_id.id])]</field>
    </record>

    <record id="account_fiscal_position_comp_rule" model="ir.rule">
        <field name="name">Account fiscal Mapping company rule</field>
        <field model="ir.model" name="model_id" ref="model_account_fiscal_position"/>
        <field eval="True" name="global"/>
        <field name="domain_force">[('company_id','=',user.company_id.id)]</field>
    </record>

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

</data></openerp>
