[MIG] init 18.0

This commit is contained in:
Stéphan Sainléger
2026-01-16 16:25:10 +01:00
parent 243603069e
commit 0720f67a14
87 changed files with 0 additions and 3666 deletions

View File

@@ -1,62 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<!-- Template to display the timesheet table on the portal -->
<template id="portal_timesheet_table" name="Portal Timesheet Table">
<table class="o_portal_my_doc_table table table-sm">
<thead>
<tr>
<th>Date</th>
<th>Employee</th>
<th>Description</th>
<th t-if="is_uom_day" class="text-end">Days Spent</th>
<th t-else="" class="text-end">Hours Spent</th>
</tr>
</thead>
<tr t-foreach="timesheets" t-as="timesheet">
<t t-if="not timesheet.exclude_from_sale_order">
<td>
<t t-esc="timesheet.date" t-options='{"widget": "date"}'/>
</td>
<td t-attf-title="#{timesheet.employee_id.name}">
<t t-esc="timesheet.employee_id.name"/>
</td>
<td>
<t t-esc="timesheet.name"/>
</td>
<td class="text-end">
<span t-if="is_uom_day" t-esc="timesheet._get_timesheet_time_day()" t-options='{"widget": "timesheet_uom"}'/>
<span t-else="" t-field="timesheet.unit_amount" t-options='{"widget": "float_time"}'/>
</td>
</t>
</tr>
<tfoot>
<tr>
<th colspan="3"></th>
<th class="text-end">
<t t-set="timesheets_amount" t-value="round(sum(timesheets.filtered(lambda t: not t.exclude_from_sale_order).mapped('unit_amount')), 2) or 0.0"></t>
<div t-if="is_uom_day">
<strong>Days Spent:</strong>
<span t-esc="timesheets._convert_hours_to_days(timesheets_amount)" t-options='{"widget": "timesheet_uom"}'/>
</div>
<div t-else="">
<strong>Hours Spent:</strong>
<span t-esc="timesheets_amount" t-options='{"widget": "float_time"}'/>
</div>
</th>
</tr>
</tfoot>
</table>
</template>
<!-- Inheritance to display timesheets on the ticket portal page -->
<template id="portal_helpdesk_ticket_page_inherit_timesheet" inherit_id="helpdesk_mgmt.portal_helpdesk_ticket_page" name="Ticket Portal Template with Timesheets">
<xpath expr="//t[@t-set='card_body']" position="inside">
<div class="container mt-4" t-if="ticket.timesheet_ids">
<hr class="mt-4 mb-1"/>
<h5 id="ticket_timesheets" class="mt-2 mb-2" data-anchor="true">Timesheets</h5>
<t t-set="timesheets" t-value="ticket.timesheet_ids"/>
<t t-set="is_uom_day" t-value="timesheets._is_timesheet_encode_uom_day()"/>
<t t-call="helpdesk_portal_timesheet.portal_timesheet_table"/>
</div>
</xpath>
</template>
</odoo>