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

View 17.0
Inputs Method Outputs
  • scheduled_date_start
- 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
  • date_today_order_tz

Back to entity