Do not compute account party for general ledger line without party

Closes #12570
(grafted from d7fee1d3bf9107875d7ac7bd447b1e6e563c33aa)

--HG--
branch : 6.0
This commit is contained in:
Cédric Krier committed 2023-10-05 23:18:51 +02:00
1 parent b58bed8718
commit ac88e12308
1 file changed
+2
+2
View File
@@ -2236,6 +2236,8 @@ class GeneralLedgerLine(ModelSQL, ModelView):
account_ids, party_ids = set(), set()
for r in records:
account_parties[r.id] = None
if not r.party:
continue
account_party2ids[r.account.id, r.party.id].append(r.id)
account_ids.add(r.account.id)
party_ids.add(r.party.id)