Minor fix

This commit is contained in:
oscar alvarez 2022-05-03 09:34:29 -05:00
parent 0574f469c7
commit 5e9fee2413
1 changed files with 5 additions and 4 deletions

View File

@ -1,6 +1,7 @@
# This file is part of Tryton. The COPYRIGHT file at the top level of
# this repository contains the full copyright notices and license terms.
import datetime
from datetime import datetime, timedelta, time
from trytond.model import Workflow, ModelView, ModelSQL, fields
from trytond.wizard import Wizard, StateView, Button, StateTransition
from trytond.pyson import Eval
@ -159,11 +160,11 @@ class AddShift(Wizard):
if ids:
shift = Shift(ids[0])
lines_to_create = []
enter_hour_tz = datetime.time(
enter_hour_tz = time(
self.start.enter_hour.hour + 5,
self.start.enter_hour.minute)
enter_ = datetime.datetime.combine(shift.shift_date, enter_hour_tz)
exit_ = enter_ + datetime.timedelta(0, self.start.timework * 3600)
enter_ = datetime.combine(shift.shift_date, enter_hour_tz)
exit_ = enter_ + timedelta(0, self.start.timework * 3600)
for e in self.start.employees:
lines_to_create.append({
'employee': e.id,