fix: ignore crm deal in tax_rule search filter (backport #45134) (#45138)

fix: ignore crm deal in tax_rule search filter (#45134)

(cherry picked from commit dc5bff9008)

Co-authored-by: Venkatesh <47534423+venkat102@users.noreply.github.com>
This commit is contained in:
mergify[bot]
2025-01-17 17:01:28 +05:30
committed by GitHub
parent dd58e4cb53
commit afab5be63f

View File

@@ -676,7 +676,7 @@ def set_taxes(
):
from erpnext.accounts.doctype.tax_rule.tax_rule import get_party_details, get_tax_template
args = {party_type.lower(): party, "company": company}
args = {frappe.scrub(party_type): party, "company": company}
if tax_category:
args["tax_category"] = tax_category
@@ -696,10 +696,10 @@ def set_taxes(
else:
args.update(get_party_details(party, party_type))
if party_type in ("Customer", "Lead", "Prospect"):
if party_type in ("Customer", "Lead", "Prospect", "CRM Deal"):
args.update({"tax_type": "Sales"})
if party_type in ["Lead", "Prospect"]:
if party_type in ["Lead", "Prospect", "CRM Deal"]:
args["customer"] = None
del args[frappe.scrub(party_type)]
else: