Skip to content

[19.0][IMP] base_tier_validation: UI clean-up - #23

Open
bosd wants to merge 4 commits into
OCA:19.0from
bosd:19.0-imp-tier-validation-ui
Open

bosd wants to merge 4 commits into
OCA:19.0from
bosd:19.0-imp-tier-validation-ui

Conversation

@bosd

@bosd bosd commented May 12, 2026 •

Copy link
Copy Markdown
Contributor

What

Small UX polish on the Tier Definition / Tier Review views, picked up from feedback on a real-world rollout.

Changes

Tier Definition

  • Search view: explicit Archived filter next to the existing All filter, so archived definitions can be surfaced in one click. Before, you had to type active = False into the bare search field.

  • Form view: reviewer_id (individual review type) now uses widget=\"many2one_avatar_user\" so the reviewer's avatar is rendered next to their name. Matches the rest of Odoo (sale, project, helpdesk, etc.).

  • List view: same avatar widget on reviewer_id. No Active column anymore: archived definitions are hidden by default like everywhere else in Odoo (the action no longer opens with All). Reviewer field is an optional column, hidden by default.

  • Form layout: the top shows who reviews (with Four-eyes Principle under the reviewer group) and in what order (narrow Sequence). The options moved to two tabs:

    • Review: Reviewer permissions (Allow Write For Reviewers, and Allow Forward from the forward module) and When reviewing (Comment, plus Require Authentication from confirm_auth).
    • Notifications: the Notify reviewers when flags and the reminder.

    These named groups are where modules add their options, so new approval options get a clear place instead of being appended somewhere. Before, the options were spread over the top columns and one flat tab.

  • Reminder: Send reminder message on pending reviews now reads Remind every [ ] days, right below Notify Reviewers on reaching Pending: reminders are about pending reviews (once [19.0][FIX] base_tier_validation: no reminders for reviews still waiting #71 is in, only those). The help says it repeats, and what 0 means.

  • base_tier_validation_server_action and base_tier_validation_forward: the post-approve / post-reject actions and auto-validate get their own After review group in the Review tab (they used to land on an untitled row), and Allow Forward sits with the reviewer permissions. One commit per module.

  • Empty-state: helpful help message on the action so a fresh install actually explains what tier definitions are and how to chain them with Approve by sequence.

Tier Validation Exception

  • Exceptions can be archived (new active field), with an Archived filter and ribbon. Archived exceptions no longer apply; covered by a test. Own commit.
  • Form: the write permissions and the groups they apply to get their own groups (Allow editing / Applies to, empty groups read All users), like the Tier Definition form.

Tier Review (used embedded under the validated document and in the systray tray)

  • Avatar widget on requested_by and done_by.
  • Row decorations: decoration-warning for pending and decoration-muted for waiting, complementing the existing decoration-danger (rejected) and decoration-success (approved). Row state is now visible at a glance.
  • The status is shown as a badge, in the same colours as the Reviews table on documents.

Other

  • Definition and exception names are bold in their lists.
  • The reviewer menu sits between messaging and activities in the systray (sequence 24), instead of on the far left.
  • The changelog entry is a newsfragment (readme/newsfragments/23.feature) instead of a hand-written HISTORY section.

Screenshots

After:
image

image

New Review tab
image

New Notifications tab:
image

New archived filter:
image
(also displayes the new many2one_avatar_user in the list view. )

Icon refresh

The menu got a new icon ✔️ ✖️
While the approvel view still showed thumbs up / down. Aligned those two.
Would also fit better if anyone would be using this among a core validation module.
image
Notice restart validation got an iconin the button as well.
The systray icon used now, is no longer confusing with odoo native's use of that icon for sale orders.

Details ## Test plan
  • Open a fresh DB, install base_tier_validation, install one of the bridge modules (e.g. account_move_tier_validation).
  • Tier Definitions menu: confirm the Archived filter appears next to All; archive a definition, click the filter, confirm it surfaces.
  • Open an existing tier definition (individual reviewer): confirm the avatar appears next to the reviewer.
  • Open a tier definition: Four-eyes Principle under the reviewer group; the Review and Notifications tabs grouped as described.
  • Trigger a tier validation on a document so the Reviews table is populated; confirm row colours for each status and avatars on Requested by / Done by.
CC @LoisRForgeFlow

@OCA-git-bot

Copy link
Copy Markdown
Contributor

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

@Dranyel-Bosd Dranyel-Bosd left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

LGTM 👍

@OCA-git-bot

Copy link
Copy Markdown
Contributor

This PR has the approved label and has been created more than 5 days ago. It should therefore be ready to merge by a maintainer (or a PSC member if the concerned addon has no declared maintainer). 🤖

@bosd
bosd force-pushed the 19.0-imp-tier-validation-ui branch 2 times, most recently from 5f285c3 to ba00375 Compare October 3, 2026 15:49
@bosd bosd changed the title [19.0]IMP] base_tier_validation: UI clean-up [19.0][IMP] base_tier_validation: UI clean-up Oct 3, 2026
@bosd
bosd force-pushed the 19.0-imp-tier-validation-ui branch 2 times, most recently from 807d1f6 to 79b97df Compare October 3, 2026 16:19
@OCA-git-bot OCA-git-bot added the mod:base_tier_validation_server_action Module base_tier_validation_server_action label Oct 3, 2026
@bosd
bosd force-pushed the 19.0-imp-tier-validation-ui branch 2 times, most recently from 0385140 to 71f366d Compare October 3, 2026 16:53
@bosd
bosd force-pushed the 19.0-imp-tier-validation-ui branch 2 times, most recently from a6012c6 to 279d6f1 Compare October 6, 2026 12:34
@OCA-git-bot OCA-git-bot added the mod:base_tier_validation_forward Module base_tier_validation_forward label Oct 6, 2026
@bosd
bosd force-pushed the 19.0-imp-tier-validation-ui branch from 279d6f1 to 7c0c4ae Compare October 6, 2026 13:22

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Code review at 7c0c4ae. I went through the diff and the screenshots but didn't test on runboat.

Nice cleanup, and thanks for keeping the old page and group names so inherited views don't break.

Three things I'd like changed before merging:

  1. In views/tier_definition_view.xml the action's context line is deleted, but Odoo doesn't reset it on upgrade. Existing databases will still open with All while the Active column is gone, so archived and active definitions get mixed together. Setting <field name="context">{}</field> fixes it.
  2. The changelog header 19.0.1.5.0 (2026-10-03) is written by hand and will conflict with #35, #41 and #44. Could you move it to readme/newsfragments/23.feature.md?
  3. The reminder help says "while their review is pending", which is only true once #71 is merged.

Two questions:

  • Does the name field have a placeholder now that the "Name" label is gone?
  • Sequence 24 puts the systray icon between messaging (25) and activities (20). Is that on purpose?

A few optional ones:

  • Keeping name="server_action" on the group in base_tier_validation_server_action would avoid breaking inherited views.
  • _get_exception_fields could force active_test=True, like _compute_need_validation already does.
  • The PR description is a bit out of sync with the changelog.

Happy to approve once the context fix is in.

bosd added 4 commits October 6, 2026 18:56
Tier definition
- The form shows at the top who reviews (Four-eyes Principle next to the
  reviewer group) and in what order (narrow sequence). A Review tab
  holds the reviewer permissions and what happens when reviewing, a
  Notifications tab the notifications. These named groups are where
  modules add their options.
- Archived filter, avatar on the reviewer, name in bold, a help text on
  the empty list.
- The reminder reads "Remind every [ ] days".

Tier review
- Avatars on Requested by and Done by, the status as a badge, rows
  coloured by status.

Validation banner and systray
- Icons that match the app icon: check / xmark on Validate / Reject and
  on the validated / rejected banners, an icon on Restart Validation, and
  a check-square in the systray, which no longer looks like the sales
  and invoicing entries.
- The reviewer menu sits with the other notification menus, on the
  right of the systray.

Tier validation exceptions: name in bold.
The post-approve / post-reject actions and auto-validate were appended to
the options tab of the tier definition, where they ended up on a row of
their own without a title. Give them their own "After review" group in
the new Review tab.
…ermissions

Allow Forward sat between the sequence settings at the top of the tier
definition. It is something a reviewer may do, so show it with the other
reviewer permissions in the Review tab.
Exceptions can now be archived instead of deleted. Archived exceptions
no longer apply. The list and search views get the usual Archived
filter, and the form groups the write permissions and the groups they
apply to, like the Tier Definition form.
@bosd
bosd force-pushed the 19.0-imp-tier-validation-ui branch from 7c0c4ae to bf3eb1b Compare October 6, 2026 16:59
@bosd

bosd commented Oct 6, 2026

Copy link
Copy Markdown
Contributor Author

Thanks for the careful review! All done in the new push:

  1. The action now sets context to {} explicitly. I checked it on an upgrade: before, the old show-all default survived; now it's gone.
  2. The changelog moved to readme/newsfragments/23.feature; HISTORY is untouched now.
  3. The reminder help now says "until the review is done", which holds with or without [19.0][FIX] base_tier_validation: no reminders for reviews still waiting #71.

Questions:

  • Yes, the name keeps its placeholder ("e.g. Tier Validation for...").
  • Sequence 24 is on purpose: it puts the reviews menu between messaging (25) and activities (20), with the other to-do style menus, instead of on the far left.

Also took the optional ones: the server action group is named server_action again, the exception search forces active_test=True, and the PR description is updated.

@bosd

bosd commented Oct 6, 2026

Copy link
Copy Markdown
Contributor Author

@LoisRForgeFlow could you have a look at this one and merge it if you're OK with it?

It's more than a cosmetic PR: several open PRs build on the layout it introduces. The tier definition form gets named groups (reviewer_permissions, review_options, server_action, notify) that modules now extend, instead of each one appending fields somewhere in the form:

As long as this is open, each of those has to carry its own copy of the layout or be rebased again later, and every new option makes that worse.

It has two approvals, and the review points above are addressed (including the action context on upgrade, which I checked on an upgraded database). Thanks!

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Code review on the new push. I checked the changes: the action context is now set to {} explicitly, the changelog is a newsfragment and HISTORY is untouched, and the reminder help reads correctly with or without #71. The active_test change in _get_exception_fields is in too.

LGTM, thanks for the quick turnaround and for testing the upgrade case.

@OCA-git-bot

Copy link
Copy Markdown
Contributor

This PR has the approved label and has been created more than 5 days ago. It should therefore be ready to merge by a maintainer (or a PSC member if the concerned addon has no declared maintainer). 🤖

@bosd

bosd commented Oct 9, 2026

Copy link
Copy Markdown
Contributor Author

@LoisRForgeFlow now that the 20.0 migration has started (#94), it would be great to get this one in first: #42, #46, #83 and #91 build on its layout, and merging it before the migration moves on saves porting it twice. It's approved and the review points are addressed. I've put an overview of the other open 19.0 PRs in #96.

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

Labels

approved mod:base_tier_validation_forward Module base_tier_validation_forward mod:base_tier_validation_server_action Module base_tier_validation_server_action mod:base_tier_validation Module base_tier_validation ready to merge series:19.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants