From 9a9f71534962abbee82d18af3eb1149f13139114 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=BE=9D=E7=91=AA=E8=B2=93?= Date: Thu, 6 Aug 2020 15:46:43 +0800 Subject: [PATCH] Fixed and set the txn_type to the form in the make_txn_form_from_model() utility in the accounting application. --- accounting/utils.py | 1 + 1 file changed, 1 insertion(+) diff --git a/accounting/utils.py b/accounting/utils.py index 8af6a17..53f683f 100644 --- a/accounting/utils.py +++ b/accounting/utils.py @@ -498,6 +498,7 @@ def make_txn_form_from_model(txn_type, txn): {x: str(getattr(txn, x)) for x in ["date", "notes"] if getattr(txn, x) is not None}) form.transaction = txn if txn.pk is not None else None + form.txn_type = txn_type records = [] if txn_type != "income": records = records + txn.debit_records