mirror of
https://gitlab.com/hibou-io/hibou-odoo/suite.git
synced 2025-01-20 12:37:31 +02:00
33 lines
1.9 KiB
XML
33 lines
1.9 KiB
XML
<?xml version="1.0" encoding="UTF-8" ?>
|
|
<odoo>
|
|
<template id="report_invoice_document_inherit" inherit_id="account.report_invoice_document">
|
|
<xpath expr="//div[@class='page']" position="inside">
|
|
<div class="container" t-if="o.timesheet_ids">
|
|
<hr/>
|
|
<h3>Timesheets</h3>
|
|
<table class="table table-sm">
|
|
<thead>
|
|
<tr class="active">
|
|
<th>Date</th>
|
|
<th class="col-md-6">Description</th>
|
|
<th>Responsible</th>
|
|
<th>Duration</th>
|
|
</tr>
|
|
</thead>
|
|
<t t-foreach="o.timesheet_ids.mapped('project_id')" t-as="project">
|
|
<tr class="bg-primary"><td><h4>Project</h4></td><td colspan="3"><h4 t-esc="project.name"/></td></tr>
|
|
<t t-foreach="o.timesheet_ids.filtered(lambda l: l.project_id == project).mapped('task_id')" t-as="task">
|
|
<tr class="bg-info"><td><h5>Task</h5></td><td colspan="3"><h5 t-esc="task.name"/></td></tr>
|
|
<tr t-foreach="o.timesheet_ids.filtered(lambda l: l.project_id == project and l.task_id == task)" t-as="timesheet">
|
|
<td><t t-esc="timesheet.date"/></td>
|
|
<td><t t-esc="timesheet.name"/></td>
|
|
<td><t t-esc="timesheet.sudo().user_id.name"/></td>
|
|
<td><span t-field="timesheet.unit_amount" t-options="{"widget": "duration", "unit": "hour", "round": "minute"}"/></td>
|
|
</tr>
|
|
</t>
|
|
</t>
|
|
</table>
|
|
</div>
|
|
</xpath>
|
|
</template>
|
|
</odoo> |