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

Module: Lunch

Entity: lunch.supplier

Compute Method: _compute_available_today

View 17.0 View 18.0
Inputs Method Outputs
  • tz
now = fields.Datetime.now().replace(tzinfo=pytz.UTC)
for supplier in self:
-             now = now.astimezone(pytz.timezone(supplier.tz))
- 
-             supplier.available_today = supplier._available_on_date(now)
+             supplier_date = now.astimezone(pytz.timezone(supplier.tz))
+             supplier.available_today = supplier._available_on_date(supplier_date)
  • available_today

Back to entity