changeset d50e0560d168 in modules/account:default
details: https://hg.tryton.org/modules/account?cmd=changeset;node=d50e0560d168
description:
        Add default name ordering on referential models

        issue7971
        review66501002
diffstat:

 move.py |  5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)

diffs (15 lines):

diff -r a20e0e48064a -r d50e0560d168 move.py
--- a/move.py   Wed Jan 30 09:43:12 2019 +0100
+++ b/move.py   Wed Jan 30 11:58:09 2019 +0100
@@ -1253,6 +1253,11 @@
         depends=['company'])
 
     @classmethod
+    def __setup__(cls):
+        super().__setup__()
+        cls._order.insert(0, ('name', 'ASC'))
+
+    @classmethod
     def default_company(cls):
         return Transaction().context.get('company')
 

Reply via email to