[19.0][MIG][ADD] base_tier_validation_board: migration to 19.0#40
Draft
bosd wants to merge 1 commit into
Draft
Conversation
aa35b38 to
8c8433d
Compare
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.
8c8433d to
d500959
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Brings the Tier Review Activity Board to OCA/tier-validation 19.0. Two-level reach:
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 ontier.review.Menus
Under
Spreadsheets > Tier Reviews:reviewer_ids in uid AND status in (waiting,pending)). Visible to all internal users.group_show_tier_review_board.done_by). Same group gate.Fields added to
tier.reviewrelated_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. TheAvg. daysmeasure 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.reviewinheritsmail.thread+mail.activity.mixinhere, 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
group_show_tier_review_board._searchfilter ontier.review: even with the board group, a user can't observe reviews of records they themselves can't read.Polish + UX
many2one_avatar_useronrequested_by/done_by,badgeonstatus.widget="date"on requested/reviewed dates, status-colored left border (warning / success / danger / muted), rotten badge for overdue reviews,many2many_avatar_usershowing the still-pending reviewer list,kanban_activitywidget bottom-right.model, cols=status, measure=response_days.status, measure=response_days.done_by× cols=status) and graph (bar bydone_by) with the sameresponse_daysmeasure.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_reportsemantics this module now also covers).