Please review this at http://codereview.appspot.com/2450043/
Affected files:
M trytond/ir/translation.py
Index: trytond/ir/translation.py
===================================================================
--- a/trytond/ir/translation.py
+++ b/trytond/ir/translation.py
@@ -510,17 +510,13 @@
buf = StringIO.StringIO()
writer = csv.writer(buf, 'TRYTON')
writer.writerow(HEADER)
+ rows = []
with Transaction().set_context(language='en_US'):
translation_ids = self.search([
('lang', '=', lang),
('module', '=', module),
- ], order=[
- ('type', 'ASC'),
- ('name', 'ASC'),
- ('src', 'ASC'),
- ('res_id', 'ASC'),
- ])
+ ], order=[])
for translation in self.browse(translation_ids):
row = []
for field in HEADER:
@@ -540,7 +536,10 @@
value = value.encode('utf-8')
row.append(value)
if len(row) == len(HEADER):
- writer.writerow(row)
+ rows.append(row)
+
+ rows.sort()
+ writer.writerows(rows)
file_data = buf.getvalue()
buf.close()
--
Cédric Krier
B2CK SPRL
Rue de Rotterdam, 4
4000 Liège
Belgium
Tel: +32 472 54 46 59
Email/Jabber: [email protected]
Website: http://www.b2ck.com/
pgpgIDx0QCTeM.pgp
Description: PGP signature
