From 9e63c14cef25f5b2806d26475539964a7d2da04e Mon Sep 17 00:00:00 2001 From: ruthra kumar Date: Mon, 2 Mar 2026 12:23:10 +0530 Subject: [PATCH] refactor(test): make sales invoice deterministic --- .../accounts/doctype/sales_invoice/test_sales_invoice.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/erpnext/accounts/doctype/sales_invoice/test_sales_invoice.py b/erpnext/accounts/doctype/sales_invoice/test_sales_invoice.py index 3c80934d753..2cb9c685203 100644 --- a/erpnext/accounts/doctype/sales_invoice/test_sales_invoice.py +++ b/erpnext/accounts/doctype/sales_invoice/test_sales_invoice.py @@ -261,6 +261,9 @@ class TestSalesInvoice(ERPNextTestSuite): si1.load_from_db() self.assertRaises(PaymentEntryUnlinkError, si1.cancel) + @ERPNextTestSuite.change_settings( + "Accounts Settings", {"allow_multi_currency_invoices_against_single_party_account": 1} + ) def test_sales_invoice_calculation_export_currency(self): si = frappe.copy_doc(self.globalTestRecords["Sales Invoice"][2]) si.currency = "USD" @@ -745,6 +748,9 @@ class TestSalesInvoice(ERPNextTestSuite): self.assertEqual(si.base_grand_total, 1622.97) self.assertEqual(si.grand_total, 1622.97) + @ERPNextTestSuite.change_settings( + "Accounts Settings", {"allow_multi_currency_invoices_against_single_party_account": 1} + ) def test_sales_invoice_calculation_export_currency_with_tax_inclusive_price(self): # prepare si = frappe.copy_doc(self.globalTestRecords["Sales Invoice"][3])