Skip to content

Conversation

@StefanRijnhart
Copy link
Member

@StefanRijnhart StefanRijnhart commented Nov 10, 2025

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.

@OCA-git-bot
Copy link
Contributor

Hi @LoisRForgeFlow, @kittiu,
some modules you are maintaining are being modified, check this out!

@OCA-git-bot
Copy link
Contributor

Hi @kittiu, @LoisRForgeFlow,
some modules you are maintaining are being modified, check this out!

@StefanRijnhart StefanRijnhart marked this pull request as draft November 24, 2025 10:40
@StefanRijnhart StefanRijnhart marked this pull request as ready for review December 3, 2025 17:31
Fixes
```
Got duplicate key in t-foreach
```
when rendering the `Reviews` section of a record under validation after one
of the reviews has been forwarded. The forward is created with the same sequence
as the forwarded record.
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.
@StefanRijnhart StefanRijnhart force-pushed the 18.0-fix-base_tier_validation_forward-approval_sequence_violation branch from 9b8c6b5 to b9c9254 Compare December 3, 2025 17:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants