copy does not guarantee the order of returned records matches the order of the supplied ones
ModelStorage.copy() method does not guarantee that the order of the records returned matches the order of the records supplied to the copy() method.
This is because the method returns a browse of a dictionary.values(), which is unordered [1]:
http://hg.tryton.org/trytond/file/tip/trytond/model/modelstorage.py#l365
That could be replaced with an OrderedDict.
Althought the documentation does not explicitly state that records will be returned in the same order [2], we expect that behaviour in some places such as [3].
[1] https://docs.python.org/2/library/stdtypes.html#dict.items
[2] http://doc.tryton.org/4.8/trytond/doc/ref/models/models.html?highlight=copy#trytond.model.ModelStorage.copy
[3] http://hg.tryton.org/modules/stock/file/tip/shipment.py#l2347