PDF invoice reports + SMTP email sending

PDF Reports:
- Professional invoice HTML renderer (company header, partner address,
  styled line items, totals, Odoo-purple branding, A4 @page CSS)
- wkhtmltopdf installed in Docker runtime stage for real PDF generation
- Print button on invoice form (opens PDF in new tab)
- Exported HtmlToPDF/RenderInvoiceHTML for cross-package use

SMTP Email:
- SendEmail + SendEmailWithAttachments with MIME multipart support
- Base64 file attachments
- Config via ODOO_SMTP_HOST/PORT/USER/PASSWORD/FROM env vars
- LoadSMTPConfig helper, nil auth for relay servers

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
Marc
2026-04-04 13:58:19 +02:00
parent cc6184a18b
commit 2c7c1e6c88
6 changed files with 336 additions and 12 deletions

View File

@@ -8,6 +8,7 @@ COPY . .
RUN CGO_ENABLED=0 go build -o /odoo-server ./cmd/odoo-server
FROM debian:bookworm-slim
RUN apt-get update && apt-get install -y --no-install-recommends wkhtmltopdf && rm -rf /var/lib/apt/lists/*
RUN useradd -m -s /bin/bash odoo
COPY --from=builder /odoo-server /usr/local/bin/odoo-server
COPY --from=builder /build/frontend /app/frontend