<?xml version="1.0"?>
<kanban class="o_kanban_badge">
                <field name="id"/>
                <field name="name"/>
                <field name="description"/>
                <field name="stat_my"/>
                <field name="granted_count"/>
                <field name="stat_this_month"/>
                <field name="unique_owner_ids"/>
                <field name="stat_my_monthly_sending"/>
                <field name="remaining_sending"/>
                <field name="rule_max_number"/>
                <templates>
                    <t t-name="kanban-box">
                        <div t-attf-class="o_kanban_gamification oe_kanban_global_click #{record.stat_my.raw_value ? 'oe_kanban_color_5' : 'oe_kanban_color_white'}">
                            <div class="o_kanban_image">
                                <img t-att-src="kanban_image('gamification.badge', 'image_1024', record.id.raw_value)" t-att-title="record.name.value" t-att-alt="record.name.value"/>
                            </div>
                            <div class="oe_kanban_details">
                                <strong class="o_kanban_record_title"><field name="name"/></strong>
                                <span class="oe_grey">
                                    <t t-if="record.remaining_sending.value != -1">
                                        <t t-esc="record.stat_my_monthly_sending.value"/>/<t t-esc="record.rule_max_number.value"/>
                                    </t>
                                    <t t-if="record.remaining_sending.value == -1">
                                        <t t-esc="record.stat_my_monthly_sending.value"/>/∞
                                    </t>
                                </span>
                                <div t-if="record.remaining_sending.value == 0" class="oe_grey">Can not grant</div>
                                <div>
                                    <strong><t t-esc="record.granted_count.raw_value"/></strong> granted,
                                    <strong><t t-esc="record.stat_this_month.raw_value"/></strong> this month
                                </div>
                                <div t-if="!widget.isHtmlEmpty(record.description.value)" class="o_kanban_badge_description pb-3">
                                    <em t-out="record.description.value"/>
                                    <div>
                                        <t t-foreach="record.unique_owner_ids.raw_value.slice(0,11)" t-as="owner" t-key="owner">
                                            <img class="oe_kanban_avatar o_image_24_cover rounded-circle" t-att-src="kanban_image('res.users', 'avatar_128', owner)" t-att-data-member_id="owner" alt="Owner"/>
                                        </t>
                                    </div>
                                </div>
                                <div t-if="record.remaining_sending.value != 0 and !selection_mode" class="o_kanban_button">
                                    <button type="action" name="315" class="oe_highlight btn btn-primary">Grant</button>
                                </div>
                            </div>
                        </div>
                    </t>
                </templates>
            </kanban>
        