{% extends "admin/change_form.html" %}
{% load url from future %}
{% block object-tools-items %}
    {% if not original.validated %}
        <li><a href="{% url 'admin:invoice_validate' id=object_id %}">Valider la facture</a></li>
    {% elif original.is_pdf_exists %}
        <li><a href="{% url 'billing:invoice_pdf' id=object_id %}">Télécharger le PDF</a></li>
    {% endif %}
    {{ block.super }}
{% endblock %}
