diff --git a/accounting/models.py b/accounting/models.py index c9e606c..018787b 100644 --- a/accounting/models.py +++ b/accounting/models.py @@ -156,13 +156,13 @@ class Transaction(DirtyFieldsMixin, models.Model): """Returns the URL to view this transaction.""" if self.is_cash_expense: return reverse( - "accounting:transactions.show", args=("expense", self)) + "accounting:transactions.detail", args=("expense", self)) elif self.is_cash_income: return reverse( - "accounting:transactions.show", args=("income", self)) + "accounting:transactions.detail", args=("income", self)) else: return reverse( - "accounting:transactions.show", args=("transfer", self)) + "accounting:transactions.detail", args=("transfer", self)) def is_dirty(self, **kwargs): """Returns whether the data of this transaction is changed and need diff --git a/accounting/templates/accounting/cash.html b/accounting/templates/accounting/cash.html index 33d40b6..410a7c7 100644 --- a/accounting/templates/accounting/cash.html +++ b/accounting/templates/accounting/cash.html @@ -122,7 +122,7 @@ First written: 2020/7/1 {{ record.balance|accounting_amount }} {% if record.pk is not None %} - + {{ _("View")|force_escape }} @@ -138,7 +138,7 @@ First written: 2020/7/1 {% for record in record_list %}
  • {% if record.pk is not None %} - + diff --git a/accounting/templates/accounting/journal.html b/accounting/templates/accounting/journal.html index 975002b..875e69a 100644 --- a/accounting/templates/accounting/journal.html +++ b/accounting/templates/accounting/journal.html @@ -102,7 +102,7 @@ First written: 2020/7/17 {{ record.transaction.note|default:"" }} {% if record.pk is not None %} - + {{ _("View")|force_escape }} @@ -118,7 +118,7 @@ First written: 2020/7/17 {% for record in record_list %}
  • {% if record.pk is not None %} - +
  • {% if record.pk is not None %} - + diff --git a/accounting/templates/accounting/search.html b/accounting/templates/accounting/search.html index 75ef228..c8c36ae 100644 --- a/accounting/templates/accounting/search.html +++ b/accounting/templates/accounting/search.html @@ -100,7 +100,7 @@ First written: 2020/7/21 {{ record.credit_amount|accounting_amount }} {{ record.transaction.notes|default:"" }} - + {{ _("View")|force_escape }} @@ -114,7 +114,7 @@ First written: 2020/7/21