Issue 11559

Title
Collision between shipment and return ids when storing factors
Priority
bug
Status
resolved
Nosy list
ced, reviewbot, roundup-bot
Assigned to
ced
Keywords
review

Created on 2022-06-08.18:21:27 by ced, last changed 5 months ago by roundup-bot.

Messages

New changeset d52c926ac8fd by Cédric Krier in branch '6.4':
Store allocation factors per model name and id
https://hg.tryton.org/modules/account_stock_shipment_cost_weight/rev/d52c926ac8fd
New changeset 805860023023 by Cédric Krier in branch '6.4':
Store allocation factors per model name and id
https://hg.tryton.org/modules/account_stock_shipment_cost/rev/805860023023
New changeset 0193f5e74bc7 by Cédric Krier in branch 'default':
Store allocation factors per model name and id
https://hg.tryton.org/tryton-env/rev/0193f5e74bc7
New changeset 72fb25e40b43 by Cédric Krier in branch 'default':
Store allocation factors per model name and id
https://hg.tryton.org/modules/account_stock_shipment_cost_weight/rev/72fb25e40b43
New changeset ff1179530c06 by Cédric Krier in branch 'default':
Store allocation factors per model name and id
https://hg.tryton.org/modules/account_stock_shipment_cost/rev/ff1179530c06
Author: [hidden] (ced) Tryton committer Tryton translator
Date: 2022-06-08.18:21:27

The factors are stored by ids but from two different models (shipment and return). So it is possible that the same id is used in both models and create a collision. So we will miss a factor.
I propose to use the string version of the record in factors and to include a fallback by id when the string is not found for backward compatibility with existing stored factors.

History
Date User Action Args
2022-06-24 10:25:25roundup-botsetmessages: + msg77217
2022-06-24 10:25:14roundup-botsetkeyword: - backport
messages: + msg77216
2022-06-15 22:06:17roundup-botsetmessages: + msg77106
2022-06-15 22:06:08roundup-botsetmessages: + msg77105
2022-06-15 22:06:04roundup-botsetmessages: + msg77104
nosy: + roundup-bot
status: testing -> resolved
2022-06-15 22:04:51cedsetkeyword: + backport
2022-06-08 18:27:09cedlinkissue11558 superseder
2022-06-08 18:25:24reviewbotsetmessages: + msg77031
nosy: + reviewbot
2022-06-08 18:24:30cedsetkeyword: + review
reviews: 443231004
status: in-progress -> testing
2022-06-08 18:21:27cedcreate