<?xml version="1.0" encoding="utf-8" ?>
<!-- Copyright 2020 ACSONE SA/NV
     License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). -->
<odoo>
    <record model="ir.model.access" id="transmit_method_substitution_rule_access_user">
        <field name="name">transmit.method.substitution.rule access manager</field>
        <field name="model_id" ref="model_transmit_method_substitution_rule" />
        <field name="group_id" ref="base.group_user" />
        <field name="perm_read" eval="1" />
        <field name="perm_create" eval="0" />
        <field name="perm_write" eval="0" />
        <field name="perm_unlink" eval="0" />
    </record>

    <record
        model="ir.model.access"
        id="transmit_method_substitution_rule_access_manager"
    >
        <field name="name">transmit.method.substitution.rule access manager</field>
        <field name="model_id" ref="model_transmit_method_substitution_rule" />
        <field name="group_id" ref="account.group_account_manager" />
        <field name="perm_read" eval="1" />
        <field name="perm_create" eval="1" />
        <field name="perm_write" eval="1" />
        <field name="perm_unlink" eval="1" />
    </record>

    <record id="transmit_method_substitution_rule_multi_company_rule" model="ir.rule">
        <field name="name">Transmit Method Substitution Rule Multi-company Rule</field>
        <field name="model_id" ref="model_transmit_method_substitution_rule" />
        <field
            name="domain_force"
        >['|',('company_id','=',False),('company_id','child_of',user.company_ids.ids)]</field>
    </record>
</odoo>
