[FIX] hr_holidays: include time in demo data
All fields not provided default to 0, so the the exact values are `%Y-%m-20 00:00:00` - `%Y-%m-22 00:00:00`. Because this is only 2 days it can entirely overlap with a week-end (e.g. 2021-02-20/21), leading to `number_of_days` computed to 0 and triggering an error at confirmation (`"The following employees are not supposed to work during that period"`). Change familly trip as the same issue would occure in May 2021 closes odoo/odoo#65326 X-original-commit: ada1da9a0cea6aaa3f91ee34fd3b273be79e1e3d Signed-off-by: Martin Trigaux (mat) <mat@odoo.com> Signed-off-by: Christophe Monniez (moc) <moc@odoo.com>
This commit is contained in:
@@ -62,10 +62,10 @@
|
||||
<record id="hr_holidays_cl" model="hr.leave">
|
||||
<field name="name">Trip with Family</field>
|
||||
<field name="holiday_status_id" ref="holiday_status_comp"/>
|
||||
<field eval="time.strftime('%Y-%m-01')" name="date_from"/>
|
||||
<field eval="time.strftime('%Y-%m-03')" name="date_to"/>
|
||||
<field eval="time.strftime('%Y-%m-01')" name="request_date_from"/>
|
||||
<field eval="time.strftime('%Y-%m-03')" name="request_date_to"/>
|
||||
<field eval="time.strftime('%Y-%m-01 08:00:00')" name="date_from"/>
|
||||
<field eval="time.strftime('%Y-%m-03 17:00:00')" name="date_to"/>
|
||||
<field eval="time.strftime('%Y-%m-01 08:00:00')" name="request_date_from"/>
|
||||
<field eval="time.strftime('%Y-%m-03 17:00:00')" name="request_date_to"/>
|
||||
<field name="number_of_days">10</field>
|
||||
<field name="employee_id" ref="hr.employee_admin"/>
|
||||
</record>
|
||||
@@ -80,10 +80,10 @@
|
||||
<record id="hr_holidays_sl" model="hr.leave">
|
||||
<field name="name">Doctor Appointment</field>
|
||||
<field name="holiday_status_id" ref="holiday_status_sl"/>
|
||||
<field eval="time.strftime('%Y-%m-20')" name="date_from"/>
|
||||
<field eval="time.strftime('%Y-%m-22')" name="date_to"/>
|
||||
<field eval="time.strftime('%Y-%m-20')" name="request_date_from"/>
|
||||
<field eval="time.strftime('%Y-%m-22')" name="request_date_to"/>
|
||||
<field eval="time.strftime('%Y-%m-20 08:00:00')" name="date_from"/>
|
||||
<field eval="time.strftime('%Y-%m-22 17:00:00')" name="date_to"/>
|
||||
<field eval="time.strftime('%Y-%m-20 08:00:00')" name="request_date_from"/>
|
||||
<field eval="time.strftime('%Y-%m-22 17:00:00')" name="request_date_to"/>
|
||||
<field name="number_of_days">3</field>
|
||||
<field name="employee_id" ref="hr.employee_admin"/>
|
||||
<field name="state">confirm</field>
|
||||
|
||||
Reference in New Issue
Block a user