Skip to content
Snippets Groups Projects
Commit 700e584d authored by Thibault Francois's avatar Thibault Francois
Browse files

[FIX] hr_holidays: Cannot save regular allocation


Problem
-------
For regular allocation that have an empty date_from
(Allocation existing before 14.0),
it's not possible to save any change since an invisible field is required
and cannot be set.

Solution
--------
The field date from should be only required for type accrual

closes odoo/odoo#61885

Signed-off-by: default avatarYannick Tivisse (yti) <yti@odoo.com>
parent de6e8133
Branches
Tags
No related merge requests found
......@@ -163,7 +163,7 @@
<xpath expr="//field[@name='allocation_type']" position="after">
<label for="date_from" attrs="{'invisible': [('allocation_type', '=', 'regular')]}"/>
<div class="o_row" attrs="{'invisible': [('allocation_type', '=', 'regular')]}">
<field name="date_from" widget="date" required="1" class="mr-2"/>
<field name="date_from" widget="date" class="mr-2" attrs="{'required': [('allocation_type', '=', 'accrual')]}" />
Run until <field name="date_to" help="If no value set, runs indefinitely" class="ml-2" widget="date"/>
</div>
<label for="date_from" invisible="1"/>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment