diff --git a/src/accounting/account/views.py b/src/accounting/account/views.py index e2fd9b0..cb0aad2 100644 --- a/src/accounting/account/views.py +++ b/src/accounting/account/views.py @@ -169,7 +169,7 @@ def delete_account(account: Account) -> redirect: @bp.get("/bases/", endpoint="order") -@has_permission(can_edit) +@has_permission(can_view) def show_account_order(base: BaseAccount) -> str: """Shows the order of the accounts under a same base account. diff --git a/src/accounting/templates/accounting/account/detail.html b/src/accounting/templates/accounting/account/detail.html index d6ffcec..99b79fe 100644 --- a/src/accounting/templates/accounting/account/detail.html +++ b/src/accounting/templates/accounting/account/detail.html @@ -35,10 +35,12 @@ First written: 2023/1/31 {{ A_("Settings") }} - - - {{ A_("Order") }} - + {% endif %} + + + {{ A_("Order") }} + + {% if can_edit_accounting() %} -{% elif base.accounts|length == 1 %} +{% elif base.accounts %} {% else %}

{{ A_("There is no data.") }}