<?xml version="1.0"?>
<t t-name="hr_timesheet.timesheet_project_task_page">
        <t t-set="show_record" t-value="len(docs.ids) == 1"/>
        <t t-set="title" t-value="docs._description"/>
        <t t-set="company" t-value="docs.company_id if len(docs) == 1 else docs.env.company"/>
        <t t-set="show_task" t-value="True"/>
        <t t-if="not from_project">
            <t t-set="show_task" t-value="False"/>
            <t t-set="timesheet_report_data" t-value="docs._get_timesheet_report_data()"/>
            <t t-set="timesheets_per_task" t-value="timesheet_report_data['timesheets_per_task']"/>
            <t t-set="subtask_ids_per_task_id" t-value="timesheet_report_data['subtask_ids_per_task_id']"/>
        </t>
        <t t-call="web.html_container">
            <t t-call="web.internal_layout">
                <div class="page">
                    <t t-foreach="docs" t-as="doc">
                        <div class="oe_structure"/>
                        <div class="mt8">
                            <t t-set="lines" t-value="doc.timesheet_ids if from_project else timesheets_per_task.get(doc, doc.env['account.analytic.line'])"/>
                            <h1 t-if="lines">
                                <t t-out="title"/>: <t t-out="doc.name"/>
                            </h1>
                            <t t-if="lines" t-call="hr_timesheet.timesheet_table"/>
                            <t t-if="not from_project">
                                <t t-set="task_id" t-value="doc.id"/>
                                <t t-call="hr_timesheet.timesheet_report_subtask"/>
                            </t>
                        </div>
                    </t>
                </div>
            </t>
        </t>
    </t>

    