aeat.application.modelo._revision_replay_inputs module¶
Build filing replay inputs from a persisted calculation revision.
revision_filing_replay_inputs() converts a filed or verified
CalculationRevision plus its
WorkUnit into the flat Modelo-input map
the filing runtime accepts. Stored operator inputs, binding overrides, and
relation overrides are replayed directly; calculated informational casillas are
recovered from the RegistrySnapshot
only when the snapshot is still loadable. When a workflow
TaxpayerProfile is available, profile applicability can also synthesize
explicit zeroes for relation slots whose source modelo is
ApplicabilityVerdict
NOT_APPLICABLE.
This is not a recalculation path. It rehydrates the persisted replay surface the
filing renderer needs: manual casilla inputs, binding channels, relation values,
calculated informational casillas, and Modelo 349 detail-row bindings.
Source-mesh row binding values are replayed as nested
binding_id -> row-index -> scalar maps so repeating-record coordinates
survive draft/export replay without synthetic binding ids.
- revision_filing_replay_inputs(*, revision, work_unit, workflow_profile=None)[source]¶
Return replayable filing inputs for one
CalculationRevision.The returned flat map is ordered by merge precedence: calculated informational casillas first, persisted manual casillas and binding overrides, Modelo 349 detail-row bindings, synthesized not-applicable relation zeroes, and finally persisted relation overrides. A stored relation override therefore always wins over a synthesized zero.
See also
TaxpayerProfilefor the optional profile applicability context used by relation-zero synthesis. No engine formulas are rerun here.- Return type:
TypeAliasType- Parameters:
revision (CalculationRevision)
work_unit (WorkUnit)
workflow_profile (TaxpayerProfile | None)