Skip to content

Conversation

@MaxyMoos
Copy link
Contributor

@MaxyMoos MaxyMoos commented Jul 9, 2025

This commit adds the possibility for modules inheriting from base_tier_validation to customize the ir.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 for account.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:

/* @odoo-module */
import { patch } from "@web/core/utils/patch";
import { TierReviewMenu } from "@base_tier_validation/components/tier_review_menu/tier_review_menu.esm";


patch(TierReviewMenu.prototype, {
    async getCustomAction(group) {
        if (group.model === 'account.move') {
            const action = 'account.action_move_journal_line';
            return this.action.loadAction(action);
        }
        return super.getCustomAction(group);
    }
});

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 the getAvailableViews call so this can be customized too.

@OCA-git-bot
Copy link
Contributor

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

@MaxyMoos MaxyMoos force-pushed the 17.0-base_tier_validation-allow-custom-actions-in-tier-review-menu branch from 9354592 to 6f8f4b1 Compare July 9, 2025 08:52
@github-actions
Copy link

github-actions bot commented Nov 9, 2025

There hasn't been any activity on this pull request in the past 4 months, so it has been marked as stale and it will be closed automatically if no further activity occurs in the next 30 days.
If you want this PR to never become stale, please ask a PSC member to apply the "no stale" label.

@github-actions github-actions bot added the stale PR/Issue without recent activity, it'll be soon closed automatically. label Nov 9, 2025
@MaxyMoos
Copy link
Contributor Author

Hi @LoisRForgeFlow, just bumping this as it seems it'll get closed automatically real soon. Would love to get your opinion on whether this improvement seems relevant whenever you get some time.

@github-actions github-actions bot removed the stale PR/Issue without recent activity, it'll be soon closed automatically. label Nov 30, 2025
@MaxyMoos MaxyMoos force-pushed the 17.0-base_tier_validation-allow-custom-actions-in-tier-review-menu branch from 6f8f4b1 to 76ad208 Compare January 28, 2026 10:17
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.

Thanks! LGTM 👍

@MaxyMoos MaxyMoos force-pushed the 17.0-base_tier_validation-allow-custom-actions-in-tier-review-menu branch from 76ad208 to f28201e Compare January 29, 2026 08:30
@MaxyMoos
Copy link
Contributor Author

Just pushed a small update : i added the override example into the base model method docstring so the syntax is documented in code and not just in a GitHub comment ;)

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.

3 participants