<?xml version="1.0"?>
<data inherit_id="hr_timesheet.portal_my_timesheets">
        <xpath expr="//t[@t-foreach='grouped_timesheets']/tbody/tr[hasclass('table-light')]/th[hasclass('text-end')]" position="attributes">
            <attribute name="colspan">2</attribute>
        </xpath>
        <xpath expr="//t[@t-foreach='grouped_timesheets']/tbody/tr[hasclass('table-light')]/th[hasclass('text-end')]" position="before">
            <t t-elif="groupby == 'so_line'">
                <t t-set="sol" t-value="timesheets[0].so_line"/>
                <th colspan="5">
                    <t t-if="sol">
                        <span t-field="sol.display_name"/>
                        <t t-if="sol.remaining_hours_available">
                            <span class="text-muted fw-normal">
                                <t t-if="is_uom_day">
                                    (<span t-esc="timesheets._timesheet_convert_sol_uom(sol, 'uom.product_uom_day')" t-options="{&quot;widget&quot;: &quot;timesheet_uom&quot;}"/> Days Ordered, <span t-esc="timesheets._convert_hours_to_days(sol.remaining_hours)" t-options="{&quot;widget&quot;: &quot;timesheet_uom&quot;}"/> Days Remaining)
                                </t>
                                <t t-else="">
                                    (<span t-esc="timesheets._timesheet_convert_sol_uom(sol, 'uom.product_uom_hour')" t-options="{&quot;widget&quot;: &quot;float_time&quot;}"/> Hours Ordered, <span t-esc="sol.remaining_hours" t-options="{&quot;widget&quot;: &quot;float_time&quot;}"/> Hours Remaining)
                                </t>
                            </span>
                        </t>
                    </t>
                    <t t-else="">
                        Not Billed
                    </t>
                </th>
            </t>
            <t t-elif="groupby == 'order_id'">
                <t t-set="so" t-value="timesheets[0].order_id"/>
                <th colspan="6">
                    <t t-if="so">
                        <span t-field="so.display_name"/>
                    </t>
                    <t t-else="">
                        Not Billed
                    </t>
                </th>
            </t>
            <t t-elif="groupby == 'timesheet_invoice_id'">
                <t t-set="invoice" t-value="timesheets.timesheet_invoice_id"/>
                <th colspan="6">
                    <t t-if="invoice">
                        <span t-field="invoice.display_name"/>
                    </t>
                    <t t-else="">
                        No Invoice
                    </t>
                </th>
            </t>
        </xpath>
        <th name="t_label" position="before">
            <th t-if="not groupby == 'so_line'">Sales Order Item</th>
            <th t-if="not groupby == 'timesheet_invoice_id'">Invoice</th>
        </th>
        <xpath expr="//tbody//td[hasclass('text-end')]" position="before">
            <td t-if="not groupby == 'so_line'"><span t-field="timesheet.so_line" t-att-title="timesheet.so_line.display_name"/></td>
            <td t-if="not groupby == 'timesheet_invoice_id'"><span t-field="timesheet.timesheet_invoice_id" t-att-title="timesheet.timesheet_invoice_id.display_name"/></td>
        </xpath>
    </data>

    