{# Wraps a document body with the company header/footer. NOTE: rendered by wkhtmltopdf (old Qt WebKit) — avoid CSS custom properties (var()) and display:flex; the accent colour is injected by Jinja and layout uses tables. #} {% set accent = company.accent or '#1f2937' %} {% set secondary = company.secondary or accent %} {% set layout = company.layout or 'light' %} {# Print-friendly ink — slightly darker than Tailwind gray-500/900 defaults. #} {% set ink = '#1a1a1a' %} {% set ink_muted = '#374151' %} {% set ink_faint = '#4b5563' %} {{ title }} {# Chosen Google font embedded as TTF @font-face data URIs (works in wkhtmltopdf). #} {{ company.font_face_css }} {% if preview %}
{% endif %} {# ============================================================ SPLIT layout — two-column table; left sidebar = company info, right column = document body. No standard doc-header used. ============================================================ #} {% if layout == 'split' %}
{% if company.logo_url %} logo {% else %}
{{ company.name }}
{% endif %}
INVOICE
FROM
{{ company.name }}
{% for line in company.address_lines %}{{ line }}
{% endfor %}
{% if company.copyright %} {% endif %}
{{ body }}
{# ============================================================ FOLDER layout — Odoo 19 tab header + tinted band ============================================================ #} {% elif layout == 'folder' %}
{% include '_folder_header.html' %}
{{ body }}
{% if company.copyright %} {% endif %}
{# ============================================================ DARK layout — full-width dark band replaces standard header. ============================================================ #} {% elif layout == 'dark' %}
{{ company.name }}
INVOICE
{% if company.logo_url %} logo {% endif %}
{{ body }}
{% if company.copyright %} {% endif %}
{# ============================================================ All other layouts: light / boxed / bold / striped / editorial ============================================================ #} {% else %}
{% if layout == 'editorial' %}
{{ company.name }}
{% if company.logo_url %} {% endif %}
{% else %}
{{ company.name }}
{% for line in company.address_lines %}{{ line }}
{% endfor %}
{% if company.logo_url %} {% endif %}
{% endif %}
{{ body }}
{% if company.copyright %} {% endif %}
{% endif %}{# end layout switch #} {% if preview %}
{% endif %}