From 89bc2930df8316a30eb72dcaaad387b9f3b8da41 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Krier?= Date: Wed, 14 Jan 2026 00:35:13 +0100 Subject: [PATCH] Set DESC as index options instead of the expression --- trytond/trytond/model/modelsql.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/trytond/trytond/model/modelsql.py b/trytond/trytond/model/modelsql.py index dab7bfbacf..47241d3cab 100644 --- a/trytond/trytond/model/modelsql.py +++ b/trytond/trytond/model/modelsql.py @@ -369,8 +369,9 @@ class ModelSQL(ModelStorage): history_table, (Coalesce( history_table.write_date, - history_table.create_date).desc, + history_table.create_date), Index.Range()), + order='DESC', include=[ Column(history_table, '__id'), history_table.id]),