Skip to content
Snippets Groups Projects
Commit c06aa533 authored by Mahendra Barad's avatar Mahendra Barad Committed by kais-odoo
Browse files

[FIX] hr_timesheet: fix the remaining hours label on project sharing


Before this commit, when remaining hours is negative then it the
label was displayed as muted instead of danger.

So in this commit, display the label danger when remaning hours
are negative.

task-3014420

closes odoo/odoo#104601

Related: odoo/enterprise#33447
Signed-off-by: default avatarXavier Bol (xbo) <xbo@odoo.com>
parent 84caa0bb
No related branches found
No related tags found
No related merge requests found
......@@ -100,9 +100,13 @@
attrs="{'invisible' : ['|', ('allow_subtasks', '=', False), ('subtask_effective_hours', '=', 0.0)]}" />
<span class="o_td_label float-start">
<label class="fw-bold" for="remaining_hours" string="Remaining Hours"
attrs="{'invisible': ['|', ('planned_hours', '=', 0.0), ('encode_uom_in_days', '=', True)]}"/>
attrs="{'invisible': ['|', '|', ('planned_hours', '=', 0.0), ('encode_uom_in_days', '=', True), ('remaining_hours', '&lt;', 0)]}"/>
<label class="fw-bold" for="remaining_hours" string="Remaining Days"
attrs="{'invisible': ['|', ('planned_hours', '=', 0.0), ('encode_uom_in_days', '=', False)]}"/>
attrs="{'invisible': ['|', '|', ('planned_hours', '=', 0.0), ('encode_uom_in_days', '=', False), ('remaining_hours', '&lt;', 0)]}"/>
<label class="fw-bold text-danger" for="remaining_hours" string="Remaining Hours"
attrs="{'invisible': ['|', '|', ('planned_hours', '=', 0.0), ('encode_uom_in_days', '=', True), ('remaining_hours', '&gt;=', 0)]}"/>
<label class="fw-bold text-danger" for="remaining_hours" string="Remaining Days"
attrs="{'invisible': ['|', '|', ('planned_hours', '=', 0.0), ('encode_uom_in_days', '=', False), ('remaining_hours', '&gt;=', 0)]}"/>
</span>
<field name="remaining_hours" widget="timesheet_uom" class="oe_subtotal_footer_separator"
attrs="{'invisible' : [('planned_hours', '=', 0.0)]}" nolabel="1"/>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment