From 30f621ff4eec3ec9586886dffb5aabc657445379 Mon Sep 17 00:00:00 2001 From: rajh-odoo <rajh@odoo.com> Date: Tue, 12 Sep 2023 15:05:22 +0530 Subject: [PATCH] [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: Xavier Bol (xbo) <xbo@odoo.com> --- addons/hr_timesheet/views/project_views.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/addons/hr_timesheet/views/project_views.xml b/addons/hr_timesheet/views/project_views.xml index 05fdcf4d3cdf..f1884b3982c2 100644 --- a/addons/hr_timesheet/views/project_views.xml +++ b/addons/hr_timesheet/views/project_views.xml @@ -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 > 0 and record.allow_timesheets.raw_value"> + <t name="planned_hours" t-if="record.planned_hours.raw_value > 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 >= 80 and record.progress.raw_value <= 100"/> <t t-set="badge" t-value="'badge-danger'" t-if="record.remaining_hours.raw_value < 0"/> -- GitLab