<?xml version="1.0"?>
<data><templates position="before">
                <field name="progress"/>
                <field name="remaining_hours"/>
                <field name="allocated_hours"/>
                <field name="allow_timesheets"/>
                <field name="encode_uom_in_days" invisible="1"/>
            </templates>
            <field name="priority" position="after">
                <t name="allocated_hours" t-if="record.allocated_hours.raw_value &gt; 0 and record.allow_timesheets.raw_value">
                    <t t-set="badge" t-value="'border border-success'"/>
                    <t t-set="badge" t-value="'border border-warning'" t-if="record.progress.raw_value &gt;= 0.8 and record.progress.raw_value &lt;= 1"/>
                    <t t-set="badge" t-value="'border border-danger'" t-if="record.remaining_hours.raw_value &lt; 0"/>
                    <t t-set="title" t-value="'Remaining days'" t-if="record.encode_uom_in_days.raw_value"/>
                    <t t-set="title" t-value="'Time Remaining'" t-else=""/>
                    <div t-attf-class="badge {{ badge }} bg-transparent flex-shrink-0" t-att-title="title">
                        <field name="remaining_hours" widget="timesheet_uom"/>
                    </div>
                </t>
            </field>
        </data>