{# Scoped, inline document preview (no /, no iframe). All rules are namespaced under `.pvdoc` so they don't leak into the surrounding dialog/page. The outer `.pvdoc-sheet` is fixed to the selected paper size (mirrors the full-page preview in external_layout.html). #} {% set accent = company.accent or '#1f2937' %} {% set secondary = company.secondary or accent %} {% set layout = company.layout or 'light' %} {% set sheet_pad = '0' if layout in ('split', 'folder', 'wave', 'bubble') else '16mm 12mm' %} {# Print-friendly ink — keep in sync with external_layout.html #} {% set ink = '#1a1a1a' %} {% set ink_muted = '#374151' %} {% set ink_faint = '#4b5563' %} {{ company.font_face_css }}
{# ---- SPLIT: two-column sidebar (matches external_layout.html) ---- #} {% 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 }}
{# ---- WAVE / BUBBLE: Odoo 19 shapes ---- #} {% elif layout == 'wave' %}
{% include '_wave_header.html' %}
{{ body }}
{% elif layout == 'bubble' %}
{% include '_bubble_header.html' %}
{{ body }}
{# ---- FOLDER: Odoo 19 tab header ---- #} {% elif layout == 'folder' %}
{% include '_folder_header.html' %}
{{ body }}
{% if company.copyright %} {% endif %}
{# ---- DARK: dark band at sheet top ---- #} {% elif layout == 'dark' %}
{{ company.name }}
INVOICE
{% if company.logo_url %} logo {% endif %}
{{ body }}
{% if company.copyright %} {% endif %}
{# ---- EDITORIAL: minimal breadcrumb header ---- #} {% elif layout == 'editorial' %}
{{ company.name }}
{% if company.logo_url %}{% endif %}
{{ body }}
{% if company.copyright %} {% endif %}
{# ---- LIGHT / BOXED / BOLD / STRIPED: standard header ---- #} {% else %}
{{ company.name }}
{% for line in company.address_lines %}{{ line }}
{% endfor %}
{% if company.logo_url %}{% endif %}
{{ body }}
{% if company.copyright %} {% endif %}
{% endif %}