<?xml version="1.0" encoding="utf-8"?>
<odoo noupdate="1">
    <record id="ir_rule_discuss_channel_crm_lead" model="ir.rule">
        <field name="name">discuss.channel: sales users can read lead's origin channel</field>
        <field name="model_id" ref="mail.model_discuss_channel"/>
        <field name="groups" eval="[(4, ref('sales_team.group_sale_salesman'))]"/>
        <field name="domain_force">[("has_crm_lead", "=", True)]</field>
        <field name="perm_write" eval="False"/>
        <field name="perm_create" eval="False"/>
        <field name="perm_unlink" eval="False"/>
    </record>

    <record id="ir_rule_discuss_channel_member_crm_lead" model="ir.rule">
        <field name="name">discuss.channel.member: sales users can read/create members on lead's origin channel</field>
        <field name="model_id" ref="mail.model_discuss_channel_member"/>
        <field name="groups" eval="[(4, ref('sales_team.group_sale_salesman'))]"/>
        <field name="domain_force">[("channel_id.has_crm_lead", "=", True)]</field>
        <field name="perm_write" eval="False"/>
        <field name="perm_unlink" eval="False"/>
    </record>
</odoo>
