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.alert

Compute Method: _compute_available_today

View 17.0 View 19.0
Inputs Method Outputs
  • until
today = fields.Date.context_today(self)
fieldname = WEEKDAY_TO_NAME[today.weekday()]
for alert in self:
-             alert.available_today = alert.until > today if alert.until else True and alert[fieldname]
+             alert.available_today = (alert.until > today if alert.until else True) and alert[fieldname]
  • available_today

Back to entity