<?xml version="1.0"?>
<data inherit_id="project.portal_my_task">
        <xpath expr="//div[@name='portal_my_task_second_column']" position="inside">
            <t t-if="task.project_id.allow_billable and env.user.has_group('sales_team.group_sale_salesman')">
                <div t-if="task.sale_order_id"><strong>Sales Order:</strong>
                    <span t-if="so_accessible"><a t-attf-href="{{ task.sale_order_id.access_url }}" t-field="task.sale_order_id"/></span>
                    <span t-else="" t-field="task.sale_order_id"/>
                </div>
                <div t-if="invoices_accessible"><strong>Invoices:</strong>
                    <span t-foreach="task.sale_order_id.invoice_ids" t-as="invoice_line">
                        <t t-if="invoice_line.id in invoices_accessible">
                            <a t-attf-href="/my/invoices/{{ invoice_line.id }}">
                                <i t-if="invoice_line.state == 'draft'">Draft Invoice</i>
                                <t t-else="" t-esc="invoice_line.name"/></a>
                            <span t-if="not invoice_line_last">,</span>
                        </t>
                        <t t-else=""><span t-esc="invoice_line.name"/><span t-if="not invoice_line_last">,</span></t>
                    </span>
                </div>
                <div t-if="task.sale_line_id.untaxed_amount_invoiced &gt; 0"><strong>Invoiced:</strong>
                    <span t-field="task.sale_line_id.untaxed_amount_invoiced"/>
                </div>
                <div name="amount_due" t-if="task.sale_line_id.untaxed_amount_to_invoice &gt; 0"><strong>Amount Due:</strong>
                    <span t-field="task.sale_line_id.untaxed_amount_to_invoice"/>
                </div>
            </t>
        </xpath>
    </data>

