<?xml version="1.0"?>
<data inherit_id="sale.sale_order_portal_template">
        <xpath expr="//t[@t-set='entries']/div/div/div[hasclass('o_download_pdf')]" position="inside">
            <t t-if="sale_order.timesheet_count &gt; 0 and sale_order.state == 'sale'">
                <a class="btn btn-light flex-grow-1" t-att-href="'/my/timesheets?search_in=so&amp;search=%s' % sale_order.name" title="View Timesheets" target="_blank" role="button" t-if="is_timesheet">View Timesheets</a>
            </t>
        </xpath>
    </data>

    