[FIX] hr_holidays: allow Officers to create allocation again

The domain on the allocation leave type was too restrictive for Time Off
Officer and they couldn't create allocations when the "Employee
Requests" of the Time Off Type was set to "no".

This commit allows the Time Off Officer to request those allocations
again.

closes odoo/odoo#80041

Taskid: 2694163
X-original-commit: d79af924a59f32a0b2dee9b10bb7c8cf388892df
Signed-off-by: Kevin Baptiste <kba@odoo.com>
This commit is contained in:
Kevin Baptiste
2021-11-18 18:45:30 +00:00
parent b15959c70f
commit e20739312a
@@ -97,7 +97,7 @@
<group>
<group>
<field name="type_request_unit" invisible="1"/>
<field name="holiday_status_id" context="{'employee_id':employee_id, 'default_date_from':current_date, 'request_type':'allocation'}" domain="[('employee_requests', '=', 'yes')]"/>
<field name="holiday_status_id" context="{'employee_id':employee_id, 'default_date_from':current_date, 'request_type':'allocation'}"/>
<field name="allocation_type" invisible="1" widget="radio"
attrs="{'readonly': ['|', ('is_officer', '=', False), ('state', 'not in', ('draft', 'confirm'))]}"/>
<field name="is_officer" invisible="1"/>