[FIX] hr_holidays : Only show allocable leaves in allocation requests form

Current Behaviour :
Employee can request any type of leave.

Behaviour after the PR:
Employee are only shown leave that they can request.

opw-2684670

closes odoo/odoo#79502

Signed-off-by: Kevin Baptiste <kba@odoo.com>
This commit is contained in:
Florian Damhaut
2021-11-12 10:30:57 +00:00
parent 1bb9cb89c8
commit 41f7426595
@@ -97,8 +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'}"/>
<field name="holiday_status_id" context="{'employee_id':employee_id, 'default_date_from':current_date, 'request_type':'allocation'}" domain="[('employee_requests', '=', 'yes')]"/>
<field name="allocation_type" invisible="1" widget="radio"
attrs="{'readonly': ['|', ('is_officer', '=', False), ('state', 'not in', ('draft', 'confirm'))]}"/>
<field name="is_officer" invisible="1"/>