Skip to content

Commit e3ea989

Browse files
committed
Use rights for svg download
1 parent 0e08592 commit e3ea989

1 file changed

Lines changed: 1 addition & 3 deletions

File tree

  • truffe2/accounting_tools/templates/accounting_tools/invoice

truffe2/accounting_tools/templates/accounting_tools/invoice/show.html

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,8 @@
22
{% load i18n humanize rights_extras %}
33

44
{% block bonus_buttons %}
5-
{% if obj.status == '4_archived' or obj.status == '3_sent' or obj.status == '2_accord' %}
5+
{% ifhasright obj user 'DOWNLOAD_PDF' %}
66
<a href="{% url 'accounting_tools.views.invoice_qr' obj.pk %}{% trans "Facture" %} {{obj.title|urlencode}} - {{obj.get_reference}}.svg?{% if upk_noswitch %}&_upkns=_{% endif %}{% if from_related %}&_fromrelated=_{% endif %}" style="margin-left: 3px;" target="_blank" class="btn btn-warning"><i class="fa fa-download"></i> QR-Facture </a>
7-
{% endif %}
8-
{% if obj.status == '4_archived' or obj.status == '3_sent' or obj.status == '2_accord' %}
97
<a href="{% url 'accounting_tools.views.invoice_pdf' obj.pk %}{% trans "Facture" %} {{obj.title|urlencode}} - {{obj.get_reference}}.pdf?{% if upk_noswitch %}&_upkns=_{% endif %}{% if from_related %}&_fromrelated=_{% endif %}" style="margin-left: 3px;" target="_blank" class="btn btn-primary"><i class="fa fa-download"></i> PDF</a>
108
{% endifhasright %}
119
{% endblock %}

0 commit comments

Comments
 (0)