Skip to content

[18.0][IMP] base_tier_validation: Add cancel status to review#1250

Open
victoralmau wants to merge 1 commit intoOCA:18.0from
Tecnativa:18.0-imp-base_tier_validation-TT61255
Open

[18.0][IMP] base_tier_validation: Add cancel status to review#1250
victoralmau wants to merge 1 commit intoOCA:18.0from
Tecnativa:18.0-imp-base_tier_validation-TT61255

Conversation

@victoralmau
Copy link
Copy Markdown
Member

Add cancel status to review

Related to #1245

Please @pedrobaeza and @LoisRForgeFlow can you review it?

@Tecnativa TT61255

@OCA-git-bot
Copy link
Copy Markdown
Contributor

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

@pedrobaeza pedrobaeza added this to the 18.0 milestone Mar 9, 2026
# If there are waiting reviews that should be approved sequentially,
# they must be marked as canceled
waiting_reviews = self.review_ids.filtered(
lambda r: r.status == "waiting" and r.approve_sequence
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

approve_sequence shouldn't be higher than the current one?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The sequence works “backwards” from what we would think (definition 1 > sequence 30, definition 2 > sequence 20, definition 3 > sequence 10); In any case, I don't think it's necessary to do that validation because if it's a sequence approval, review 2 cannot be rejected without completing review 1; furthermore, if by chance it could be done, the pending reviews should still be canceled, don't you think? (review 2 is rejected, review 1 and review 3 should be canceled).

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As I don't know this in-depth, again I let @LoisRForgeFlow to decide.

Copy link
Copy Markdown
Contributor

@LoisRForgeFlow LoisRForgeFlow Mar 10, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, this is a long standing issue to be honest. I agree that it should be changed to ease understanding. Some ideas have been proposed in this issue to make the transition. #1082 (comment)

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Okay, thanks for the clarification and for pointing out the issue, but now that it's clear, do you think it's necessary in this PR to change this filter to only “cancel” revisions with a lower sequence? In my opinion, no, because “by sequence” a revision 2 cannot be rejected if revision 1 has not been completed; therefore, the following revisions (revision 3 and revision 4, for example) will always have to be canceled.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants