Skip to content
Snippets Groups Projects
Commit 30f621ff authored by rajh-odoo's avatar rajh-odoo
Browse files

[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#135171

Signed-off-by: default avatarXavier Bol (xbo) <xbo@odoo.com>
parent 7e78e1f4
No related branches found
No related tags found
No related merge requests found
......@@ -255,7 +255,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.has_planned_hours_tasks.raw_value"
t-attf-class="oe_kanban_align badge {{ badge }}" t-att-title="title">
t-attf-class="oe_kanban_align badge {{ badge }}" t-att-title="title" groups="hr_timesheet.group_hr_timesheet_user">
<field name="remaining_hours" widget="timesheet_uom"/>
</div>
</xpath>
......@@ -275,7 +275,7 @@
<field name="encode_uom_in_days" invisible="1"/>
</templates>
<div class="oe_kanban_bottom_left" position="inside">
<t name="planned_hours" t-if="record.planned_hours.raw_value &gt; 0 and record.allow_timesheets.raw_value">
<t name="planned_hours" t-if="record.planned_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="'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"/>
......
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