Skip to content

Conversation

@ArnauCForgeFlow
Copy link
Contributor

This Pull Request enables the assignment of multiple tier definitions across different states. This allows us to validate reviews for a specific state without removing previous reviews. Also, when resetting validation, only the reviews corresponding to that specific state will be deleted.

Note: To achieve full functionality, the following two methods must be extended:

_allow_to_remove_reviews()
We override this method to prevent the system from automatically clear the existing reviews when performing the transition corresponding to the second validation step (specific state_from → state_to).

_check_allow_write_after_validation()
Standard behavior prevents writing to a record once it is validated. We override this to explicitly whitelist the transition defined for the second validation step, returning True. This ensures the specific state change is not blocked by the validation lock mechanisms.

Please note that this implementation is currently a workaround. While it works correctly now, a small refactor to base_tier_validation will be needed in the future to simplify the process and make it cleaner.

@OCA-git-bot
Copy link
Contributor

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

Copy link

@LauraCForgeFlow LauraCForgeFlow left a comment

Choose a reason for hiding this comment

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

Functional test LGTM

Copy link
Contributor

@LoisRForgeFlow LoisRForgeFlow left a comment

Choose a reason for hiding this comment

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

LG as a first step for multi transition handling!

Could you please add tests for this? you could probably add a new tester model for this specific new case.

Copy link
Member

@StefanRijnhart StefanRijnhart left a comment

Choose a reason for hiding this comment

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

Can you please add a test to illustrate the purpose, and to show that it works well with this refactoring?

@ArnauCForgeFlow ArnauCForgeFlow force-pushed the 18.0-imp-base_tier_validations-multiple_td_in_multiple_states branch from 964ede3 to 4e049a5 Compare January 30, 2026 13:28
@ArnauCForgeFlow
Copy link
Contributor Author

@StefanRijnhart @LoisRForgeFlow added tests! the ci is failing due to this issue not related with the module: odoo/odoo#245835

@LoisRForgeFlow
Copy link
Contributor

@ArnauCForgeFlow can you rebase? the issue with the translation has been fixed upstream.

@ArnauCForgeFlow ArnauCForgeFlow force-pushed the 18.0-imp-base_tier_validations-multiple_td_in_multiple_states branch from 4e049a5 to fd4d58b Compare February 10, 2026 08:22
@ArnauCForgeFlow
Copy link
Contributor Author

@LoisRForgeFlow done!

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.

5 participants