From 4fa978ef1fdb8d97ff20c2e84a448eb89dccd996 Mon Sep 17 00:00:00 2001 From: Raffael Meyer <14891507+barredterra@users.noreply.github.com> Date: Wed, 10 Jan 2024 06:02:01 +0100 Subject: [PATCH] test: fix wrong fieldname (#39270) --- .../doctype/purchase_invoice/test_purchase_invoice.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/erpnext/accounts/doctype/purchase_invoice/test_purchase_invoice.py b/erpnext/accounts/doctype/purchase_invoice/test_purchase_invoice.py index e41cec7eee..981add74a6 100644 --- a/erpnext/accounts/doctype/purchase_invoice/test_purchase_invoice.py +++ b/erpnext/accounts/doctype/purchase_invoice/test_purchase_invoice.py @@ -1227,11 +1227,11 @@ class TestPurchaseInvoice(FrappeTestCase, StockTestMixin): @change_settings("Accounts Settings", {"unlink_payment_on_cancellation_of_invoice": 1}) def test_gain_loss_with_advance_entry(self): - unlink_enabled = frappe.db.get_value( - "Accounts Settings", "Accounts Settings", "unlink_payment_on_cancel_of_invoice" + unlink_enabled = frappe.db.get_single_value( + "Accounts Settings", "unlink_payment_on_cancellation_of_invoice" ) - frappe.db.set_single_value("Accounts Settings", "unlink_payment_on_cancel_of_invoice", 1) + frappe.db.set_single_value("Accounts Settings", "unlink_payment_on_cancellation_of_invoice", 1) original_account = frappe.db.get_value("Company", "_Test Company", "exchange_gain_loss_account") frappe.db.set_value( @@ -1422,7 +1422,7 @@ class TestPurchaseInvoice(FrappeTestCase, StockTestMixin): pay.cancel() frappe.db.set_single_value( - "Accounts Settings", "unlink_payment_on_cancel_of_invoice", unlink_enabled + "Accounts Settings", "unlink_payment_on_cancellation_of_invoice", unlink_enabled ) frappe.db.set_value("Company", "_Test Company", "exchange_gain_loss_account", original_account)