Fixed so that the URL in the transaction views uses the current transaction type specified in the URL rather than the type of the transaction itself in the accounting application.
This commit is contained in:
parent
6e49443b88
commit
20369e42cc
@ -71,7 +71,7 @@ First written: 2020/7/23
|
|||||||
<i class="fas fa-chevron-circle-left"></i>
|
<i class="fas fa-chevron-circle-left"></i>
|
||||||
{% trans "Back" context "Navigation|" as text %}{{ text|force_escape }}
|
{% trans "Back" context "Navigation|" as text %}{{ text|force_escape }}
|
||||||
</a>
|
</a>
|
||||||
<a class="btn btn-primary" role="button" href="{% url_keep_return "accounting:transactions.edit" item.type item %}">
|
<a class="btn btn-primary" role="button" href="{% url_keep_return "accounting:transactions.edit" transaction_type item %}">
|
||||||
<i class="fas fa-edit"></i>
|
<i class="fas fa-edit"></i>
|
||||||
{% trans "Edit" context "Navigation|" as text %}{{ text|force_escape }}
|
{% trans "Edit" context "Navigation|" as text %}{{ text|force_escape }}
|
||||||
</a>
|
</a>
|
||||||
|
@ -71,7 +71,7 @@ First written: 2020/7/23
|
|||||||
<i class="fas fa-chevron-circle-left"></i>
|
<i class="fas fa-chevron-circle-left"></i>
|
||||||
{% trans "Back" context "Navigation|" as text %}{{ text|force_escape }}
|
{% trans "Back" context "Navigation|" as text %}{{ text|force_escape }}
|
||||||
</a>
|
</a>
|
||||||
<a class="btn btn-primary" role="button" href="{% url_keep_return "accounting:transactions.edit" item.type item %}">
|
<a class="btn btn-primary" role="button" href="{% url_keep_return "accounting:transactions.edit" transaction_type item %}">
|
||||||
<i class="fas fa-edit"></i>
|
<i class="fas fa-edit"></i>
|
||||||
{% trans "Edit" context "Navigation|" as text %}{{ text|force_escape }}
|
{% trans "Edit" context "Navigation|" as text %}{{ text|force_escape }}
|
||||||
</a>
|
</a>
|
||||||
|
@ -71,7 +71,7 @@ First written: 2020/7/23
|
|||||||
<i class="fas fa-chevron-circle-left"></i>
|
<i class="fas fa-chevron-circle-left"></i>
|
||||||
{% trans "Back" context "Navigation|" as text %}{{ text|force_escape }}
|
{% trans "Back" context "Navigation|" as text %}{{ text|force_escape }}
|
||||||
</a>
|
</a>
|
||||||
<a class="btn btn-primary" role="button" href="{% url_keep_return "accounting:transactions.edit" item.type item %}">
|
<a class="btn btn-primary" role="button" href="{% url_keep_return "accounting:transactions.edit" transaction_type item %}">
|
||||||
<i class="fas fa-edit"></i>
|
<i class="fas fa-edit"></i>
|
||||||
{% trans "Edit" context "Navigation|" as text %}{{ text|force_escape }}
|
{% trans "Edit" context "Navigation|" as text %}{{ text|force_escape }}
|
||||||
</a>
|
</a>
|
||||||
|
@ -855,6 +855,8 @@ def transaction_show(request, type, transaction):
|
|||||||
Returns:
|
Returns:
|
||||||
HttpResponse: The response.
|
HttpResponse: The response.
|
||||||
"""
|
"""
|
||||||
|
print(dir(request))
|
||||||
return render(request, F"accounting/transactions/{type}/show.html", {
|
return render(request, F"accounting/transactions/{type}/show.html", {
|
||||||
|
"transaction_type": type,
|
||||||
"item": transaction,
|
"item": transaction,
|
||||||
})
|
})
|
||||||
|
Loading…
Reference in New Issue
Block a user