fix(Bank Transaction): error in party matching should not block submitting (backport #44416) (#44573)

fix(Bank Transaction): error in party matching should not block submitting (#44416)

(cherry picked from commit 72256565bb)

Co-authored-by: Raffael Meyer <14891507+barredterra@users.noreply.github.com>
This commit is contained in:
mergify[bot]
2024-12-06 11:57:52 +01:00
committed by GitHub
parent 19b64496b1
commit ebc8bede7f

View File

@@ -156,6 +156,8 @@ class BankTransaction(StatusUpdater):
if self.party_type and self.party: if self.party_type and self.party:
return return
result = None
try:
result = AutoMatchParty( result = AutoMatchParty(
bank_party_account_number=self.bank_party_account_number, bank_party_account_number=self.bank_party_account_number,
bank_party_iban=self.bank_party_iban, bank_party_iban=self.bank_party_iban,
@@ -163,6 +165,8 @@ class BankTransaction(StatusUpdater):
description=self.description, description=self.description,
deposit=self.deposit, deposit=self.deposit,
).match() ).match()
except Exception:
frappe.log_error(title=_("Error in party matching for Bank Transaction {0}").format(self.name))
if result: if result:
party_type, party = result party_type, party = result