diff --git a/accounting/templates/accounting/account_list.html b/accounting/templates/accounting/account_list.html index a45356c..fe647b0 100644 --- a/accounting/templates/accounting/account_list.html +++ b/accounting/templates/accounting/account_list.html @@ -45,7 +45,7 @@ First written: 2020/7/1 {% endwith %} -{% if object_list %} +{% if account_list %} @@ -55,19 +55,19 @@ First written: 2020/7/1 - {% for object in object_list %} - - + {% for account in account_list %} + +
{{ object.code }}
{{ account.code }} - {{ object.title }} - {% if object.is_parent_and_in_use %} + {{ account.title }} + {% if account.is_parent_and_in_use %} {{ _("Parent Account In Use")|force_escape }} {% endif %} - + {{ _("View")|force_escape }} diff --git a/accounting/views.py b/accounting/views.py index 43d8e15..030b050 100644 --- a/accounting/views.py +++ b/accounting/views.py @@ -1042,6 +1042,7 @@ def txn_sort(request, date): class AccountListView(ListView): """The view to list the accounts.""" queryset = Account.objects.order_by("code") + context_object_name = "account_list" @require_GET