[18.0][FIX] base_tier_validation_forward: fix multiple reviews in 'pending' after forward#1186
Conversation
|
Hi @LoisRForgeFlow, @kittiu, |
|
Hi @kittiu, @LoisRForgeFlow, |
9b8c6b5 to
b9c9254
Compare
By ordering only by sequence, the order is not deterministic when there are forwards, because the forwards are created with the same sequence as the forwarded reviews.
… after forward How to reproduce: * Create two reviews for the same model with different sequences and `Approve by sequence` enabled. * Request validation on a record. Let the user of the first review forward the first validation. Desired result: The new (forward) review is in state 'pending', and the remaining review is in state 'waiting'. Actual result: Both the new (forward) review and the remaining review are in state 'pending'. Suggested solution: _compute_can_review has to be deferred during the fowarding process. It was called explicitely afterwards already.
b9c9254 to
0cb0f2e
Compare
len-foss
left a comment
There was a problem hiding this comment.
It's a bit hacky, but this is because the module's design is pushing the limits of the ORM. So AFAICT it's the best solution we can get given the constraints we have 👍
LoisRForgeFlow
left a comment
There was a problem hiding this comment.
LGTM, indeed is a bit hacky but the issue is real. Thanks for providing appropriate test cases.
|
/ocabot merge patch |
|
Hey, thanks for contributing! Proceeding to merge this for you. |
|
Congratulations, your PR was merged at 8760d3f. Thanks a lot for contributing to OCA. ❤️ |
How to reproduce:
Approve by sequenceenabled.first validation.
Desired result:
The new (forward) review is in state 'pending', and the remaining review is in state 'waiting'.
Actual result:
Both the new (forward) review and the remaining review are in state 'pending'.
Suggested solution:
_compute_can_reviewhas to be deferred during the fowarding process. It was called explicitely afterwards already.