[17.0][IMP] base_tier_validation: add support for custom actions in TierReviewMenu #1120
+37
−17
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.
This commit adds the possibility for modules inheriting from
base_tier_validation
to customize their.actions.act_window
to run when a user clicks on the TierReviewMenu entries.For example, the current behavior when using
account_move_tier_validation
is to use the default views foraccount.move
, which leads users to a Kanban view of the Moves by default, and the Tree/List view has no "Partner" column.With this PR, adding a small JS module such as:
would then open the classic "Journal Entries" default views, showing the "Partner" column in the tree view, etc...
Of course, the default behavior of this addition is to fallback on the current approach.
Also, we now pass the
group
variable to thegetAvailableViews
call so this can be customized too.