From d5b8bba99a370efa78319ff9d20b382e91d31cae Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Krier?= Date: Tue, 5 Mar 2013 10:31:15 +0100 Subject: [PATCH] Use better order for existing translation when importing po file review701002 --- trytond/ir/translation.py | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/trytond/ir/translation.py b/trytond/ir/translation.py index 2d2acee422..74232826be 100644 --- a/trytond/ir/translation.py +++ b/trytond/ir/translation.py @@ -528,9 +528,13 @@ class Translation(ModelSQL, ModelView): id2translation = {} key2ids = {} module_translations = cls.search([ - ('lang', '=', lang), - ('module', '=', module), - ]) + ('lang', '=', lang), + ('module', '=', module), + ], + order=[ + ('type', 'DESC'), + ('name', 'DESC'), + ]) for translation in module_translations: if translation.type in ('odt', 'view', 'wizard_button', 'selection', 'error'):