diff --git a/issue3228.diff b/issue3228.diff new file mode 100644 index 0000000..78b4a5f --- /dev/null +++ b/issue3228.diff @@ -0,0 +1,15 @@ +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): diff --git a/series b/series index f043ab0..3e374e7 100644 --- a/series +++ b/series @@ -128,7 +128,7 @@ issue6371.diff # stock Do not set effective date on assignation 025476_5154_5155_5456_optimize_move_write_assign.diff # stock optimize move write assign filestore.diff stock_lot_check_moves_without_lot_before_lot_required.diff +issue3228.diff # [trytond] Fix result order of search_read # electr # issue6626_improve_performance_of_average_cost_price.diff -