Moved the make_txn_form_from_model utility to the from_model method in the TransactionForm in the accounting application.
This commit is contained in:
@ -827,7 +827,7 @@ class TransactionFormView(FormView):
|
||||
|
||||
def make_form_from_model(self, obj: Transaction) -> TransactionForm:
|
||||
"""Creates and returns the form from a data model."""
|
||||
return utils.make_txn_form_from_model(self.txn_type, obj)
|
||||
return TransactionForm.from_model(obj, self.txn_type)
|
||||
|
||||
def fill_model_from_form(self, obj: Transaction,
|
||||
form: TransactionForm) -> None:
|
||||
|
Reference in New Issue
Block a user