From 7fdcc80bcd5fe57dc90f89856ed208281af14215 Mon Sep 17 00:00:00 2001 From: bosd <5e2fd43-d292-4c90-9d1f-74ff3436329a@anonaddy.me> Date: Tue, 12 May 2026 21:14:17 +0200 Subject: [PATCH 1/4] [IMP] base_tier_validation: UI clean-up Tier definition - The form shows at the top who reviews (Four-eyes Principle next to the reviewer group) and in what order (narrow sequence). A Review tab holds the reviewer permissions and what happens when reviewing, a Notifications tab the notifications. These named groups are where modules add their options. - Archived filter, avatar on the reviewer, name in bold, a help text on the empty list. - The reminder reads "Remind every [ ] days". Tier review - Avatars on Requested by and Done by, the status as a badge, rows coloured by status. Validation banner and systray - Icons that match the app icon: check / xmark on Validate / Reject and on the validated / rejected banners, an icon on Restart Validation, and a check-square in the systray, which no longer looks like the sales and invoicing entries. - The reviewer menu sits with the other notification menus, on the right of the systray. Tier validation exceptions: name in bold. --- .../models/tier_definition.py | 6 +- .../models/tier_validation.py | 4 +- .../readme/newsfragments/23.feature | 1 + .../static/description/index.html | 2 +- .../tier_review_menu/tier_review_menu.esm.js | 8 +- .../tier_review_menu/tier_review_menu.xml | 6 +- .../templates/tier_validation_templates.xml | 9 +- .../tests/test_tier_validation.py | 24 ++++++ .../views/tier_definition_view.xml | 83 ++++++++++++++----- .../views/tier_review_view.xml | 14 +++- .../views/tier_validation_exception_view.xml | 2 +- 11 files changed, 119 insertions(+), 40 deletions(-) create mode 100644 base_tier_validation/readme/newsfragments/23.feature diff --git a/base_tier_validation/models/tier_definition.py b/base_tier_validation/models/tier_definition.py index e9f3402b5..75ba13158 100644 --- a/base_tier_validation/models/tier_definition.py +++ b/base_tier_validation/models/tier_definition.py @@ -101,9 +101,9 @@ def _get_tier_validation_model_names(self): help="Default comment prefilled when approval comments are enabled.", ) notify_reminder_delay = fields.Integer( - string="Send reminder message on pending reviews", - help="Number of days after which a message must be posted to remind about " - "pending validation (0 = no reminder)", + string="Remind Every (Days)", + help="Remind the reviewers every this many days until the review is " + "done. Leave at 0 to send no reminder.", ) approve_sequence = fields.Boolean( string="Approve by sequence", diff --git a/base_tier_validation/models/tier_validation.py b/base_tier_validation/models/tier_validation.py index 24de2f733..381aec44b 100644 --- a/base_tier_validation/models/tier_validation.py +++ b/base_tier_validation/models/tier_validation.py @@ -200,13 +200,13 @@ def _get_to_validate_message(self): ) def _get_validated_message(self): - msg = f""" { + msg = f""" { self.env._("Operation has been validated!") }""" return self.validation_status == "validated" and msg or "" def _get_rejected_message(self): - msg = f""" { + msg = f""" { self.env._("Operation has been rejected.") }""" return self.validation_status == "rejected" and msg or "" diff --git a/base_tier_validation/readme/newsfragments/23.feature b/base_tier_validation/readme/newsfragments/23.feature new file mode 100644 index 000000000..94bda22ba --- /dev/null +++ b/base_tier_validation/readme/newsfragments/23.feature @@ -0,0 +1 @@ +Clearer tier definition form: who reviews and in what order at the top, a *Review* tab (reviewer permissions, what happens when reviewing, after review) and a *Notifications* tab, where the reminder reads *Remind every [ ] days*. The definition list hides archived definitions by default, shows reviewer avatars and has an optional *Reviewer field* column. The review lists show avatars and status badges, the definition action has an empty-state help, and the reviewer menu sits with the other notification menus in the systray. diff --git a/base_tier_validation/static/description/index.html b/base_tier_validation/static/description/index.html index 2e9108df6..04d207354 100644 --- a/base_tier_validation/static/description/index.html +++ b/base_tier_validation/static/description/index.html @@ -3,7 +3,7 @@
-