|
@ -103,6 +103,7 @@ class TaskTemplate(models.Model): |
|
|
day = today + timedelta(days=rec.day_nb_id.number - 1) |
|
|
day = today + timedelta(days=rec.day_nb_id.number - 1) |
|
|
h_begin, m_begin = floatime_to_hour_minute(rec.start_time) |
|
|
h_begin, m_begin = floatime_to_hour_minute(rec.start_time) |
|
|
h_end, m_end = floatime_to_hour_minute(rec.end_time) |
|
|
h_end, m_end = floatime_to_hour_minute(rec.end_time) |
|
|
|
|
|
day = day.replace(hour=h_begin, minute=m_begin) |
|
|
rec.start_date = fields.Datetime.context_timestamp(self, day).replace(hour=h_begin, minute=m_begin, second=0).astimezone(UTC) |
|
|
rec.start_date = fields.Datetime.context_timestamp(self, day).replace(hour=h_begin, minute=m_begin, second=0).astimezone(UTC) |
|
|
rec.end_date = fields.Datetime.context_timestamp(self, day).replace(hour=h_end, minute=m_end, second=0).astimezone(UTC) |
|
|
rec.end_date = fields.Datetime.context_timestamp(self, day).replace(hour=h_end, minute=m_end, second=0).astimezone(UTC) |
|
|
|
|
|
|
|
@ -162,4 +163,4 @@ class TaskTemplate(models.Model): |
|
|
'stage_id': self.env.ref('beesdoo_shift.open').id, |
|
|
'stage_id': self.env.ref('beesdoo_shift.open').id, |
|
|
}) |
|
|
}) |
|
|
|
|
|
|
|
|
return tasks |
|
|
|
|
|
|
|
|
return tasks |