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

    <record id="mail_activity_rule_my_team" model="ir.rule">
        <field name="name">mail.activity: user: my team</field>
        <field name="model_id" ref="mail.model_mail_activity"/>
        <field name="domain_force">["|", ('team_id', 'in', user.activity_team_ids.ids), "&amp;", ('team_id', '=', False), ('user_id', '=', user.id)]</field>
        <field name="groups" eval="[(4, ref('base.group_user'))]"/>
        <field name="perm_create" eval="True"/>
        <field name="perm_read" eval="False"/>
        <field name="perm_write" eval="True"/>
        <field name="perm_unlink" eval="True"/>
    </record>

    <record id="calendar.calendar_event_rule_private" model="ir.rule">
        <field name="name">Private or group events</field>
        <field name="domain_force">['|', '|', ('privacy', 'not in', ['private', 'team']), '&amp;', ('privacy', '=', 'private'), ('partner_ids', 'in', user.partner_id.id), '&amp;', ('privacy', '=', 'team'), ('team_id', 'in', user.activity_team_ids.ids)]</field>
    </record>

</odoo>
