Skip to content

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

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

[19.0]IMP] base_tier_validation: UI clean-up#23
bosd wants to merge 7 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.

  • More Options tab: renamed to Notifications & Options and split into two clearly-titled groups:

    • Notify reviewers when: all notify_* flags + notify_reminder_delay.
    • Review options: has_comment.

    Before, every flag sat in one flat group notify which lumped together notification routing and review-time behaviour. Two columns with explicit titles make the intent obvious.

  • 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 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.

Screenshots

After:
image

image

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

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 the Notifications & Options tab: confirm the two columns are titled and 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!

bosd added 6 commits July 23, 2026 01:10
Small UX polish on the Tier Definition / Tier Review views:

- Tier Definition search view: add an explicit *Archived* filter
  alongside the existing *All* filter, so archived definitions can
  be surfaced in one click without resorting to the bare ``active``
  search field.
- Tier Definition form + list: render the ``reviewer_id`` field
  (individual review type) with ``many2one_avatar_user`` so the
  reviewer's avatar is shown next to their name, matching the rest
  of Odoo and making the screen scannable at a glance.
- Tier Definition *More Options* tab renamed to *Notifications &
  Options* and split into two clearly-titled columns:
    - *Notify reviewers when*: all ``notify_*`` flags plus
      ``notify_reminder_delay``.
    - *Review options*: ``has_comment``.
  The previous flat group mixed conceptually different settings
  (notification routing vs. review-time behaviour).
- Tier Review list: avatar widget on ``requested_by`` and
  ``done_by``; ``decoration-warning`` on pending rows and
  ``decoration-muted`` on waiting rows -- complementing the existing
  decorations for rejected (danger) and approved (success), so the
  row state is visible at a glance.
- Tier Definition action: add a friendly empty-state help message
  explaining what tier definitions are and how they chain via
  *Approve by sequence*.
- Narrow the Sequence column: header becomes "#" with an explicit
  2rem width via .o_tier_review_seq, freeing real-estate for the
  Description / Status / Todo by / Done by / Validation Date columns
  on cramped form views.
- Left-align all text columns (Description, Status, Todo by, Done by,
  Validation Date, Comment) -- the previous text-end was right-aligning
  short text values in already-cramped columns, which made the header
  visually drift away from the value.
- Modernize the Bootstrap 3 leftovers from the original widget:
  panel/panel-default/panel-heading/panel-title/panel-body -> card +
  card-header/card-title/card-body; data-toggle -> data-bs-toggle and
  data-target -> data-bs-target; table-condensed -> table-sm;
  oe_mt32 -> mt-4. The widget still renders the same way but uses
  classes that actually exist in Bootstrap 5 (which Odoo 19 ships).
- Row status colouring: replace alert/alert-success/alert-danger
  (which are Bootstrap components designed for <div>, not <tr>, and
  don't tint the row consistently) with the proper Bootstrap 5
  contextual table classes table-success / table-danger.
- Scope all custom CSS rules under a new .o_tier_review_widget root
  class so they no longer rely on the now-renamed .panel-* selectors
  and won't leak to other Bootstrap cards on the page.
Follow-up to the Bootstrap 3 -> 5 migration of the Reviews widget
template: onToggleCollapse looked up the heading element via
.closest(".panel-heading"), which no longer matches anything since
the template now uses .card-header. The collapse toggle was a no-op
after the migration.

Switch the selector to .card-header and add optional chaining on
nextElementSibling.matches so a defensive check survives any future
DOM rearrangement instead of throwing.
The module's app icon recently switched to an xmark + check motif.
Bring the rest of the UI iconography in line:

- Systray dropdown: fa-pencil-square-o -> fa-check-square-o. Avoids
  the visual collision with the sale / invoice systray entries which
  use fa-pencil-square-o, and matches the checkbox+check shape of the
  app icon.
- Validate button: fa-thumbs-up -> fa-check (fa-lg). Reject button:
  fa-thumbs-down -> fa-times (= xmark, fa-lg). Same for the validated
  / rejected alert banners on the document and the matching HTML
  message bodies posted to chatter -- single consistent xmark+check
  vocabulary across systray, alert, button and chatter message.
- Restart Validation button: was bare; now fa-rotate-left so the
  three workflow buttons (Request / Validate / Restart) all read
  with a glanceable icon.
@bosd
bosd force-pushed the 19.0-imp-tier-validation-ui branch from 1aab40a to 0caabd5 Compare July 22, 2026 23:12
…f the AI button

Systray items render right-to-left by descending sequence (higher =
further left; the user menu at sequence 0 is right-most). At sequence 99
the reviewer menu sat on the far left, and on Enterprise it landed to the
left of the AI button. Lower it to 24 so it groups with the standard
notification menus (messaging 25, activities 20) on the right side --
to the right of the AI button (whose sequence is > 25).

@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). 🤖

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants