From c9fd498cb6a5987f9d94b8ebc4ef63d357df0382 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Krier?= Date: Mon, 11 Oct 2021 08:53:21 +0200 Subject: [PATCH] Fall-back to target default order issue10818 --- trytond/model/fields/one2many.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/trytond/model/fields/one2many.py b/trytond/model/fields/one2many.py index b21a983a30..b0826081f9 100644 --- a/trytond/model/fields/one2many.py +++ b/trytond/model/fields/one2many.py @@ -134,6 +134,8 @@ class One2Many(Field): order = [] if self.order: order += self.order + elif Target._order: + order += Target._order targets = [] for sub_ids in grouped_slice(ids): if field._type == 'reference':