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: account.move

Compute Method: _compute_l10n_fr_pdp_status

Inputs Method Outputs
today = fields.Date.context_today(self)
for move in self:
            if move.state == 'draft':
                move.l10n_fr_pdp_status = None
            elif not move.l10n_fr_pdp_flow_10_report_type:
                move.l10n_fr_pdp_status = 'out_of_scope'
            elif move.l10n_fr_pdp_has_error:
                move.l10n_fr_pdp_status = 'error'
            elif not move.l10n_fr_pdp_last_flow_id:
                move.l10n_fr_pdp_status = None
            elif move.l10n_fr_pdp_last_flow_id.period_end >= today:
                move.l10n_fr_pdp_status = 'pending'
            else:
                move.l10n_fr_pdp_status = move.l10n_fr_pdp_last_flow_id.state

Back to entity