From a091c2b8fc9654edf6e5417fbbc8adf91903eeb6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Krier?= Date: Wed, 25 Sep 2024 09:56:50 +0200 Subject: [PATCH] Order errors by descending id Usually it is the latest errors that are interesting for the user. --- trytond/trytond/ir/error.py | 1 + 1 file changed, 1 insertion(+) diff --git a/trytond/trytond/ir/error.py b/trytond/trytond/ir/error.py index 19e8f3c5b8..8b87d6163b 100644 --- a/trytond/trytond/ir/error.py +++ b/trytond/trytond/ir/error.py @@ -88,6 +88,7 @@ class Error(Workflow, ModelView, ModelSQL): table, (table.state, Index.Equality(cardinality='low')), where=table.state.in_(['open', 'processing']))) + cls._order = [('id', 'DESC')] cls._transitions |= { ('open', 'processing'), ('processing', 'solved'),