[IMP] hr_holidays: improve leave request form display of duration
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. Part of the spec: https://drive.google.com/file/d/1XQtw5ZiAebycXbeHmfbDYYwrFTRmkBNU/view This commit is linked to task ID 1871812 and PR #26180.
This commit is contained in:
@@ -103,9 +103,16 @@
|
||||
<field name="name" attrs="{'readonly':[('state','!=','draft'),('state','!=','confirm')]}"/>
|
||||
<field name="holiday_status_id" context="{'employee_id':employee_id, 'default_date_from':date_from}"/>
|
||||
|
||||
<field name="number_of_days_temp" attrs="{'invisible': [('leave_type_request_unit', '=', 'hour')]}"/>
|
||||
<field name="number_of_hours" attrs="{'invisible': [('leave_type_request_unit', '!=', 'hour')]}"/>
|
||||
<label for="number_of_days_temp" string="Duration"/>
|
||||
<div>
|
||||
<div attrs="{'invisible': [('leave_type_request_unit', '=', 'hour')]}">
|
||||
<field name="number_of_days_temp" nolabel="1" class="oe_inline"/>
|
||||
<span class="ml8">Days</span>
|
||||
</div>
|
||||
<div attrs="{'invisible': [('leave_type_request_unit', '!=', 'hour')]}">
|
||||
<field name="number_of_hours" nolabel="1" class="oe_inline"/>
|
||||
<span class="ml8">Hours</span>
|
||||
</div>
|
||||
<field name="request_unit_all" widget="radio" attrs="{'readonly': [('state', '=', 'validate')], 'invisible': [('leave_type_request_unit', '=', 'day')]}"/>
|
||||
<field name="request_unit_day" widget="radio" attrs="{'readonly': [('state', '=', 'validate')], 'invisible': [('leave_type_request_unit', '!=', 'day')]}"/>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user