Revised the code in the transaction_sotre() view in the accounting application.
This commit is contained in:
parent
a30c937a4b
commit
2252e4cb98
@ -851,11 +851,7 @@ def transaction_store(request, txn_type, transaction=None):
|
|||||||
fill_transaction_from_form(transaction, form)
|
fill_transaction_from_form(transaction, form)
|
||||||
errors = {}
|
errors = {}
|
||||||
try:
|
try:
|
||||||
transaction.full_clean(exclude=[
|
transaction.full_clean(exclude=["sn", "created_by", "updated_by"])
|
||||||
"sn",
|
|
||||||
"created_by",
|
|
||||||
"updated_by",
|
|
||||||
])
|
|
||||||
except ValidationError as e:
|
except ValidationError as e:
|
||||||
errors = e.message_dict
|
errors = e.message_dict
|
||||||
records = {
|
records = {
|
||||||
@ -868,11 +864,7 @@ def transaction_store(request, txn_type, transaction=None):
|
|||||||
no = no + 1
|
no = no + 1
|
||||||
try:
|
try:
|
||||||
x.full_clean(exclude=[
|
x.full_clean(exclude=[
|
||||||
"sn",
|
"sn", "transaction", "account", "created_by", "updated_by",
|
||||||
"transaction",
|
|
||||||
"account",
|
|
||||||
"created_by",
|
|
||||||
"updated_by",
|
|
||||||
])
|
])
|
||||||
except ValidationError as e:
|
except ValidationError as e:
|
||||||
for key in e.message_dict:
|
for key in e.message_dict:
|
||||||
|
Loading…
Reference in New Issue
Block a user