aeat.application.filing._complementaria module

Filing-amendment boundaries for application.filing.

This module builds local complementaria records from a submitted-filing shape such as domain.submission.ModeloPresentado. It loads the original domain.filing.ModeloDraft through the governed draft repository, verifies that the draft still matches the active registry snapshot, rebuilds an amended draft with application.filing.build_draft(), computes the domain.filing.CasillaChange delta, and persists the resulting domain.filing.ModeloComplementaria.

The read helpers expose the same governed amendment repository and may return either domain.filing.ModeloComplementaria or domain.filing.ModeloSustitutiva because the encrypted repository stores both amendment variants.

See also

domain.filing

Canonical amendment records, draft records, and governed repository ports used by this application boundary.

adapters.persistence.profile.filing_amendments.ModeloAmendmentRepository

AUDIT-classified encrypted persistence for complementaria and sustitutiva records.

application.modelo._amendment_actions

Separate work-unit amendment flow for externally evidenced modelo filing records.

build_complementaria(original, updated_inputs, *, schema_provider)[source]

Build, persist, and return the ModeloComplementaria for a submitted filing.

Return type:

ModeloComplementaria

Parameters:
load_amendment(amendment_id)[source]

Load a previously persisted amendment by id.

Returns a ModeloComplementaria or ModeloSustitutiva depending on the amendment kind.

Return type:

ModeloComplementaria | ModeloSustitutiva

Parameters:

amendment_id (str)

list_amendments(*, modelo=None)[source]

Return every persisted amendment, optionally filtered by modelo.

Each element is a ModeloSustitutiva or ModeloComplementaria depending on its amendment kind.

Return type:

tuple[ModeloComplementaria | ModeloSustitutiva, ...]

Parameters:

modelo (str | None)