Renamed the routes of the transactions.
This commit is contained in:
parent
e1e61869b7
commit
e59d8738fa
@ -152,13 +152,16 @@ class Transaction(models.Model):
|
||||
"""Returns the URL to view this transaction."""
|
||||
if self.is_cash_expense:
|
||||
return reverse(
|
||||
"accounting:transaction", args=("expense", self.sn))
|
||||
"accounting:transactions.view",
|
||||
args=("expense", self.sn))
|
||||
elif self.is_cash_income:
|
||||
return reverse(
|
||||
"accounting:transaction", args=("income", self.sn))
|
||||
"accounting:transactions.view",
|
||||
args=("income", self.sn))
|
||||
else:
|
||||
return reverse(
|
||||
"accounting:transaction", args=("transfer", self.sn))
|
||||
"accounting:transactions.view",
|
||||
args=("transfer", self.sn))
|
||||
|
||||
def __str__(self):
|
||||
"""Returns the string representation of this accounting
|
||||
|
@ -44,7 +44,7 @@ urlpatterns = [
|
||||
path("cash/<str:subject_code>/<str:period_spec>",
|
||||
views.CashReportView.as_view(), name="cash"),
|
||||
path("transactions/<txn-type:type>/<int:pk>",
|
||||
views.CashReportView.as_view(), name="transaction"),
|
||||
views.CashReportView.as_view(), name="transactions.view"),
|
||||
path("transactions/<txn-type:type>/<int:pk>/edit",
|
||||
views.CashReportView.as_view(), name="transaction.edit"),
|
||||
views.CashReportView.as_view(), name="transactions.edit"),
|
||||
]
|
||||
|
Loading…
Reference in New Issue
Block a user