Moved the "accounting.transaction.template_globals" module to "accounting.template_globals", for the two template globals will be used in the reports beside the transaction management.

This commit is contained in:
2023-03-04 07:06:03 +08:00
parent cff3d1b6bd
commit 3ab4eacf9f
10 changed files with 13 additions and 11 deletions

View File

@ -62,6 +62,12 @@ def init_app(app: Flask, user_utils: AbstractUserUtils,
bp.add_app_template_filter(format_amount, "accounting_format_amount")
bp.add_app_template_filter(format_date, "accounting_format_date")
from .template_globals import currency_options, default_currency_code
bp.add_app_template_global(currency_options,
"accounting_currency_options")
bp.add_app_template_global(default_currency_code,
"accounting_default_currency_code")
from . import locale
locale.init_app(app, bp)