Test if party is set before using its record name for reconciliation error message

Closes #14127
(grafted from 2577aff9a26a61170862131e2dd0eec9e4ace563)

--HG--
branch : 6.0
This commit is contained in:
Cédric Krier committed 2025-07-30 15:12:15 +02:00
1 parent 93eb4d8333
commit 769bc0ad14
1 file changed
+2 -2
+2 -2
View File
@@ -588,8 +588,8 @@ class Reconciliation(ModelSQL, ModelView):
gettext('account'
'.msg_reconciliation_different_parties',
line=line.rec_name,
party1=line.party.rec_name,
party2=party.rec_name))
party1=line.party.rec_name if line.party else '',
party2=party.rec_name if party else ''))
if not reconciliation.company.currency.is_zero(debit - credit):
lang = Lang.get()
debit = lang.currency(debit, reconciliation.company.currency)