From 8a3fdb4ec2d98e8f110663d410e8d2e567eaf124 Mon Sep 17 00:00:00 2001 From: Asmita Hase Date: Thu, 7 Aug 2025 17:31:36 +0530 Subject: [PATCH] fix: added a flag on journal entry to ignore party account type validation if required (cherry picked from commit 0665d13fd35c18d4b22843f6e963fed1e74c1309) --- erpnext/accounts/doctype/journal_entry/journal_entry.py | 1 + 1 file changed, 1 insertion(+) diff --git a/erpnext/accounts/doctype/journal_entry/journal_entry.py b/erpnext/accounts/doctype/journal_entry/journal_entry.py index 4341aef9a6a..0b8cefa48d8 100644 --- a/erpnext/accounts/doctype/journal_entry/journal_entry.py +++ b/erpnext/accounts/doctype/journal_entry/journal_entry.py @@ -552,6 +552,7 @@ class JournalEntry(AccountsController): elif ( d.party_type and frappe.db.get_value("Party Type", d.party_type, "account_type") != account_type + and (not self.flags.ignore_party_account_validation) ): frappe.throw( _("Row {0}: Account {1} and Party Type {2} have different account types").format(