fix: set status on submit/cancel
This commit is contained in:
@@ -19,11 +19,11 @@ class PeriodClosingVoucher(AccountsController):
|
||||
self.validate_posting_date()
|
||||
|
||||
def on_submit(self):
|
||||
self.gle_processing_status = "In Progress"
|
||||
self.db_set("gle_processing_status", "In Progress")
|
||||
self.make_gl_entries()
|
||||
|
||||
def on_cancel(self):
|
||||
self.gle_processing_status = "In Progress"
|
||||
self.db_set("gle_processing_status", "In Progress")
|
||||
self.ignore_linked_doctypes = ("GL Entry", "Stock Ledger Entry")
|
||||
gle_count = frappe.db.count(
|
||||
"GL Entry",
|
||||
|
||||
@@ -59,7 +59,8 @@ class TestPeriodClosingVoucher(unittest.TestCase):
|
||||
""",
|
||||
(pcv.name),
|
||||
)
|
||||
self.assetEqual(pcv.gle_processing_status, "Completed")
|
||||
pcv.reload()
|
||||
self.assertEqual(pcv.gle_processing_status, "Completed")
|
||||
self.assertEqual(pcv_gle, expected_gle)
|
||||
|
||||
def test_cost_center_wise_posting(self):
|
||||
|
||||
Reference in New Issue
Block a user