From 49885f8eae8c95e1b319c4e48ca64005ffa5b93d Mon Sep 17 00:00:00 2001 From: venkat102 Date: Thu, 2 Jan 2025 17:27:34 +0530 Subject: [PATCH] fix: ignore party account validation while canceling the voucher --- erpnext/accounts/party.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/erpnext/accounts/party.py b/erpnext/accounts/party.py index 4a58bb50da4..22fa4b3b823 100644 --- a/erpnext/accounts/party.py +++ b/erpnext/accounts/party.py @@ -765,6 +765,9 @@ def validate_party_frozen_disabled(party_type, party_name): def validate_account_party_type(self): + if self.is_cancelled: + return + if self.party_type and self.party: account_type = frappe.get_cached_value("Account", self.account, "account_type") if account_type and (account_type not in ["Receivable", "Payable"]):