aeat.application.user_profile._completeness module

Conditional completeness rules for profile-level filing readiness.

conditional_profile_required_paths(values)[source]

Return profile paths conditionally required by declared taxpayer facts.

Static schema-required fields are handled by the schema validator and the compiled profile-key registry. This helper owns cross-field completeness: IRNR non-residents must declare their fiscal residence country, and non-EU/EEA IRNR residents must also declare both fiscal representative fields before any filing/modelo work can treat the profile as ready.

Return type:

tuple[str, ...]

Parameters:

values (Mapping[str, object])

conditional_profile_missing_required(values)[source]

Return conditionally required profile paths absent from values.

Return type:

tuple[str, ...]

Parameters:

values (Mapping[str, object])

iva_regime_required(values)[source]

Return whether the profile needs an explicit IVA regime fact.

Legal entities and attribution entities keep the existing IVA-regime requirement. A natural-person profile only needs the IVA regime when it declares economic-activity income; a salaried-only, pensioner, or pure-landlord profile must not be forced into GENERAL just to pass profile persistence.

Return type:

bool

Parameters:

values (Mapping[str, object])