Commit cba0b4b7 authored by Romain Courteaud's avatar Romain Courteaud

[erp5_hr_calendar] Start from date defined on TimeTable itself if it exists.

It allows user to correctly select the start time and time zone.
parent a6b59a54
...@@ -62,7 +62,7 @@ day_of_week = time_table_line.getDayOfWeek()\n ...@@ -62,7 +62,7 @@ day_of_week = time_table_line.getDayOfWeek()\n
quantity = time_table_line.getQuantity()\n quantity = time_table_line.getQuantity()\n
if not(None in (day_of_week, quantity)):\n if not(None in (day_of_week, quantity)):\n
time_table_line.setPeriodicityWeekDayList([day_of_week])\n time_table_line.setPeriodicityWeekDayList([day_of_week])\n
start_date = DateTime("2014/04/01")\n start_date = time_table_line.getParentValue().getStartDate(DateTime("2014/04/01"))\n
while start_date.Day() != day_of_week:\n while start_date.Day() != day_of_week:\n
start_date = addToDate(start_date, day=1)\n start_date = addToDate(start_date, day=1)\n
time_table_line.setStartDate(start_date)\n time_table_line.setStartDate(start_date)\n
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment