[FIX] account_financial_report: Sort journal ledger by move_id

Without this sort, and using auto-sequence, the numbers of the journal
entries may appear unsorted on the journal ledger. Forcing at least this
minimum sorting, we assure the items are sorted.

TT38775
pull/916/head
Víctor Martínez 2022-09-05 10:34:24 +02:00
parent f2f19a80af
commit d6f7a66a1f
1 changed files with 4 additions and 1 deletions

View File

@ -84,7 +84,10 @@ class JournalLedgerReport(models.AbstractModel):
return [("display_type", "=", False), ("move_id", "in", move_ids)]
def _get_move_lines_order(self, move_ids, wizard, journal_ids):
return ""
"""Add `move_id` to make sure the order of the records is correct
(especially if we use auto-sequence).
"""
return "move_id"
def _get_move_lines_data(self, ml, wizard, ml_taxes, auto_sequence, exigible):
base_debit = (