[ADD] base_tier_validation: allow_bulk_approve on tier.definition#46
Open
bosd wants to merge 1 commit into
Open
[ADD] base_tier_validation: allow_bulk_approve on tier.definition#46bosd wants to merge 1 commit into
bosd wants to merge 1 commit into
Conversation
Contributor
|
Hi @LoisRForgeFlow, |
Reviewers often need to validate many reviews at once (e.g. month-end batch approval of expense lines). Add an opt-in Boolean on tier.definition; when set, the tier.review list view exposes a Validate header button that approves every selected eligible review. Eligibility (AND semantics): the review is pending and assigned to the current user, it is the reviewer-of-the-moment (can_review), the definition opts in via allow_bulk_approve, and the definition does not require a comment (which cannot be collected in a bulk action). Reviews that fail any of these are skipped silently; each underlying record's own _validate_tier is invoked so notifications and approve-sequence promotion keep working.
0ca5daa to
3196429
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
Reviewers regularly need to validate many tier reviews at once — typical
month-end use cases include batch-approving expense lines, vendor bills
or other recurring documents that all follow the same simple
single-tier definition. Today they have to open each record and click
Validate individually.
What
Adds a per-definition opt-in:
False, so existing setups behave exactly as before).
the review list.
Validate header button on the tier review list view.
AND semantics
A review in the selection is approved only if all of the following
hold:
prompt for one).
Reviews that fail any check are skipped silently — the user just sees
which records moved.
Each underlying record's own `_validate_tier` is invoked, so the
existing notification, approve-sequence promotion and review-counter
update paths are preserved.
Tests
Four new tests in `test_tier_validation.py`:
Out of scope (deliberately)
No bulk reject, no new `res.groups` to gate the action — both
discussed and explicitly dropped.