Skip to content

Commit

Permalink
[FIX] adapt the fix 'partner trial balance: sort by partner name' to v15
Browse files Browse the repository at this point in the history
  • Loading branch information
alexis-via committed Oct 24, 2024
1 parent f356445 commit 6977e44
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion account_financial_report/report/trial_balance.py
Original file line number Diff line number Diff line change
Expand Up @@ -330,7 +330,10 @@ def _compute_partner_amount(
for acc_id, total_data in total_amount.items():
tmp_list = sorted(
total_data.items(),
key=lambda x: isinstance(x[1], dict) and x[1]["partner_name"] or x[0],
key=lambda x: not isinstance(x[0], str)
and isinstance(x[1], dict)
and x[1]["partner_name"]
or x[0],
)
total_amount[acc_id] = {}
for key, value in tmp_list:
Expand Down

0 comments on commit 6977e44

Please sign in to comment.