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

@@ -666,6 +666,7 @@ func seedViews(ctx context.Context, tx pgx.Tx) {
<header>
<button name="action_post" string="Post" type="object" class="btn-primary" invisible="state != ''draft''"/>
<button name="action_register_payment" string="Register Payment" type="object" class="btn-primary" invisible="state != ''posted'' or payment_state == ''paid''"/>
<button name="action_invoice_print" string="Print" type="object" class="btn-secondary"/>
<button name="button_cancel" string="Cancel" type="object" invisible="state != ''draft''"/>
<button name="button_draft" string="Reset to Draft" type="object" invisible="state != ''cancel''"/>
<field name="state" widget="statusbar" clickable="1"/>