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

Inputs Method Outputs
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]

Back to entity