[FIX] hr_timesheet: fix access rights of planned_hours
Before this commit, Even if the user doesn't have access to the timesheet still user was able to see the "Allocated Hours" in Project tasks. which is part of the timesheet. After this commit, if the user doesn't have access to the timesheet then the user won't be able to see the "Allocated Hours" in Project tasks. task:3472646 closes odoo/odoo#137135 Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
This commit is contained in:
@@ -14,11 +14,11 @@
|
||||
<field name="remaining_hours" widget="timesheet_uom" sum="Remaining Hours" optional="hide" decoration-danger="progress >= 100" decoration-warning="progress >= 80 and progress < 100" groups="hr_timesheet.group_hr_timesheet_user"/>
|
||||
<field name="progress" widget="progressbar" optional="hide" options="{'overflow_class': 'bg-danger'}" groups="hr_timesheet.group_hr_timesheet_user"/>
|
||||
</xpath>
|
||||
<xpath expr="//label[@for='date_deadline']" position="before" groups="hr_timesheet.group_hr_timesheet_user">
|
||||
<xpath expr="//label[@for='date_deadline']" position="before">
|
||||
<field name="encode_uom_in_days" invisible="1"/>
|
||||
<field name="subtask_count" invisible="1"/>
|
||||
<label for="allocated_hours" invisible="not allow_timesheets"/>
|
||||
<div class="text-nowrap" invisible="not allow_timesheets">
|
||||
<label for="allocated_hours" invisible="not allow_timesheets" groups="hr_timesheet.group_hr_timesheet_user"/>
|
||||
<div class="text-nowrap" invisible="not allow_timesheets" groups="hr_timesheet.group_hr_timesheet_user">
|
||||
<field name="allocated_hours" class="oe_inline o_field_float_time" widget="timesheet_uom_no_toggle"/>
|
||||
<span invisible="subtask_count == 0">
|
||||
(incl. <field name="subtask_allocated_hours" nolabel="1" widget="timesheet_uom_no_toggle" class="oe_inline"/> on
|
||||
|
||||
Reference in New Issue
Block a user