Compare commits
3 Commits
16.0-exclu
...
16.0-exclu
Author | SHA1 | Date | |
---|---|---|---|
|
46ac195662 | ||
|
6814938949 | ||
|
070193bea1 |
@@ -3,7 +3,7 @@
|
|||||||
|
|
||||||
{
|
{
|
||||||
"name": "helpdesk_portal_timesheet",
|
"name": "helpdesk_portal_timesheet",
|
||||||
"version": "16.0.1.0.0",
|
"version": "16.0.1.0.1",
|
||||||
"author": "Elabore",
|
"author": "Elabore",
|
||||||
"website": "https://elabore.coop",
|
"website": "https://elabore.coop",
|
||||||
"maintainer": "Elabore",
|
"maintainer": "Elabore",
|
||||||
@@ -12,7 +12,8 @@
|
|||||||
"summary": "Show ticket timesheets in portal view",
|
"summary": "Show ticket timesheets in portal view",
|
||||||
# any module necessary for this one to work correctly
|
# any module necessary for this one to work correctly
|
||||||
"depends": [
|
"depends": [
|
||||||
"helpdesk_mgmt_timesheet"
|
"helpdesk_mgmt_timesheet",
|
||||||
|
"sale_timesheet_line_exclude",
|
||||||
],
|
],
|
||||||
"qweb": [],
|
"qweb": [],
|
||||||
"external_dependencies": {
|
"external_dependencies": {
|
||||||
@@ -31,4 +32,4 @@
|
|||||||
# and independently installed. Used for synergetic or glue modules.
|
# and independently installed. Used for synergetic or glue modules.
|
||||||
"auto_install": False,
|
"auto_install": False,
|
||||||
"application": False,
|
"application": False,
|
||||||
}
|
}
|
||||||
|
@@ -4,30 +4,44 @@
|
|||||||
<template id="portal_timesheet_table" name="Portal Timesheet Table">
|
<template id="portal_timesheet_table" name="Portal Timesheet Table">
|
||||||
<table class="o_portal_my_doc_table table table-sm">
|
<table class="o_portal_my_doc_table table table-sm">
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th>Date</th>
|
<th>Date</th>
|
||||||
<th>Employee</th>
|
<th>Employee</th>
|
||||||
<th>Description</th>
|
<th>Description</th>
|
||||||
<th t-if="is_uom_day" class="text-end">Days Spent</th>
|
<th t-if="is_uom_day" class="text-end">Days Spent</th>
|
||||||
<th t-else="" class="text-end">Hours Spent</th>
|
<th t-else="" class="text-end">Hours Spent</th>
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tr t-foreach="timesheets" t-as="timesheet">
|
<tr t-foreach="timesheets" t-as="timesheet">
|
||||||
<td><t t-esc="timesheet.date" t-options='{"widget": "date"}'/></td>
|
<t t-if="not timesheet.exclude_from_sale_order">
|
||||||
<td t-attf-title="#{timesheet.employee_id.name}"><t t-esc="timesheet.employee_id.name"/></td>
|
<td>
|
||||||
<td><t t-esc="timesheet.name"/></td>
|
<t t-esc="timesheet.date" t-options='{"widget": "date"}'/>
|
||||||
<td class="text-end">
|
</td>
|
||||||
<span t-if="is_uom_day" t-esc="timesheet._get_timesheet_time_day()" t-options='{"widget": "timesheet_uom"}'/>
|
<td t-attf-title="#{timesheet.employee_id.name}">
|
||||||
<span t-else="" t-field="timesheet.unit_amount" t-options='{"widget": "float_time"}'/>
|
<t t-esc="timesheet.employee_id.name"/>
|
||||||
</td>
|
</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>
|
</tr>
|
||||||
<tfoot>
|
<tfoot>
|
||||||
<tr>
|
<tr>
|
||||||
<th colspan="3"></th>
|
<th colspan="3"></th>
|
||||||
<th class="text-end">
|
<th class="text-end">
|
||||||
<t t-set="timesheets_amount" t-value="round(sum(timesheets.mapped('unit_amount')), 2) or 0.0"></t>
|
<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-if="is_uom_day">
|
||||||
<div t-else=""><strong>Hours Spent:</strong> <span t-esc="timesheets_amount" t-options='{"widget": "float_time"}'/></div>
|
<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>
|
</th>
|
||||||
</tr>
|
</tr>
|
||||||
</tfoot>
|
</tfoot>
|
||||||
|
Reference in New Issue
Block a user