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

Module: France - E-Invoicing (Approved Platform)

Entity: l10n.fr.pdp.reports.flow

Compute Method: _compute_period_status

Inputs Method Outputs
"""Compute the current status of the reporting period."""
today = fields.Date.context_today(self)
for flow in self:
            if not flow.due_period_start or not flow.due_period_end:
                flow.period_status = False
            elif today < flow.due_period_start:
                flow.period_status = 'open'
            elif today <= flow.due_period_end:
                flow.period_status = 'grace'
            else:
                flow.period_status = 'closed'

Back to entity