[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#106815 X-original-commit: c06aa5331eda0408453552a304170ee0bf027a4d Related: odoo/enterprise#34504 Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
This commit is contained in:
committed by
kais-odoo
parent
42a371fc9d
commit
ffdf10339f
@@ -99,9 +99,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', '<', 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', '<', 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', '>=', 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', '>=', 0)]}"/>
|
||||
</span>
|
||||
<field name="remaining_hours" widget="timesheet_uom" class="oe_subtotal_footer_separator"
|
||||
attrs="{'invisible' : [('planned_hours', '=', 0.0)]}" nolabel="1"/>
|
||||
|
||||
Reference in New Issue
Block a user