Repository navigation
Conversation
|
Hi @LoisRForgeFlow, |
4e002c7 to
18a1899
Compare
18a1899 to
859ea6c
Compare
|
The new added parameter, should be mentioned in fhe documentation. |
|
This PR has the |
…iews" link Implement res.users.tier_review_dashboard_action so the reviewer systray can link to the All Reviews board. Returns False for users outside group_show_tier_review_board, so the link is only offered to users who can open the board. The hook is introduced in base_tier_validation by OCA#41 (systray buckets). Until that lands nothing calls this method, so the module works standalone either way.
d1a37fa to
d3965e5
Compare
|
@bosd, while testing locally (Sales Orders; the Reviews menu is shared, so other document types should behave the same) I found two issues: 1. An invalid The value goes straight into
try:
late_after_days = max(0, int(param))
except (TypeError, ValueError):
late_after_days = DEFAULT_LATE_AFTER_DAYS2. Clicking the document type does nothing when all reviews are Late With a menu showing Sales Order - 1 Late · 0 Pending, clicking "Sales Order" just closes the menu. Only the "1 Late" link works. The row click should open Late + Pending. Questions Q2. If I approve the same document at two levels, it shows as "1 Pending · 1 Future", which reads like two documents. The test asserts this, so is it intended? Or should a document that is already Pending be left out of Future? |
|
Thanks @Pani-k-folk, great testing.
Q1. Not intended. The empty message looked at the badge counter, which leaves Future out on purpose. I'll show it only when there are no reviews at all. Q2. Fair point, the counts are per document so this reads wrong. I'll leave a document out of Future when it is already Late or Pending, and adjust the test. I'll push the fixes shortly. |
Mirror Odoo's activity systray layout in the tier-review dropdown so
reviewers can see -- and click into -- three buckets per model
instead of just one "Pending" column.
- ``Late`` (red, hidden when 0 only via greyed style): pending reviews
older than ``base_tier_validation.late_after_days`` system parameter
(default 7). The reviewer should prioritise these to avoid blocking
downstream work.
- ``Pending``: pending reviews within the threshold. Standard "act
today" work; what the systray showed before.
- ``Future`` (only rendered when count > 0): waiting reviews where the
current user is assigned as reviewer but the sequence has not yet
promoted the review to pending. "What is incoming for me".
The headline systray badge now reflects late + pending (the work the
reviewer must act on now); future is a heads-up and is intentionally
excluded so it doesn't inflate the urgency badge.
Backend: ``res.users.review_user_count`` returns per-model dicts with
``late_count`` / ``pending_count`` / ``future_count`` plus the
matching record id lists, so clicking a bucket in the systray opens
exactly those records via a server-supplied ``[("id", "in", ids)]``
domain rather than re-running the lookup client-side.
Frontend: the OWL ``tier_review_menu`` template renders the three
columns in the order Late | Pending | Future. Clicking each calls
``openReviewGroup(group, bucket)`` which composes the action's
domain off the bucket-specific id list and labels the breadcrumb
accordingly.
Test exercises both the "fresh" and "older than threshold" cases by
``freeze_time``-ing forward past the late cutoff and asserting the
counts shift from ``pending_count`` into ``late_count`` while the
sequenced waiting review stays in ``future_count``.
…n the systray Mirror Odoo's activity systray pattern where the dropdown ends with a "View all activities" link to the global activity dashboard. The tier-review dropdown gets the same footer when a downstream module exposes a global review dashboard. The hook is a new ``tier_review_dashboard_action`` method on ``res.users`` that returns ``False`` by default and can be overridden by a module shipping a dashboard (e.g. ``base_tier_validation_board``) to return a serialised ``ir.actions.act_window`` dict. The systray fetches the action alongside the bucket counts in parallel and renders the link conditionally on the response. No additional RPC round-trip cost beyond the single ``Promise.all``. When no dashboard is exposed (default install, no board module), the link is simply not rendered -- the dropdown behaves exactly as before.
The systray late/pending/future buckets are driven by the base_tier_validation.late_after_days system parameter (default 7), but it was not mentioned in the readme. Document it under CONFIGURE so integrators know how to tune the Late threshold.
- fall back to the default on an invalid late_after_days - clicking the document type opens Late + Pending, or Future when there is nothing to act on yet - only show "No reviews to do." when there are no reviews at all - leave a document out of Future when it is already Late or Pending
d3965e5 to
5c1a8a2
Compare

Summary
Mirror Odoo's activity systray layout in the tier-review dropdown so reviewers see three buckets per model instead of just one "Pending" column.
base_tier_validation.late_after_days(default7)The headline systray badge now reflects late + pending (work the reviewer must act on now). Future is a heads-up only and is intentionally excluded from the badge so it doesn't inflate urgency.
How it ties to the activity systray pattern
Reference (Odoo's standard activity menu):
Before this pr:

This PR produces:
Tier reviews don't have an explicit due date, so "Today" becomes "Pending (within threshold)" — every other column maps cleanly.
Click-through
Each bucket's record IDs are computed server-side in
review_user_countand shipped to the OWL component. Clicking opens an act_window withdomain = [("id", "in", <bucket_ids>)]— labels the breadcrumb with the bucket name so the user knows which slice they're looking at.Configuration
System parameter
base_tier_validation.late_after_dayscontrols the late threshold globally. Default7. Set per-installation via Settings → Technical → Parameters → System Parameters.Chose a system parameter over per-definition (
tier.definition.notify_reminder_delay) because:Test plan
New test
test_systray_counter_late_pending_future_buckets:late_count=0, pending_count=1, future_count=1at "now".freeze_time-s forward past the 7-day threshold → verifies the count shifts tolate_count=1, pending_count=0, future_count=1.Existing
test_10_systray_counterkeeps passing — thepending_countkey is preserved with the same semantics for fresh reviews.Companion PRs
This builds on #23 (icon refresh)