[IMP] project_working_time_task_portal : add non billable hours for subtasks
Some checks failed
pre-commit / pre-commit (pull_request) Failing after 1m30s

This commit is contained in:
2025-11-18 15:28:47 +01:00
parent 6af5442cec
commit c0a1a0aa5c
3 changed files with 105 additions and 33 deletions

View File

@@ -19,14 +19,28 @@
</span>
<field name="non_billable_effective_hours" widget="timesheet_uom" class="mt-2" attrs="{'invisible' : [('planned_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='remaining_hours']" position="after">
<span>
<label class="font-weight-bold" for="billable_remaining_hours" string="Billable Remaining Hours" attrs="{'invisible': ['|', ('planned_hours', '=', 0.0), ('encode_uom_in_days', '=', True)]}"/>
<label class="font-weight-bold" for="billable_remaining_hours" string="Billable Remaining Days" attrs="{'invisible': ['|', ('planned_hours', '=', 0.0), ('encode_uom_in_days', '=', False)]}"/>
<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)]}" nolabel="1"/>
<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>
</odoo>