Issue 10831

Title
ProductQuantitiesByWarehouse is not stable for cache
Priority
bug
Status
resolved
Nosy list
ced, reviewbot, roundup-bot
Assigned to
ced
Keywords
review

Created on 2021-10-06.19:47:47 by ced, last changed 1 month ago by roundup-bot.

Messages

New changeset ef20d6d41683 by Cédric Krier in branch '6.0':
Use unique ID for today record in ProductQuantitiesByWarehouse query
https://hg.tryton.org/modules/stock/rev/ef20d6d41683
New changeset 3f99a72b225c by Cédric Krier in branch 'default':
Use unique ID for today record in ProductQuantitiesByWarehouse query
https://hg.tryton.org/tryton-env/rev/3f99a72b225c
New changeset a1917dccb59b by Cédric Krier in branch 'default':
Use unique ID for today record in ProductQuantitiesByWarehouse query
https://hg.tryton.org/modules/stock/rev/a1917dccb59b
Author: [hidden] (ced) Tryton committer Tryton translator
Date: 2021-10-06.19:47:47

The query reuse the same ID for today record because it is just using the index order of the list products or templates.
So if in the same transaction we browse ProductQuantitiesByWarehouse with different setup (like stock_quantity_issue or stock_quantity_early_planning) we may have the data from a previous record with the same ID but for a different setup (like a different product). This creates wrong computation at least for the two modules previous modules.

History
Date User Action Args
2021-10-23 00:21:09roundup-botsetkeyword: - backport
messages: + msg71237
2021-10-15 19:17:11roundup-botsetmessages: + msg71026
2021-10-15 19:17:06roundup-botsetmessages: + msg71025
nosy: + roundup-bot
status: testing -> resolved
2021-10-07 13:02:17reviewbotsetmessages: + msg70726
2021-10-06 20:08:02reviewbotsetmessages: + msg70719
nosy: + reviewbot
2021-10-06 19:51:59cedsetkeyword: + backport, review
reviews: 353021002
status: in-progress -> testing
2021-10-06 19:47:47cedcreate