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

Module: Field Service

Entity: fsm.order

Compute Method: _compute_date_today_order_tz

Inputs Method Outputs
tz = pytz.timezone(self.env.user.tz or "UTC")
for rec in self:
            if rec.scheduled_date_start:
                dt_user = rec.scheduled_date_start.astimezone(tz)
                rec.date_today_order_tz = dt_user.date()
            else:
                rec.date_today_order_tz = False

Back to entity