Generalize email system with invoice workflow and Stiftungsgeschichte category
- Rename DestinataerEmailEingang → EmailEingang with category support (destinataer, rechnung, land_pacht, stiftungsgeschichte, allgemein) - Add invoice capture workflow: create Verwaltungskosten from email, link DMS documents as invoice attachments, track payment status - Add Stiftungsgeschichte email category with auto-detection patterns (Ahnenforschung, Genealogie, Chronik, etc.) and DMS integration - Update poll_emails task with category detection and DMS context mapping - Show available history documents in Geschichte editor sidebar - Consolidate DMS views, remove legacy dokument templates - Update all detail/form templates for DMS document linking - Add deploy.sh script and streamline compose.yml Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -972,6 +972,11 @@ class LandAbrechnung(models.Model):
|
||||
|
||||
|
||||
class DokumentLink(models.Model):
|
||||
"""
|
||||
DEPRECATED: Paperless-basierte Dokumentverknüpfung.
|
||||
Wird durch DokumentDatei (Django-natives DMS) ersetzt.
|
||||
Dieses Modell bleibt für historische Daten erhalten, wird aber nicht mehr aktiv genutzt.
|
||||
"""
|
||||
KONTEXT_CHOICES = [
|
||||
("pachtvertrag", "Pachtvertrag"),
|
||||
("antrag", "Antrag"),
|
||||
@@ -1020,18 +1025,6 @@ class DokumentLink(models.Model):
|
||||
def __str__(self):
|
||||
return f"{self.titel} ({self.get_kontext_display()})"
|
||||
|
||||
def get_paperless_url(self):
|
||||
"""Gibt die URL zum Dokument in Paperless zurück (über Django Redirect)"""
|
||||
return f"/api/paperless/documents/{self.paperless_document_id}/"
|
||||
|
||||
def get_paperless_thumbnail_url(self):
|
||||
"""Gibt die URL zum Thumbnail in Paperless zurück"""
|
||||
from django.conf import settings
|
||||
|
||||
if settings.PAPERLESS_API_URL:
|
||||
return f"{settings.PAPERLESS_API_URL}/api/documents/{self.paperless_document_id}/thumb/"
|
||||
return None
|
||||
|
||||
def get_verpachtung(self):
|
||||
"""Gibt die verknüpfte Verpachtung zurück"""
|
||||
if self.verpachtung_id:
|
||||
|
||||
Reference in New Issue
Block a user