issue12570.diff [account] Do not compute account party for general ledger line without party

#162240
This commit is contained in:
Raimon Esteve 2023-10-16 07:33:15 +02:00
parent c4c2c7ab4e
commit 344d6aaddb
2 changed files with 15 additions and 0 deletions

13
issue12570.diff Normal file
View File

@ -0,0 +1,13 @@
diff --git a/tryton/modules/account/account.py b/tryton/modules/account/account.py
index 41c591f51a..f6f6a97409 100644
--- a/tryton/modules/account/account.py
+++ b/tryton/modules/account/account.py
@@ -2472,6 +2472,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)

2
series
View File

@ -57,3 +57,5 @@ issue12576.diff # [account_stock_eu] Could not find the intrastat countries for
issue7677.diff # [trytond] Do not set rec_name for unsaved record
issue7672.diff # [stock] Always fill product and template of cost price revision
issue12570.diff # [account] Do not compute account party for general ledger line without party