Odoo Mindscape. Understand Odoo faster. Explore modules, fields, dependencies and version differences in one place instead of digging through the source code.

Module: Employees Shifts

Entity: hr.shift.planning.line

Compute Method: _compute_start_date

Inputs Method Outputs
for shift in self:
            local_tz = pytz.timezone(shift.template_id.tz or self.env.user.tz)
            shift.start_date = (
                pytz.utc.localize(shift.start_time)
                .astimezone(local_tz)
                .replace(tzinfo=None)
            )

Back to entity