Skip to content

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

Open
bosd wants to merge 6 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 6 commits into
OCA:19.0from
bosd:19.0-imp-tier-validation-ui

Conversation

@bosd
Copy link
Copy Markdown
Contributor

@bosd bosd commented May 12, 2026

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

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.

Notes

This PR only touches views + the action's help text. No model or test changes. It does not depend on PRs #21 (auto-promote fix) or #22 (chatter body); ordering between the three is up to the maintainers.

CC @LoisRForgeFlow

@OCA-git-bot
Copy link
Copy Markdown
Contributor

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

@OCA-git-bot OCA-git-bot added mod:base_tier_validation Module base_tier_validation series:19.0 labels May 12, 2026
@bosd bosd changed the title [IMP] base_tier_validation: UI clean-up [19.0]IMP] base_tier_validation: UI clean-up May 12, 2026
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*.
@bosd bosd force-pushed the 19.0-imp-tier-validation-ui branch from 4d97d2e to e1df8e8 Compare May 13, 2026 15:52
bosd added 2 commits May 13, 2026 23:22
- 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.
bosd added 2 commits May 14, 2026 17:01
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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

mod:base_tier_validation Module base_tier_validation series:19.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants