[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:
@@ -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 > 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 > 0 and record.allow_timesheets.raw_value">
|
||||
<t name="allocated_hours" t-if="record.allocated_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="'border border-warning'" t-if="record.progress.raw_value >= 80 and record.progress.raw_value <= 100"/>
|
||||
<t t-set="badge" t-value="'border border-danger'" t-if="record.remaining_hours.raw_value < 0"/>
|
||||
|
||||
Reference in New Issue
Block a user