From 77693b12a4497364ea46c0c5112cdf2031fabe36 Mon Sep 17 00:00:00 2001 From: Smit Vora Date: Tue, 3 Feb 2026 16:30:05 +0530 Subject: [PATCH] test: revert original pcv setting (cherry picked from commit f45a5a63a7dd8dc27f3162faba35456743960241) --- .../test_financial_report_engine.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/erpnext/accounts/doctype/financial_report_template/test_financial_report_engine.py b/erpnext/accounts/doctype/financial_report_template/test_financial_report_engine.py index f70bf3938f9..696da7785c9 100644 --- a/erpnext/accounts/doctype/financial_report_template/test_financial_report_engine.py +++ b/erpnext/accounts/doctype/financial_report_template/test_financial_report_engine.py @@ -1794,6 +1794,9 @@ class TestFinancialQueryBuilder(FinancialReportTemplateTestCase): pcv = None jv_2024 = None + original_pcv_setting = frappe.db.get_single_value( + "Accounts Settings", "use_legacy_controller_for_pcv" + ) try: # Create Period Closing Voucher for 2023 @@ -1938,6 +1941,10 @@ class TestFinancialQueryBuilder(FinancialReportTemplateTestCase): finally: # Clean up + frappe.db.set_single_value( + "Accounts Settings", "use_legacy_controller_for_pcv", original_pcv_setting or 0 + ) + if jv_2024: jv_2024.cancel()