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

 
      <!--  Leads RECORD RULE-->
<record id="sos_inside_sales_leads_own_records_rule" model="ir.rule">
    <field name="name">Sos Inside Leads: Own Records - Read Access</field>
    <field name="model_id" ref="model_sos_inside_sales_leads"/>
    <field name="domain_force">[(1, '=', 1)]</field>
    <field name="groups" eval="[
        (4, ref('sos_inventory.sos_management_user')),
        (4, ref('sos_inventory.sos_finance_user'))
    ]"/>
    <field name="perm_read" eval="1"/>
    <field name="perm_write" eval="1"/>
    <field name="perm_create" eval="1"/>
    <field name="perm_unlink" eval="0"/>
</record>

  <record id="sos_inside_sales_leads_all_records_rule" model="ir.rule">
    <field name="name">Sos Inside Leads: All Records - Read Access</field>
    <field name="model_id" ref="model_sos_inside_sales_leads"/>
     <field name="domain_force">[
            '|',
            ('create_uid', '=', user.id),
            ('lead_generated_by', '=', user.id)
        ]</field>
    <field name="groups" eval="[(4, ref('base.group_user'))]"/>
    <field name="perm_read" eval="1"/>
    <field name="perm_write" eval="1"/>
    <field name="perm_create" eval="0"/>
    <field name="perm_unlink" eval="0"/>
</record>
</odoo>
