diff --git a/trytond/ir/attachment.py b/trytond/ir/attachment.py index a2f617a510..c9f92a100c 100644 --- a/trytond/ir/attachment.py +++ b/trytond/ir/attachment.py @@ -51,6 +51,11 @@ class Attachment(ResourceMixin, ModelSQL, ModelView): 'invisible': Eval('type') != 'data', }, depends=['type']), 'get_size') + @classmethod + def __setup__(cls): + super().__setup__() + cls._order.insert(0, ('create_date', 'DESC')) + @classmethod def __register__(cls, module_name): cursor = Transaction().connection.cursor() diff --git a/trytond/ir/view/attachment_form.xml b/trytond/ir/view/attachment_form.xml index 0e8f8794f0..0a14e6e46f 100644 --- a/trytond/ir/view/attachment_form.xml +++ b/trytond/ir/view/attachment_form.xml @@ -6,9 +6,11 @@ this repository contains the full copyright notices and license terms. -->