[FIX] hr_timesheet: Hide remaining hours tag on task kanban if allow_timesheet is false

Currently, when the project have the 'allow_timesheet' false even though
it will display the remaning hours tag in task kanban view.
so purpose of the task is hide the 'remaining hours' tag if
allow_timesheet is false.

So after this commit, Hide 'remaining_hours' tag on task kanban view
if allow_timesheet is False.

closes odoo/odoo#50754

Taskid: 2243305
Closes: #50357
X-original-commit: daa75ea5f217010deb4cb5937747f37ab533bcd6
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
This commit is contained in:
Urvi Soni
2020-05-06 12:31:07 +00:00
committed by Barad Mahendra
parent 6054f60d51
commit 33f7a1f9a7
+2 -1
View File
@@ -236,9 +236,10 @@
<field name="progress" />
<field name="remaining_hours" />
<field name="planned_hours" />
<field name="allow_timesheets"/>
</templates>
<div class="oe_kanban_bottom_left" position="inside">
<t t-if="record.planned_hours.raw_value &gt; 0">
<t t-if="record.planned_hours.raw_value &gt; 0 and record.allow_timesheets.raw_value">
<t t-set="badge" t-value="" t-if="record.progress.raw_value &lt; 80"/>
<t t-set="badge" t-value="'badge-warning'" t-if="record.progress.raw_value &gt;= 80 and record.progress.raw_value &lt;= 100"/>
<t t-set="badge" t-value="'badge-danger'" t-if="record.remaining_hours.raw_value &lt; 0"/>