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

    <!-- Groups - Bank Stmt Preparer , Bank Stmt Verifier -->
    <record id="group_bank_stmt_preparer" model="res.groups">
        <field name="name">Bank Statement Preparer</field>
        <field name="category_id" ref="base.module_category_hidden"/>
        <field name="implied_ids" eval="[(4, ref('account.group_account_user'))]"/>
    </record>

    <record id="group_bank_stmt_verifier" model="res.groups">
        <field name="name">Bank Statement Verifier</field>
        <field name="category_id" ref="base.module_category_hidden"/>
        <field name="implied_ids" eval="[(4, ref('group_bank_stmt_preparer'))]"/>
        <field name="users" eval="[(4, ref('base.user_root'))]"/>
    </record>

    <!-- Security Rule for Bank Rec Stmts -->
    <record id="comp_rule" model="ir.rule">
        <field name="name">Bank Statements</field>
        <field ref="model_bank_acc_rec_statement" 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>

</odoo>
