<?xml version="1.0" encoding="utf-8" ?>
<!--
    Copyright ACSONE SA/NV
    License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
-->
<odoo noupdate="1">

    <template id="message_activity_assigned">
        <div style="margin: 0px; padding: 0px; font-size: 13px;">
            <span>You have some activities assigned that expire soon:</span>

            <t t-foreach="activities.mapped('activity_type_id')" t-as="activity_type">
                <h3><span t-field="activity_type.display_name">:</span></h3>
                <t
                    t-foreach="activities.filtered(lambda activity: activity.activity_type_id == activity_type)"
                    t-as="activity"
                >
                    <span
                        t-field="activity.create_uid.name"
                    /> assigned you an activity <span
                        t-field="activity.activity_type_id.name"
                    />
                        <t t-if="activity.summary">(<span
                            t-field="activity.summary"
                        />)</t>
                        on <span t-field="activity.res_name" />
                        to close for <span t-field="activity.date_deadline" />.<br />
                    <p style="margin: 16px 0px 16px 0px;">
                        <a
                            t-att-href="'/mail/view?model=%s&amp;res_id=%s' % (activity.res_model, activity.res_id)"
                            style="background-color:#875A7B; padding: 8px 16px 8px 16px; text-decoration: none; color: #fff; border-radius: 5px;"
                        >
                            View
                            <t t-esc="model_description or 'document'" />
                        </a>
                    </p>
                </t>
            </t>
        </div>

    </template>

</odoo>
