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

Compute Method: _compute_is_new

Inputs Method Outputs
today = fields.Date.context_today(self)
for product in self:
            if product.new_until:
                product.is_new = today <= product.new_until
            else:
                product.is_new = False

Back to entity