[FIX] hr_timesheet: fix project kanban remaining hour field visibility

Description of the issue:
remaining hour field was visible to all users

Desired behavior after PR is merged:
remaining hour will only visible to that user who have timesheet access this
field will invisible if user doesn't have timesheet access

task-3484290

closes odoo/odoo#137082

X-original-commit: e737f0934f8a83cd02a4a79fbf174b95b524a4e7
Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
This commit is contained in:
rajh-odoo
2023-09-29 14:48:17 +00:00
parent 30290b592f
commit 9b2ca51df7
2 changed files with 2 additions and 2 deletions
@@ -69,7 +69,7 @@
<t t-set="title" t-value="'Remaining days'" t-if="record.encode_uom_in_days.raw_value"/>
<t t-set="title" t-value="'Remaining hours'" t-else=""/>
<div t-if="record.allow_timesheets.raw_value and record.allocated_hours.raw_value &gt; 0"
t-attf-class="oe_kanban_align badge border {{ badgeColor }}" t-att-title="title">
t-attf-class="oe_kanban_align badge border {{ badgeColor }}" t-att-title="title" groups="hr_timesheet.group_hr_timesheet_user">
<field name="remaining_hours" widget="timesheet_uom"/>
</div>
</xpath>
@@ -195,7 +195,7 @@
<field name="encode_uom_in_days" invisible="1"/>
</templates>
<div class="oe_kanban_bottom_left" position="inside">
<t name="allocated_hours" t-if="record.allocated_hours.raw_value &gt; 0 and record.allow_timesheets.raw_value">
<t name="allocated_hours" t-if="record.allocated_hours.raw_value &gt; 0 and record.allow_timesheets.raw_value" groups="hr_timesheet.group_hr_timesheet_user">
<t t-set="badge" t-value=""/>
<t t-set="badge" t-value="'border border-warning'" t-if="record.progress.raw_value &gt;= 80 and record.progress.raw_value &lt;= 100"/>
<t t-set="badge" t-value="'border border-danger'" t-if="record.remaining_hours.raw_value &lt; 0"/>