trytond-patches/issue12497.diff

14 lines
617 B
Diff

diff --git a/tryton/modules/purchase/purchase.py b/tryton/modules/purchase/purchase.py
index ae946a3d5c..faf35cecfa 100644
--- a/tryton/modules/purchase/purchase.py
+++ b/tryton/modules/purchase/purchase.py
@@ -424,7 +424,7 @@ class Purchase(
table.invoice_method,
where=(table.party == self.party.id)
& (table.invoice_party == invoice_party),
- order_by=table.id,
+ order_by=table.id.desc,
limit=10)
cursor.execute(*subquery.select(
subquery.currency,