summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIEL <iel@odoo.com>2020-10-30 17:33:33 +0000
committerIEL <iel@odoo.com>2020-11-02 08:20:56 +0000
commit47213962c8884125e8f68c7bd39e499a585d1345 (patch)
treedb89f8e99b933282c6c29ac7a5c7d6cb5bc87096
parent03481fd3df9bc53a17ba884ad4029ae46d7e54bf (diff)
[FIX] hr_holidays: hide Duration for half day leaves
STEPS: * install hr_leaves * allocate half days leaves * start creating new time off, set [x] Half day checkbox BEFORE: there is label "Duration", but no any fields for it AFTER: hide Duration label WHY: * this bug came after improvements in https://github.com/odoo/odoo/commit/d2238de57630d58c4913ab44746476b83492c72f --- opw-2370907 closes odoo/odoo#61088 Signed-off-by: Ivan Yelizariev // IEL <yelizariev@users.noreply.github.com>
-rw-r--r--addons/hr_holidays/views/hr_leave_views.xml3
1 files changed, 1 insertions, 2 deletions
diff --git a/addons/hr_holidays/views/hr_leave_views.xml b/addons/hr_holidays/views/hr_leave_views.xml
index 20e9675bc2d..eca899b2761 100644
--- a/addons/hr_holidays/views/hr_leave_views.xml
+++ b/addons/hr_holidays/views/hr_leave_views.xml
@@ -307,8 +307,7 @@
<!-- When the user is leave manager, he should always see `number_of_days` to allow
him to edit the value. `number_of_hours_display` is only an informative field -->
- <label for="number_of_days" string="Duration"/>
- <!-- <div attrs="{'invisible': [('request_unit_half', '=', False), ('request_unit_hours', '=', False)]}"> -->
+ <label for="number_of_days" string="Duration" attrs="{'invisible': [('request_unit_half', '=', True), ('leave_type_request_unit', '!=', 'hour')]}"/>
<div>
<div class="o_row">
<div groups="!hr_holidays.group_hr_holidays_manager" attrs="{'invisible': ['|', ('request_unit_half', '=', True), ('request_unit_hours', '=', True)]}" class="o_row">