Commit 9cef192
committed
fix: harden spp_alerts module for public release
Address 78 findings from staff engineer and UX expert reviews:
Security:
- Remove user browse record from safe_eval domain context (SE-1)
- Add _check_company_auto and check_company on rule_id (SE-20)
- Add domain filter validation constraint on save (SE-21)
Bug fixes:
- Fix priority ordering: add priority_sequence stored computed field
so alerts sort critical > high > medium > low (SE-22)
- Add state guard on action_acknowledge (only active alerts) (SE-5)
- Add state guard on action_resolve (already-resolved raises) (SE-5)
- Remove resolution_notes required attribute that blocked form saves
Models:
- Add mail.thread on alert rules with tracking on key fields (SE-24)
- Add res_name computed field for source record display name (UX-5)
- Add action_view_source, action_view_related_alerts methods
- Add model_name related field for domain widget (SE-R2-8)
- Add alert_count computed field with action_view_alerts (UX-14)
- Extract _domain_eval_context helper to remove duplication
- Fix _prepare_alert_vals to conditionally include threshold_value
- Use named placeholders in translation strings
Views:
- Add kanban view with state grouping, progressbar, dropdown actions
- Add stat buttons: View Source, Related Alerts on alert form
- Add stat button: alert count on rule form
- Add resolution guidance banner on Resolution tab
- Add domain widget for rule filter configuration
- Add chatter on rule form
- Add named groups throughout for downstream extensibility
- Fix group-by to use <group name="groupby"> (Odoo 19)
- Fix Resolve button visibility for resolve-from-active flow
- Add hotkeys, sample data, decorations, optional columns
- Use fully qualified group references in all views
Tests:
- Replace skipTest guards with env.ref for vocab codes
- Add 29 new tests (104 total, ~99% model coverage)
- Fix 2 tests broken by new domain validation constraint
Description:
- Rewrite DESCRIPTION.md to match actual implementation
- Rename ACL entry IDs to follow access_{model}_{group} convention
- Remove empty assets from manifest1 parent 9c2376e commit 9cef192
14 files changed
Lines changed: 886 additions & 520 deletions
File tree
- spp_alerts
- models
- readme
- security
- static/description
- tests
- views
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
23 | 23 | | |
24 | 24 | | |
25 | 25 | | |
26 | | - | |
27 | | - | |
28 | | - | |
29 | | - | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
30 | 29 | | |
31 | 30 | | |
32 | 31 | | |
33 | 32 | | |
34 | | - | |
35 | | - | |
36 | | - | |
37 | | - | |
38 | | - | |
39 | | - | |
40 | | - | |
41 | | - | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
42 | 46 | | |
43 | 47 | | |
44 | 48 | | |
| |||
47 | 51 | | |
48 | 52 | | |
49 | 53 | | |
50 | | - | |
| 54 | + | |
51 | 55 | | |
52 | | - | |
53 | | - | |
| 56 | + | |
| 57 | + | |
54 | 58 | | |
55 | 59 | | |
56 | 60 | | |
| |||
59 | 63 | | |
60 | 64 | | |
61 | 65 | | |
62 | | - | |
63 | | - | |
64 | | - | |
65 | | - | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
66 | 69 | | |
67 | 70 | | |
68 | 71 | | |
69 | 72 | | |
70 | 73 | | |
71 | 74 | | |
72 | | - | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
73 | 79 | | |
74 | 80 | | |
75 | 81 | | |
76 | 82 | | |
77 | | - | |
78 | | - | |
79 | | - | |
80 | | - | |
81 | | - | |
82 | | - | |
83 | | - | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
84 | 93 | | |
85 | 94 | | |
86 | 95 | | |
87 | 96 | | |
88 | | - | |
89 | | - | |
90 | | - | |
91 | | - | |
92 | | - | |
93 | | - | |
94 | | - | |
95 | | - | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
96 | 104 | | |
97 | 105 | | |
98 | 106 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
32 | 32 | | |
33 | 33 | | |
34 | 34 | | |
35 | | - | |
36 | 35 | | |
37 | 36 | | |
38 | 37 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
9 | 16 | | |
10 | 17 | | |
11 | 18 | | |
| |||
25 | 32 | | |
26 | 33 | | |
27 | 34 | | |
28 | | - | |
| 35 | + | |
29 | 36 | | |
| 37 | + | |
30 | 38 | | |
31 | 39 | | |
32 | 40 | | |
| |||
47 | 55 | | |
48 | 56 | | |
49 | 57 | | |
| 58 | + | |
| 59 | + | |
50 | 60 | | |
51 | 61 | | |
52 | 62 | | |
| |||
69 | 79 | | |
70 | 80 | | |
71 | 81 | | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
72 | 92 | | |
73 | 93 | | |
74 | 94 | | |
| |||
102 | 122 | | |
103 | 123 | | |
104 | 124 | | |
| 125 | + | |
105 | 126 | | |
106 | 127 | | |
107 | 128 | | |
| |||
120 | 141 | | |
121 | 142 | | |
122 | 143 | | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
123 | 150 | | |
124 | 151 | | |
125 | 152 | | |
| |||
164 | 191 | | |
165 | 192 | | |
166 | 193 | | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
| 209 | + | |
| 210 | + | |
| 211 | + | |
| 212 | + | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
167 | 216 | | |
168 | 217 | | |
169 | 218 | | |
| |||
180 | 229 | | |
181 | 230 | | |
182 | 231 | | |
| 232 | + | |
| 233 | + | |
| 234 | + | |
183 | 235 | | |
| 236 | + | |
| 237 | + | |
| 238 | + | |
184 | 239 | | |
185 | 240 | | |
186 | 241 | | |
| |||
194 | 249 | | |
195 | 250 | | |
196 | 251 | | |
197 | | - | |
| 252 | + | |
198 | 253 | | |
| 254 | + | |
| 255 | + | |
199 | 256 | | |
| 257 | + | |
| 258 | + | |
200 | 259 | | |
201 | 260 | | |
202 | 261 | | |
| |||
210 | 269 | | |
211 | 270 | | |
212 | 271 | | |
| 272 | + | |
| 273 | + | |
| 274 | + | |
| 275 | + | |
| 276 | + | |
| 277 | + | |
| 278 | + | |
| 279 | + | |
| 280 | + | |
| 281 | + | |
| 282 | + | |
| 283 | + | |
| 284 | + | |
| 285 | + | |
| 286 | + | |
| 287 | + | |
| 288 | + | |
| 289 | + | |
| 290 | + | |
| 291 | + | |
| 292 | + | |
| 293 | + | |
| 294 | + | |
| 295 | + | |
| 296 | + | |
| 297 | + | |
| 298 | + | |
| 299 | + | |
| 300 | + | |
| 301 | + | |
| 302 | + | |
| 303 | + | |
| 304 | + | |
| 305 | + | |
| 306 | + | |
0 commit comments