[IMP] project_working_time_task: display total billable and non billable hours on task

This commit is contained in:
2025-11-18 17:53:11 +01:00
parent 558274c22b
commit af5627b3ff
3 changed files with 89 additions and 2 deletions

View File

@@ -31,6 +31,24 @@
</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)]}"/>