Invoice address: Make Peppol required in Belgium if available (Z#23220397) (#5808)

* Invoice address: Make Peppol required in Belgium if available (Z#23220397)

* Fix failing test, remove template bit that's now impossible
This commit is contained in:
Raphael Michel
2026-01-26 09:52:06 +01:00
committed by GitHub
parent 5e97f668a5
commit c84bd4046d
7 changed files with 21 additions and 18 deletions

View File

@@ -191,7 +191,7 @@ class InvoiceAddressSerializer(I18nAwareModelSerializer):
{"transmission_info": {r: "This field is required for the selected type of invoice transmission."}}
)
break # do not call else branch of for loop
elif t.exclusive:
elif t.is_exclusive(self.context["request"].event, data.get("country"), data.get("is_business")):
if t.is_available(self.context["request"].event, data.get("country"), data.get("is_business")):
raise ValidationError({
"transmission_type": "The transmission type '%s' must be used for this country or address type." % (