fix: add validate to allow equity account and party_type shareholder

(cherry picked from commit 2c8e3f3409)
This commit is contained in:
rethik
2025-02-03 19:22:37 +05:30
committed by Mergify
parent 7ab69cfe5f
commit bb3eb81170

View File

@@ -765,7 +765,11 @@ def validate_account_party_type(self):
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"]):
if (
account_type
and (account_type not in ["Receivable", "Payable", "Equity"])
and self.party_type != "Shareholder"
):
frappe.throw(
_(
"Party Type and Party can only be set for Receivable / Payable account<br><br>" "{0}"