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.peppol.response

Compute Method: _compute_pdp_ppf_state

Inputs Method Outputs
  • move_id
  • move_id.peppol_response_ids
  • peppol_message_uuid
for response in self:
            lifecycles = response.move_id.peppol_response_ids.filtered(
                lambda r: r.pdp_flow_number == '6' and r.pdp_ref_uuid == response.peppol_message_uuid
            )
            states = set(lifecycles.mapped('response_code'))
            result = False
            if {'refused', 'RE'} & states:
                result = 'error'
            elif lifecycles:
                result = 'received'
            response.pdp_ppf_state = result

Back to entity