16 lines
680 B
Diff
16 lines
680 B
Diff
|
diff -r d26dc1c880e8 trytond/trytond/model/modelstorage.py
|
||
|
--- a/trytond/trytond/model/modelstorage.py Thu May 17 15:09:58 2018 +0200
|
||
|
+++ b/trytond/trytond/model/modelstorage.py Thu May 17 15:11:38 2018 +0200
|
||
|
@@ -369,7 +369,10 @@
|
||
|
fields_names = cls._fields.keys()
|
||
|
if 'id' not in fields_names:
|
||
|
fields_names.append('id')
|
||
|
- return cls.read(map(int, records), fields_names)
|
||
|
+ rows = cls.read(map(int, records), fields_names)
|
||
|
+ index = {r.id: i for i, r in enumerate(records)}
|
||
|
+ rows.sort(key=lambda r: index[r['id']])
|
||
|
+ return rows
|
||
|
|
||
|
@classmethod
|
||
|
def _search_domain_active(cls, domain, active_test=True):
|