v4.1.0: DMS email documents, category-specific Nachweis linking, version system
Some checks failed
CI/CD Pipeline / test (push) Has been cancelled
CI/CD Pipeline / deploy (push) Has been cancelled
Code Quality / quality (push) Has been cancelled

- Save cover email body as DMS document with new 'email' context type
- Show email body separately from attachments in email detail view
- Add per-category DMS document assignment in quarterly confirmation
  (Studiennachweis, Einkommenssituation, Vermögenssituation)
- Add VERSION file and context processor for automatic version display
- Add MCP server, agent system, import/export, and new migrations
- Update compose files and production environment template

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
SysAdmin Agent
2026-03-15 18:48:52 +00:00
parent faeb7c1073
commit e0b377014c
49 changed files with 5913 additions and 55 deletions

View File

@@ -755,6 +755,38 @@ class VierteljahresNachweis(models.Model):
verbose_name="Beschreibung weitere Dokumente"
)
# DMS-Dokumente als Nachweise verknuepfen (aus dem allgemeinen DMS)
nachweis_dokumente = models.ManyToManyField(
"DokumentDatei",
blank=True,
related_name="quartalsnachweise",
verbose_name="Verknuepfte DMS-Dokumente",
help_text="Dokumente aus dem DMS, die als Nachweise fuer dieses Quartal dienen.",
)
# Kategorie-spezifische DMS-Verknuepfungen
studiennachweis_dms_dokument = models.ForeignKey(
"DokumentDatei",
on_delete=models.SET_NULL,
null=True, blank=True,
related_name="als_studiennachweis",
verbose_name="Studiennachweis (DMS-Dokument)",
)
einkommenssituation_dms_dokument = models.ForeignKey(
"DokumentDatei",
on_delete=models.SET_NULL,
null=True, blank=True,
related_name="als_einkommensnachweis",
verbose_name="Einkommenssituation (DMS-Dokument)",
)
vermogenssituation_dms_dokument = models.ForeignKey(
"DokumentDatei",
on_delete=models.SET_NULL,
null=True, blank=True,
related_name="als_vermoegensnachweis",
verbose_name="Vermoegenssituation (DMS-Dokument)",
)
# Review and approval
status = models.CharField(
max_length=20,
@@ -840,19 +872,27 @@ class VierteljahresNachweis(models.Model):
"""Check if all required documents/confirmations are provided"""
complete = True
# DMS-Dokumente (kategorie-spezifisch oder generisch) zaehlen als Nachweis
has_dms_studiennachweis = (
bool(self.studiennachweis_dms_dokument_id)
or self.nachweis_dokumente.filter(kontext="studiennachweis").exists()
)
# Check study proof (always required now)
complete &= self.studiennachweis_eingereicht and (
bool(self.studiennachweis_datei) or bool(self.studiennachweis_bemerkung)
bool(self.studiennachweis_datei) or bool(self.studiennachweis_bemerkung) or has_dms_studiennachweis
)
# Check income situation (either text or file)
# Check income situation (either text, file, or DMS document)
complete &= self.einkommenssituation_bestaetigt and (
bool(self.einkommenssituation_text) or bool(self.einkommenssituation_datei)
or bool(self.einkommenssituation_dms_dokument_id)
)
# Check asset situation (either text or file)
# Check asset situation (either text, file, or DMS document)
complete &= self.vermogenssituation_bestaetigt and (
bool(self.vermogenssituation_text) or bool(self.vermogenssituation_datei)
or bool(self.vermogenssituation_dms_dokument_id)
)
return complete
@@ -868,23 +908,30 @@ class VierteljahresNachweis(models.Model):
total_requirements = 2 # Income and assets always required
completed_requirements = 0
has_dms_studiennachweis = (
bool(self.studiennachweis_dms_dokument_id)
or self.nachweis_dokumente.filter(kontext="studiennachweis").exists()
)
# Study proof (if required)
if self.studiennachweis_erforderlich:
total_requirements += 1
if self.studiennachweis_eingereicht and (
bool(self.studiennachweis_datei) or bool(self.studiennachweis_bemerkung)
bool(self.studiennachweis_datei) or bool(self.studiennachweis_bemerkung) or has_dms_studiennachweis
):
completed_requirements += 1
# Income situation
if self.einkommenssituation_bestaetigt and (
bool(self.einkommenssituation_text) or bool(self.einkommenssituation_datei)
or bool(self.einkommenssituation_dms_dokument_id)
):
completed_requirements += 1
# Asset situation
if self.vermogenssituation_bestaetigt and (
bool(self.vermogenssituation_text) or bool(self.vermogenssituation_datei)
or bool(self.vermogenssituation_dms_dokument_id)
):
completed_requirements += 1