[MIG] init 18.0

This commit is contained in:
Stéphan Sainléger
2026-01-20 15:24:30 +01:00
parent 763fca0d30
commit 27c7904e28
122 changed files with 0 additions and 4415 deletions

View File

@@ -1,41 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<odoo>
<template id="portal_my_task_planned_hours" name="My Task: planned hours" inherit_id="hr_timesheet.portal_my_task" priority="40">
<xpath expr="//t[@t-call='hr_timesheet.portal_timesheet_table']" position="before">
<div class="row">
<div class="col-12 col-md-6 pb-2">
<span style="font-weight:bold;">Planned Hours: </span>
<span t-field="task.planned_hours" t-options="{&quot;widget&quot;: &quot;timesheet_uom_no_toggle&quot;}"/>
<t t-if="task.allow_subtasks and task.subtask_count > 0">
<div>
<strong>Subtask Planned Hours: </strong>
<span t-field="task.subtask_planned_hours" t-options="{&quot;widget&quot;: &quot;timesheet_uom_no_toggle&quot;}"/>
</div>
</t>
</div>
<t t-if="task.billable_progress > 0">
<div class="col-12 col-md-6 pb-2">
<strong>Progress: </strong>
<t t-set="progress" t-value="task.billable_progress"/>
<div class="oe-project_working_time_task_portal progressbar" t-attf-style="width: #{progress}%;">
<t t-esc="progress"/>%
</div>
</div>
</t>
</div>
</xpath>
</template>
<template id="portal_my_task_remaining_hours" name="My Task: remaining hours" inherit_id="hr_timesheet.portal_timesheet_table" priority="40">
<xpath expr="//tr[@t-foreach='timesheets']" position="attributes">
<attribute name="t-if">not timesheet.exclude_from_sale_order</attribute>
</xpath>
<xpath expr="//tfoot/tr/th[last()]" position="replace">
<th class="text-end">
<div t-esc="round(sum(timesheets.filtered(lambda t: not t.exclude_from_sale_order).mapped('unit_amount')), 2)"
t-options="{&quot;widget&quot;: &quot;float_time&quot;}"/>
<div t-if="task.planned_hours > 0">Remaining Hours: <span t-field="task.billable_remaining_hours" t-options="{&quot;widget&quot;: &quot;float_time&quot;}"/></div>
</th>
</xpath>
</template>
</odoo>

View File

@@ -1,64 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<odoo>
<record id="project_working_time_view_task_form" model="ir.ui.view">
<field name="name">project.working.time.view.task.form</field>
<field name="model">project.task</field>
<field name="inherit_id" ref="hr_timesheet.view_task_form2_inherited" />
<field name="priority" eval="99" />
<field name="arch" type="xml">
<xpath expr="//field[@name='effective_hours']" position="after">
<span>
<label class="font-weight-bold" for="billable_effective_hours" string="Billable Effective Hours" attrs="{'invisible': ['|', ('non_billable_effective_hours', '=', 0.0), ('encode_uom_in_days', '=', True)]}"/>
<label class="font-weight-bold" for="billable_effective_hours" string="Billable Effective Days" attrs="{'invisible': ['|', ('non_billable_effective_hours', '=', 0.0), ('encode_uom_in_days', '=', False)]}"/>
</span>
<field name="billable_effective_hours" widget="timesheet_uom" class="mt-2" attrs="{'invisible' : [('non_billable_effective_hours', '=', 0.0)]}" nolabel="1"/>
<span>
<label class="font-weight-bold" for="non_billable_effective_hours" string="Non Billable Effective Hours" attrs="{'invisible': ['|', ('non_billable_effective_hours', '=', 0.0), ('encode_uom_in_days', '=', True)]}"/>
<label class="font-weight-bold" for="non_billable_effective_hours" string="Non Billable Effective Days" attrs="{'invisible': ['|', ('non_billable_effective_hours', '=', 0.0), ('encode_uom_in_days', '=', False)]}"/>
</span>
<field name="non_billable_effective_hours" widget="timesheet_uom" class="mt-2" attrs="{'invisible' : [('non_billable_effective_hours', '=', 0.0)]}" nolabel="1"/>
</xpath>
<xpath expr="//field[@name='subtask_effective_hours']" position="after">
<span>
<label class="font-weight-bold" for="subtask_billable_effective_hours" string="Subtask Billable Effective Hours" attrs="{'invisible': ['|', '|', ('allow_subtasks', '=', False), ('subtask_effective_hours', '=', 0.0), ('encode_uom_in_days', '=', True)]}"/>
<label class="font-weight-bold" for="subtask_billable_effective_hours" string="Subtask Billable Effective Days" attrs="{'invisible': ['|', '|', ('allow_subtasks', '=', False), ('subtask_effective_hours', '=', 0.0), ('encode_uom_in_days', '=', False)]}"/>
</span>
<field name="subtask_billable_effective_hours" widget="timesheet_uom" class="mt-2" attrs="{'invisible' : ['|', ('allow_subtasks', '=', False), ('subtask_effective_hours', '=', 0.0)]}" nolabel="1"/>
<span>
<label class="font-weight-bold" for="subtask_non_billable_effective_hours" string="Subtask Non Billable Effective Hours" attrs="{'invisible': ['|', '|', ('allow_subtasks', '=', False), ('subtask_effective_hours', '=', 0.0), ('encode_uom_in_days', '=', True)]}"/>
<label class="font-weight-bold" for="subtask_non_billable_effective_hours" string="Subtask Non Billable Effective Days" attrs="{'invisible': ['|', '|', ('allow_subtasks', '=', False), ('subtask_effective_hours', '=', 0.0), ('encode_uom_in_days', '=', False)]}"/>
</span>
<field name="subtask_non_billable_effective_hours" widget="timesheet_uom" class="mt-2" attrs="{'invisible' : ['|', ('allow_subtasks', '=', False), ('subtask_effective_hours', '=', 0.0)]}" nolabel="1"/>
</xpath>
<xpath expr="//field[@name='total_hours_spent']" position="after">
<span attrs="{'invisible' : ['|', ('allow_subtasks', '=', False), ('subtask_effective_hours', '=', 0.0)]}">
<label for="total_billable_hours_spent" string="Total Billable Hours"
attrs="{'invisible': [('encode_uom_in_days', '=', True)]}"/>
<label for="total_billable_hours_spent" string="Total Billable Days"
attrs="{'invisible': [('encode_uom_in_days', '=', False)]}"/>
</span>
<field name="total_billable_hours_spent" widget="timesheet_uom" nolabel="1"
attrs="{'invisible' : ['|', ('allow_subtasks', '=', False), ('subtask_effective_hours', '=', 0.0)]}" />
<span attrs="{'invisible' : ['|', ('allow_subtasks', '=', False), ('subtask_effective_hours', '=', 0.0)]}">
<label for="total_non_billable_hours_spent" string="Total Non Billable Hours"
attrs="{'invisible': [('encode_uom_in_days', '=', True)]}"/>
<label for="total_non_billable_hours_spent" string="Total Non Billable Days"
attrs="{'invisible': [('encode_uom_in_days', '=', False)]}"/>
</span>
<field name="total_non_billable_hours_spent" widget="timesheet_uom" nolabel="1"
attrs="{'invisible' : ['|', ('allow_subtasks', '=', False), ('subtask_effective_hours', '=', 0.0)]}" />
</xpath>
<xpath expr="//field[@name='remaining_hours']" position="after">
<span>
<label class="font-weight-bold text-danger" for="billable_remaining_hours" string="Billable Remaining Hours" attrs="{'invisible': ['|', '|', ('planned_hours', '=', 0.0), ('encode_uom_in_days', '=', True), ('billable_remaining_hours', '&gt;=', 0)]}"/>
<label class="font-weight-bold" for="billable_remaining_hours" string="Billable Remaining Hours" attrs="{'invisible': ['|', '|', ('planned_hours', '=', 0.0), ('encode_uom_in_days', '=', True), ('billable_remaining_hours', '&lt;', 0)]}"/>
<label class="font-weight-bold text-danger" for="billable_remaining_hours" string="Billable Remaining Days" attrs="{'invisible': ['|', '|', ('planned_hours', '=', 0.0), ('encode_uom_in_days', '=', False), ('billable_remaining_hours', '&gt;=', 0)]}"/>
<label class="font-weight-bold" for="billable_remaining_hours" string="Billable Remaining Days" attrs="{'invisible': ['|', '|', ('planned_hours', '=', 0.0), ('encode_uom_in_days', '=', False), ('billable_remaining_hours', '&lt;', 0)]}"/>
</span>
<field name="billable_remaining_hours" widget="timesheet_uom" class="oe_subtotal_footer_separator" attrs="{'invisible' : [('planned_hours', '=', 0.0)]}" decoration-danger="billable_remaining_hours &lt; 0" nolabel="1"/>
</xpath>
</field>
</record>
</odoo>

View File

@@ -1,19 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<template id="portal_tasks_list_inherit" inherit_id="project.portal_tasks_list">
<xpath expr="//thead/tr/th[7]" position="replace">
<th t-if="not is_uom_day" class="text-end">Billable Hours</th>
</xpath>
<xpath expr="//tbody/t/tr/td[7]" position="replace">
<td class="text-end">
<t t-if="not is_uom_day">
<span t-field="task.billable_effective_hours"
t-options='{"widget": "float_time"}' />
<t t-if="task.planned_hours > 0"> / <span t-field="task.planned_hours"
t-options='{"widget": "float_time"}' />
</t>
</t>
</td>
</xpath>
</template>
</odoo>