From 16ca779bb90d502a853afb42bafc85ef4b8d593b Mon Sep 17 00:00:00 2001 From: Sergi Almacellas Abellana Date: Wed, 30 Jan 2019 11:58:25 +0100 Subject: [PATCH] Add default name ordering on referential models issue7971 review66501002 --- invoice.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/invoice.py b/invoice.py index 65ce382a15..97c0cc0fa9 100644 --- a/invoice.py +++ b/invoice.py @@ -2345,6 +2345,11 @@ class PaymentMethod(DeactivableMixin, ModelSQL, ModelView): ], depends=['company']) + @classmethod + def __setup__(cls): + super().__setup__() + cls._order.insert(0, ('name', 'ASC')) + @classmethod def default_company(cls): return Transaction().context.get('company')