Skip to content

[19.0][MIG][ADD] base_tier_validation_board: migration to 19.0#40

Draft
bosd wants to merge 1 commit into
OCA:19.0from
bosd:19.0-mig-base_tier_validation_board
Draft

[19.0][MIG][ADD] base_tier_validation_board: migration to 19.0#40
bosd wants to merge 1 commit into
OCA:19.0from
bosd:19.0-mig-base_tier_validation_board

Conversation

@bosd
Copy link
Copy Markdown
Contributor

@bosd bosd commented May 14, 2026

Summary

Brings the Tier Review Activity Board to OCA/tier-validation 19.0. Two-level reach:

  1. Forward-port of OCA/server-ux#1155 (@astirpe / Aselcis Consulting, functional review by @CasVissers-360ERP) onto 19.0. PR #1155 migrated the module to 18.0 but went stale before merge.
  2. Subsumes the v16-only base_tier_validation_report (@kittiu / Ecosoft) which was never migrated after v16. Its My Reviews / All Reviews reporting menus are delivered here on top of the Board's kanban/pivot/graph infrastructure — avoiding a second module with duplicate Reference fields on tier.review.

Menus

Under Spreadsheets > Tier Reviews:

  • My Reviews — list-default, scoped to current user (reviewer_ids in uid AND status in (waiting,pending)). Visible to all internal users.
  • All Reviews — kanban-default, every tier review. Gated by group_show_tier_review_board.
  • Review Statistics — pivot+graph by reviewer, measure Avg. days (average response time per done_by). Same group gate.

Fields added to tier.review

  • related_model_instance (Reference) + res_name (Char) — link to the underlying validated document, restricted to tier-validated models only.
  • response_days (Float, stored) — days between review creation and completion. The Avg. days measure used by Review Statistics.
  • is_overdue (Boolean, computed) — status in (waiting,pending) AND create_date < now - 7 days. Surfaced as a kanban "rotten" badge and a search filter.

Activity mixin

tier.review inherits mail.thread + mail.activity.mixin here, so reviewers can schedule follow-up activities directly from a review card and the kanban shows the standard activity widget. Additive — no impact on existing tier.review consumers that don't use the mixin.

ACL

  • Menus All Reviews and Review Statistics gated by group_show_tier_review_board.
  • Per-document _search filter on tier.review: even with the board group, a user can't observe reviews of records they themselves can't read.

Polish + UX

  • OCA icon (140×140, matches the other tier modules).
  • Form view: many2one_avatar_user on requested_by / done_by, badge on status.
  • Kanban card: rebuilt with reviewer avatar at top-right, widget="date" on requested/reviewed dates, status-colored left border (warning / success / danger / muted), rotten badge for overdue reviews, many2many_avatar_user showing the still-pending reviewer list, kanban_activity widget bottom-right.
  • Search view: filters for My/Requested-by-me/Reviewed-by-me, per-state (Pending/Waiting/Approved/Rejected), Overdue, Reviewed today, Requested in last 7 days. Groupby by Status / Model / Requested by / Reviewed by / Definition.
  • Pivot view: default rows=model, cols=status, measure=response_days.
  • Graph view: bar by status, measure=response_days.
  • Review Statistics views: dedicated pivot (rows=done_by × cols=status) and graph (bar by done_by) with the same response_days measure.

On the "Review Statistics"

Same data as a reviewer-ranking page, but rendered as a generic pivot/graph rather than a pre-baked ranking. The motivation lever (visible response times) survives; the rubber-stamp / vacation-penalty / single-review-skew risks of a hard ranking don't bake into the UI. Filter the pivot, sort by Avg. days, and you get a ranking on demand. We can always add a more aggressive view later if the gentle one doesn't move behaviour.

Credit

@JasminSForgeFlow (original 16.0 module), @astirpe (16.0 → 18.0 migration in #1155), @CasVissers-360ERP (functional review on #1155), @kittiu / Ecosoft (base_tier_validation_report semantics this module now also covers).

@OCA-git-bot OCA-git-bot added series:19.0 mod:base_tier_validation_board Module base_tier_validation_board labels May 14, 2026
@bosd bosd force-pushed the 19.0-mig-base_tier_validation_board branch 13 times, most recently from aa35b38 to 8c8433d Compare May 14, 2026 14:29
Forward-port of the closed-but-approved [OCA/server-ux#1155](OCA/server-ux#1155)
(authored by @astirpe / Aselcis Consulting, functional review by
@CasVissers-360ERP) onto 19.0. PR #1155 migrated the module to 18.0
but went stale and was auto-closed before merge; the module never
made it to 18.0 or 19.0 of OCA/server-ux or to OCA/tier-validation.

This module adds a "Tier Review Activity Board" -- a kanban /
form / pivot / graph dashboard scoped to ``tier.review`` records,
parented under ``spreadsheet_dashboard``. A new
``group_show_tier_review_board`` group gates access to the dashboard
menu so it doesn't appear for every employee by default.

A per-document ACL filter on ``tier.review._search`` ensures users
only see review rows whose underlying document they themselves have
read access to -- without this a regular employee with the board
group could observe reviews of records they otherwise cannot see.

## 19.0 adaptations vs. the 18.0 PR

- ``from odoo.osv import expression`` -> ``from odoo.fields import Domain``.
  ``odoo.osv.expression`` is no longer available in 19.0.
- Dropped the ``_read_group_raw`` override entirely. The method was
  removed from Odoo's ORM in 17.0; the ``_read_group`` path now
  routes through ``_search``, so the ``_search`` override above
  already enforces the same per-document ACL on grouped queries.
  Inline comment left explaining why the override is intentionally
  absent.
- Manifest: version 18.0.1.0.0 -> 19.0.1.0.0; website URL retargeted
  to OCA/tier-validation.

## Credit

Built on top of the work by @JasminSForgeFlow (original 16.0 module),
@astirpe (16.0 -> 18.0 migration in #1155), and @CasVissers-360ERP
(functional review on #1155).

## Test plan

- Install ``base_tier_validation_board`` against a database that
  already exercises tier validation (e.g. install
  ``account_move_tier_validation`` and create a few pending reviews).
- As an admin in the ``Show tier review board`` group, the *Tier
  Reviews* menu appears under the *Dashboards* root and shows the
  kanban grouped by status.
- As a user **not** in that group, the menu is absent.
- As a user in the group but lacking read access on the underlying
  validated model (e.g. ``account.move``), the corresponding reviews
  are filtered out of the kanban / list / form views via the
  ``_search`` override.
@bosd bosd force-pushed the 19.0-mig-base_tier_validation_board branch from 8c8433d to d500959 Compare May 14, 2026 15:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

mod:base_tier_validation_board Module base_tier_validation_board series:19.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants