[IMP] hr_holidays: fix display of duration in allocation form view
Purpose: better display duration. Label for hours / days is not very user friendly when displayed left compared to the value. In this commit we move the unit display right of the value and correctly display choices related to the leave request date options. This commit is linked to task ID 1871812 and PR #26180.
This commit is contained in:
@@ -75,8 +75,18 @@
|
||||
<field name="type_request_unit" invisible="1"/>
|
||||
<field name="name" attrs="{'readonly':[('state','!=','draft'),('state','!=','confirm')]}"/>
|
||||
<field name="holiday_status_id" context="{'employee_id':employee_id}"/>
|
||||
<field name="number_of_days_temp" string="Duration" attrs="{'readonly': [('state', '=', 'validate')], 'invisible': ['|', ('type_request_unit', '=', 'hour'),('accrual', '=', True)]}"/>
|
||||
<field name="number_of_hours" string="Duration" attrs="{'readonly': [('state', '=', 'validate')], 'invisible': ['|', ('type_request_unit', '!=', 'hour'),('accrual', '=', True)]}"/>
|
||||
|
||||
<label for="number_of_days_temp" string="Duration" attrs="{'readonly': [('state', '=', 'validate')], 'invisible': ['|', ('type_request_unit', '=', 'hour'),('accrual', '=', True)]}"/>
|
||||
<div attrs="{'readonly': [('state', '=', 'validate')], 'invisible': ['|', ('type_request_unit', '=', 'hour'),('accrual', '=', True)]}">
|
||||
<field name="number_of_days_temp" class="oe_inline" nolabel="1" string="Duration"/>
|
||||
<span class="ml8">Days</span>
|
||||
</div>
|
||||
|
||||
<label for="number_of_hours" string="Duration" attrs="{'readonly': [('state', '=', 'validate')], 'invisible': ['|', ('type_request_unit', '!=', 'hour'),('accrual', '=', True)]}"/>
|
||||
<div attrs="{'readonly': [('state', '=', 'validate')], 'invisible': ['|', ('type_request_unit', '!=', 'hour'),('accrual', '=', True)]}">
|
||||
<field name="number_of_hours" class="oe_inline" nolabel="1" string="Duration"/>
|
||||
<span class="ml8">Hours</span>
|
||||
</div>
|
||||
</group>
|
||||
<group>
|
||||
<field name="holiday_type" string="Mode" groups="hr_holidays.group_hr_holidays_user" context="{'employee_id':employee_id}" />
|
||||
|
||||
Reference in New Issue
Block a user