{# Import wizard body — swapped via HTMX into #pv-import-wizard. #} {% if error %}
{{ error }}
{% endif %} {% if test_message %}{{ test_message }}
{% endif %} {% if step == 'upload' %}
Import records from an Excel file (.xlsx) or CSV. Column headers are
matched automatically to field names or labels. Related fields (Many2one)
accept a record ID or a matching name
— countries also accept the ISO code (e.g. US,
KE).
{{ filename }} — {{ total_rows }} row{{ 's' if total_rows != 1 else '' }} to import. Map each file column to a field, then test or import.
{% elif step == 'result' %}Import aborted
No records were saved. Fix every error below, then test or import again.
{% elif result.errors and import_had_success %}Import partially complete
Failed rows are downloading as Excel with an Error column. Fix them and import again.
{% elif result.errors %}Import failed
No records were imported. Failed rows are downloading as Excel with an Error column.
{% else %}Import complete
Line {{ err.line }}: {{ err.error }}
{% endfor %} {% if result.errors|length > 20 %}… and {{ result.errors|length - 20 }} more
{% endif %}{% endif %}