summaryrefslogtreecommitdiff
path: root/addons/hr_holidays
diff options
context:
space:
mode:
authorMartin Trigaux <mat@odoo.com>2021-02-01 09:07:01 +0000
committerMartin Trigaux <mat@odoo.com>2021-02-01 09:41:45 +0000
commitada1da9a0cea6aaa3f91ee34fd3b273be79e1e3d (patch)
tree392b4e6a9c57778772d1025451810833adbeae06 /addons/hr_holidays
parent5ef4b2c77518a4183ce6cc96224f128f8bed10ca (diff)
[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#65314 Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
Diffstat (limited to 'addons/hr_holidays')
-rw-r--r--addons/hr_holidays/data/hr_holidays_demo.xml16
1 files changed, 8 insertions, 8 deletions
diff --git a/addons/hr_holidays/data/hr_holidays_demo.xml b/addons/hr_holidays/data/hr_holidays_demo.xml
index 33f3d007fcb..ae1efa8c0f4 100644
--- a/addons/hr_holidays/data/hr_holidays_demo.xml
+++ b/addons/hr_holidays/data/hr_holidays_demo.xml
@@ -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>