Tryton - Issues



Title copy does not guarantee the order of returned records matches the order of the supplied ones
Priority bug Status testing
Superseder Nosy List albertca, ced, pokoli, reviewbot
Type behavior Components trytond
Assigned To ced Keywords review
Reviews 58291002
View: 58291002

Created on 2018-06-12.13:34:31 by albertca, last changed by reviewbot.

review58291002 updated at
review58291002 updated at
review58291002 updated at
msg41568 (view) Author: [hidden] (ced) (Tryton committer) (Tryton translator) Date: 2018-06-21.11:15:39
Here is review58291002 with a test to ensure to keep this behavior.
msg41381 (view) Author: [hidden] (albertca) (Tryton committer) (Tryton translator) Date: 2018-06-12.13:34:30
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]:

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].

Date User Action Args
2018-06-21 15:01:23reviewbotsetmessages: + msg41575
2018-06-21 12:32:40reviewbotsetmessages: + msg41573
2018-06-21 11:26:06reviewbotsetnosy: + reviewbot
messages: + msg41570
2018-06-21 11:15:39cedsetstatus: unread -> testing
messages: + msg41568
keyword: + review
nosy: + ced
component: + trytond
reviews: 58291002
assignedto: ced
2018-06-12 13:46:07pokolisetnosy: + pokoli
2018-06-12 13:34:31albertcacreate

Showing 10 items. Show all history (warning: this could be VERY long)