2
0

Merge PR #1840 into 16.0

Signed-off-by yajo
This commit is contained in:
OCA-git-bot 2024-03-26 07:53:58 +00:00
commit e0c1eb2025

View File

@ -61,7 +61,9 @@ class AccountMove(models.Model):
# Cache all the new numbers to avoid wasting recomputations, caused by # Cache all the new numbers to avoid wasting recomputations, caused by
# searches done by _next() in the loop below # searches done by _next() in the loop below
chosen_map = {} chosen_map = {}
for move in chosen.sorted(lambda one: (one.date, one.name, one.id)): for move in chosen.sorted(
lambda one: (one.date or "", one.name or "", one.id or 0)
):
chosen_map[move.id] = move.journal_id.entry_number_sequence_id._next( chosen_map[move.id] = move.journal_id.entry_number_sequence_id._next(
move.date move.date
) )