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

    <record id="group_account_invoice" model="res.groups">
        <field name="name">Invoicing &amp; Payments</field>
        <field name="category_id" ref="base.module_category_accounting_and_finance"/>
        <field name="users" eval="[(4, ref('base.user_root'))]"/>
        <field name="implied_ids" eval="[(4, ref('base.group_user'))]"/>
    </record>

    <record id="group_account_user" model="res.groups">
        <field name="name">Accountant</field>
        <field name="category_id" ref="base.module_category_accounting_and_finance"/>
        <field name="implied_ids" eval="[(4, ref('group_account_invoice'))]"/>
    </record>

    <record id="group_account_manager" model="res.groups">
        <field name="name">Financial Manager</field>
        <field name="category_id" ref="base.module_category_accounting_and_finance"/>
        <field name="implied_ids" eval="[(4, ref('group_account_user'))]"/>
    </record>

    <record id="group_proforma_invoices" model="res.groups">
        <field name="name">Pro-forma Invoices</field>
        <field name="category_id" ref="base.module_category_hidden"/>
    </record>

    <record id="group_supplier_inv_check_total" model="res.groups">
        <field name="name">Check Total on supplier invoices</field>
        <field name="category_id" ref="base.module_category_hidden"/>
    </record>
</data>

<data noupdate="1">
    <record id="account_move_comp_rule" model="ir.rule">
        <field name="name">Account Entry</field>
        <field name="model_id" ref="model_account_move"/>
        <field name="global" eval="True"/>
        <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 name="model_id" ref="model_account_move_line"/>
        <field name="global" eval="True"/>
        <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 name="model_id" ref="model_account_journal_period"/>
        <field name="global" eval="True"/>
        <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 name="model_id" ref="model_account_journal"/>
        <field name="global" eval="True"/>
        <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 name="model_id" ref="model_account_analytic_journal"/>
        <field name="global" eval="True"/>
        <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 name="model_id" ref="model_account_period"/>
        <field name="global" eval="True"/>
        <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 name="model_id" ref="model_account_fiscalyear"/>
        <field name="global" eval="True"/>
        <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 name="model_id" ref="model_account_account"/>
        <field name="global" eval="True"/>
        <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 name="model_id" ref="model_account_tax"/>
        <field name="global" eval="True"/>
        <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 name="model_id" ref="model_account_tax_code"/>
        <field name="global" eval="True"/>
        <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 name="model_id" ref="model_account_invoice"/>
        <field name="global" eval="True"/>
        <field name="domain_force">['|',('company_id','=',False),('company_id','child_of',[user.company_id.id])]</field>
    </record>

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

    <record id="entry_analysis_comp_rule" model="ir.rule">
        <field name="name">Entries Analysis multi-company</field>
        <field name="model_id" ref="model_account_entries_report"/>
        <field name="global" eval="True"/>
        <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 name="model_id" ref="model_account_fiscal_position"/>
        <field name="global" eval="True"/>
        <field name="domain_force">['|',('company_id','=',False),('company_id','child_of',[user.company_id.id])]</field>
    </record>

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

    <record id="account_subscription_line_comp_rule" model="ir.rule">
        <field name="name">Account subscription line company rule</field>
        <field name="model_id" ref="model_account_subscription_line"/>
        <field name="global" eval="True"/>
        <field name="domain_force">['|',('subscription_id.model_id.company_id','=',False),('subscription_id.model_id.company_id','child_of',[user.company_id.id])]</field>
    </record>

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

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

    <record model="ir.rule" id="account_bank_statement_line_comp_rule">
        <field name="name">Account bank statement line company rule</field>
        <field name="model_id" ref="model_account_bank_statement_line"/>
        <field name="global" eval="True"/>
        <field name="domain_force">['|',('company_id','=',False),('company_id','child_of',[user.company_id.id])]</field>
    </record>

</data>
</openerp>
