Skip unrequested combination of account-party for balance
Same as rev bd55a6757068 but for the balance computation. issue9762 review308741002
This commit is contained in:
1 parent
277ccfc479
commit
a0574eae80
1 file changed
+6
-1
+6
-1
@@ -1341,7 +1341,12 @@ class AccountParty(ActivePeriodMixin, ModelSQL):
|
||||
where=account_sql & party_sql & line_query,
|
||||
group_by=[table_a.id, line.party]))
|
||||
for account_id, party_id, balance in cursor:
|
||||
id_ = account_party2id[(account_id, party_id)]
|
||||
try:
|
||||
id_ = account_party2id[(account_id, party_id)]
|
||||
except KeyError:
|
||||
# There can be more combinations of account-party in
|
||||
# the database than from records
|
||||
continue
|
||||
balances[id_] = balance
|
||||
|
||||
for record in records:
|
||||
|
||||
Reference in new issue
Block a user