Skip to content

Commit 9e7eb4b

Browse files
fix(spp_change_request_v2): fix test failures from vocabulary protection and missing CR types
- Remove deleted default_types.xml and stale manifest comment, since CR types are now provided by spp_cr_types_base/spp_cr_types_advanced - Add get_or_create_cr_type() and get_or_create_membership_kind() test helpers in common.py so tests create required data dynamically instead of relying on env.ref() lookups that fail without type modules installed - Add CRTestCase base class with shared setup for registrants and CR creation - Fix get_or_create_membership_kind() to pass is_local=True when creating codes on system vocabularies (required by spp_vocabulary protection) - Fix AttributeError in add_member and transfer_member preview strategies: spp.vocabulary.code uses 'display' field, not 'name' - Remove redundant skipTest guards across all strategy test files - Fix JS/XML formatting (prettier)
1 parent ed508f8 commit 9e7eb4b

File tree

141 files changed

+3786
-4312
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

141 files changed

+3786
-4312
lines changed

endpoint_route_handler/README.rst

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -119,31 +119,31 @@ You can see a real life example on shopfloor.app model.
119119
Known issues / Roadmap
120120
======================
121121

122-
- add api docs helpers
122+
- add api docs helpers
123123

124-
- allow multiple HTTP methods on the same endpoint
124+
- allow multiple HTTP methods on the same endpoint
125125

126-
- multiple values for route and methods
126+
- multiple values for route and methods
127127

128-
keep the same in the ui for now, later own we can imagine a
129-
multi-value selection or just add text field w/ proper validation
130-
and cleanup
128+
keep the same in the ui for now, later own we can imagine a
129+
multi-value selection or just add text field w/ proper validation
130+
and cleanup
131131

132-
remove the route field in the table of endpoint_route
132+
remove the route field in the table of endpoint_route
133133

134-
support a comma separated list of routes maybe support comma
135-
separated list of methods use only routing.routes for generating
136-
the rule sort and freeze its values to update the endpoint hash
134+
support a comma separated list of routes maybe support comma
135+
separated list of methods use only routing.routes for generating
136+
the rule sort and freeze its values to update the endpoint hash
137137

138-
catch dup route exception on the sync to detect duplicated routes
139-
and use the endpoint_hash to retrieve the real record (note: we
140-
could store more info in the routing information which will stay
141-
in the map)
138+
catch dup route exception on the sync to detect duplicated routes
139+
and use the endpoint_hash to retrieve the real record (note: we
140+
could store more info in the routing information which will stay in
141+
the map)
142142

143-
for customizing the rule behavior the endpoint the hook is to
144-
override the registry lookup
143+
for customizing the rule behavior the endpoint the hook is to
144+
override the registry lookup
145145

146-
make EndpointRule class overridable on the registry
146+
make EndpointRule class overridable on the registry
147147

148148
NOTE in v16 we won't care anymore about odoo controller so the lookup of
149149
the controller can be simplified to a basic py obj that holds the
@@ -170,8 +170,8 @@ Authors
170170
Contributors
171171
------------
172172

173-
- Simone Orsi <simone.orsi@camptocamp.com>
174-
- Nguyen Minh Chien <chien@trobz.com>
173+
- Simone Orsi <simone.orsi@camptocamp.com>
174+
- Nguyen Minh Chien <chien@trobz.com>
175175

176176
Maintainers
177177
-----------

endpoint_route_handler/static/description/index.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -482,8 +482,8 @@ <h2><a class="toc-backref" href="#toc-entry-4">Known issues / Roadmap</a></h2>
482482
the rule sort and freeze its values to update the endpoint hash</p>
483483
<p>catch dup route exception on the sync to detect duplicated routes
484484
and use the endpoint_hash to retrieve the real record (note: we
485-
could store more info in the routing information which will stay
486-
in the map)</p>
485+
could store more info in the routing information which will stay in
486+
the map)</p>
487487
<p>for customizing the rule behavior the endpoint the hook is to
488488
override the registry lookup</p>
489489
<p>make EndpointRule class overridable on the registry</p>

eslint.config.cjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -207,7 +207,7 @@ const config = [
207207
},
208208
},
209209
{
210-
files: ["**/*.esm.js", "**/*test.js"],
210+
files: ["**/*.esm.js", "**/*test.js", "**/static/src/**/*.js"],
211211

212212
languageOptions: {
213213
ecmaVersion: 2024,

spp_alerts/README.rst

Lines changed: 28 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -35,27 +35,27 @@ domain-specific conditions.
3535
Key Capabilities
3636
~~~~~~~~~~~~~~~~
3737

38-
- Track alert lifecycle through state machine: active → acknowledged →
39-
resolved
40-
- Record resolution details including user, timestamp, and notes
41-
- Classify alerts by type using ``spp.vocabulary`` codes (threshold,
42-
expiry, deadline, manual, system)
43-
- Prioritize alerts as low, medium, high, or critical
44-
- Send mail notifications via ``mail.thread`` integration
45-
- Auto-generate alert references in ALR-YYYY-NNNNN format
38+
- Track alert lifecycle through state machine: active → acknowledged →
39+
resolved
40+
- Record resolution details including user, timestamp, and notes
41+
- Classify alerts by type using ``spp.vocabulary`` codes (threshold,
42+
expiry, deadline, manual, system)
43+
- Prioritize alerts as low, medium, high, or critical
44+
- Send mail notifications via ``mail.thread`` integration
45+
- Auto-generate alert references in ALR-YYYY-NNNNN format
4646

4747
Key Models
4848
~~~~~~~~~~
4949

50-
+--------------------+------------------------------------------------+
51-
| Model | Description |
52-
+====================+================================================+
53-
| ``spp.alert`` | Alert instance with state tracking and |
54-
| | resolution workflow |
55-
+--------------------+------------------------------------------------+
56-
| ``spp.alert.rule`` | Rule configuration for monitoring criteria and |
57-
| | thresholds |
58-
+--------------------+------------------------------------------------+
50+
+--------------------+-------------------------------------------------+
51+
| Model | Description |
52+
+====================+=================================================+
53+
| ``spp.alert`` | Alert instance with state tracking and |
54+
| | resolution workflow |
55+
+--------------------+-------------------------------------------------+
56+
| ``spp.alert.rule`` | Rule configuration for monitoring criteria and |
57+
| | thresholds |
58+
+--------------------+-------------------------------------------------+
5959

6060
Configuration
6161
~~~~~~~~~~~~~
@@ -71,9 +71,9 @@ After installing:
7171
UI Location
7272
~~~~~~~~~~~
7373

74-
- **Menu**: Settings > Technical > Alerts > Alerts
75-
- **Configuration**: Settings > Technical > Alerts > Alert Rules
76-
- **Form Tabs**: Details, Resolution (alerts); Thresholds (rules)
74+
- **Menu**: Settings > Technical > Alerts > Alerts
75+
- **Configuration**: Settings > Technical > Alerts > Alert Rules
76+
- **Form Tabs**: Details, Resolution (alerts); Thresholds (rules)
7777

7878
Security
7979
~~~~~~~~
@@ -89,14 +89,14 @@ Group Access
8989
Extension Points
9090
~~~~~~~~~~~~~~~~
9191

92-
- Inherit ``spp.alert`` to add domain-specific fields (e.g., stock
93-
levels, document references)
94-
- Inherit ``spp.alert.rule`` to add custom threshold or evaluation
95-
criteria
96-
- Override ``action_acknowledge()`` or ``action_resolve()`` to add
97-
custom workflow steps
98-
- Consumer modules implement alert checking via cron jobs or event
99-
handlers that evaluate rules and call ``create()`` on ``spp.alert``
92+
- Inherit ``spp.alert`` to add domain-specific fields (e.g., stock
93+
levels, document references)
94+
- Inherit ``spp.alert.rule`` to add custom threshold or evaluation
95+
criteria
96+
- Override ``action_acknowledge()`` or ``action_resolve()`` to add
97+
custom workflow steps
98+
- Consumer modules implement alert checking via cron jobs or event
99+
handlers that evaluate rules and call ``create()`` on ``spp.alert``
100100

101101
Dependencies
102102
~~~~~~~~~~~~

spp_api_v2/README.rst

Lines changed: 59 additions & 59 deletions
Original file line numberDiff line numberDiff line change
@@ -31,68 +31,68 @@ all identifiers use namespace URIs for global interoperability.
3131
Key Capabilities
3232
----------------
3333

34-
- **OAuth 2.0 Authentication**: Client credentials flow with
35-
scrypt-hashed secrets, scoped access
36-
- **Consent-Based Access Control**: All reads require active consent,
37-
filtered by organization type
38-
- **External Identifiers Only**: Namespace URIs for lookups, vocabulary
39-
IDs for coded values
40-
- **Source Tracking**: Records data provenance per ADR-008
41-
- **Extension Registry**: Domain modules register custom fields via
42-
``spp.api.extension``
43-
- **Batch Operations**: Create/update multiple registrants per request
34+
- **OAuth 2.0 Authentication**: Client credentials flow with
35+
scrypt-hashed secrets, scoped access
36+
- **Consent-Based Access Control**: All reads require active consent,
37+
filtered by organization type
38+
- **External Identifiers Only**: Namespace URIs for lookups, vocabulary
39+
IDs for coded values
40+
- **Source Tracking**: Records data provenance per ADR-008
41+
- **Extension Registry**: Domain modules register custom fields via
42+
``spp.api.extension``
43+
- **Batch Operations**: Create/update multiple registrants per request
4444

4545
Key Models
4646
----------
4747

48-
+---------------------------+-----------------------------------------+
49-
| Model | Description |
50-
+===========================+=========================================+
51-
| ``spp.api.client`` | OAuth 2.0 credentials, organization |
52-
| | verification |
53-
+---------------------------+-----------------------------------------+
54-
| ``spp.api.client.scope`` | Resource/action permissions |
55-
+---------------------------+-----------------------------------------+
56-
| ``spp.api.path`` | Endpoint configuration and filters |
57-
+---------------------------+-----------------------------------------+
58-
| ``spp.api.path.filter`` | Field-level filter configurations |
59-
+---------------------------+-----------------------------------------+
60-
| ``spp.api.filter.preset`` | Saved filter combinations |
61-
+---------------------------+-----------------------------------------+
62-
| ``spp.api.extension`` | Domain field registry |
63-
+---------------------------+-----------------------------------------+
64-
| ``spp.consent.scope`` | Resource types per consent |
65-
+---------------------------+-----------------------------------------+
48+
+---------------------------+------------------------------------------+
49+
| Model | Description |
50+
+===========================+==========================================+
51+
| ``spp.api.client`` | OAuth 2.0 credentials, organization |
52+
| | verification |
53+
+---------------------------+------------------------------------------+
54+
| ``spp.api.client.scope`` | Resource/action permissions |
55+
+---------------------------+------------------------------------------+
56+
| ``spp.api.path`` | Endpoint configuration and filters |
57+
+---------------------------+------------------------------------------+
58+
| ``spp.api.path.filter`` | Field-level filter configurations |
59+
+---------------------------+------------------------------------------+
60+
| ``spp.api.filter.preset`` | Saved filter combinations |
61+
+---------------------------+------------------------------------------+
62+
| ``spp.api.extension`` | Domain field registry |
63+
+---------------------------+------------------------------------------+
64+
| ``spp.consent.scope`` | Resource types per consent |
65+
+---------------------------+------------------------------------------+
6666

6767
UI Location
6868
-----------
6969

7070
Navigate to **Registry > Configuration > API V2** for all API
7171
configuration. Available submenus:
7272

73-
- **API Clients** - Manage OAuth credentials and organization
74-
verification
75-
- **API Extensions** - View registered custom field extensions
76-
- **API Paths** - Configure available endpoints and static filters
77-
- **API Filters** - Define queryable field filters per path
78-
- **Filter Presets** - Create named filter combinations
73+
- **API Clients** - Manage OAuth credentials and organization
74+
verification
75+
- **API Extensions** - View registered custom field extensions
76+
- **API Paths** - Configure available endpoints and static filters
77+
- **API Filters** - Define queryable field filters per path
78+
- **Filter Presets** - Create named filter combinations
7979

8080
**API Client Form Tabs:**
8181

82-
- **Consent & Security** - Consent requirements, legal basis,
83-
organization type verification
84-
- **Scopes** - Resource/action permissions and program restrictions
85-
- **Description** - Client documentation
82+
- **Consent & Security** - Consent requirements, legal basis,
83+
organization type verification
84+
- **Scopes** - Resource/action permissions and program restrictions
85+
- **Description** - Client documentation
8686

8787
**API Extension Form Tabs:**
8888

89-
- **Fields** - Registered custom fields from domain modules
90-
- **JSON Schema** - Auto-generated schema for extension fields
89+
- **Fields** - Registered custom fields from domain modules
90+
- **JSON Schema** - Auto-generated schema for extension fields
9191

9292
**API Path Form Tabs:**
9393

94-
- **Filters** - Field-level filter configurations (inline editable)
95-
- **Presets** - Saved filter combinations (inline editable)
94+
- **Filters** - Field-level filter configurations (inline editable)
95+
- **Presets** - Saved filter combinations (inline editable)
9696

9797
Configuration
9898
-------------
@@ -111,27 +111,27 @@ API endpoints available at ``/api/v2/`` (token endpoint:
111111
Security
112112
--------
113113

114-
+--------------------------+------------------------------------------+
115-
| Group | Access |
116-
+==========================+==========================================+
117-
| ``group_api_v2_viewer`` | Read-only: all API configuration and |
118-
| | consent |
119-
+--------------------------+------------------------------------------+
120-
| ``group_api_v2_officer`` | Read/Write: all models (no |
121-
| | create/delete), full CRUD on consent |
122-
| | scopes |
123-
+--------------------------+------------------------------------------+
124-
| ``group_api_v2_manager`` | Full CRUD: clients, scopes, paths, |
125-
| | filters, presets, extensions; |
126-
| | Read/Write/Create on consent (no delete) |
127-
+--------------------------+------------------------------------------+
114+
+--------------------------+-------------------------------------------+
115+
| Group | Access |
116+
+==========================+===========================================+
117+
| ``group_api_v2_viewer`` | Read-only: all API configuration and |
118+
| | consent |
119+
+--------------------------+-------------------------------------------+
120+
| ``group_api_v2_officer`` | Read/Write: all models (no |
121+
| | create/delete), full CRUD on consent |
122+
| | scopes |
123+
+--------------------------+-------------------------------------------+
124+
| ``group_api_v2_manager`` | Full CRUD: clients, scopes, paths, |
125+
| | filters, presets, extensions; |
126+
| | Read/Write/Create on consent (no delete) |
127+
+--------------------------+-------------------------------------------+
128128

129129
Extension Points
130130
----------------
131131

132-
- Inherit ``spp.api.extension`` to register custom fields
133-
- Override ``_get_fastapi_routers()`` in ``fastapi.endpoint`` for
134-
custom endpoints
132+
- Inherit ``spp.api.extension`` to register custom fields
133+
- Override ``_get_fastapi_routers()`` in ``fastapi.endpoint`` for custom
134+
endpoints
135135

136136
Dependencies
137137
------------

spp_api_v2/static/description/index.html

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -398,8 +398,8 @@ <h2>Key Capabilities</h2>
398398
<h2>Key Models</h2>
399399
<table border="1" class="docutils">
400400
<colgroup>
401-
<col width="40%" />
402-
<col width="60%" />
401+
<col width="39%" />
402+
<col width="61%" />
403403
</colgroup>
404404
<thead valign="bottom">
405405
<tr><th class="head">Model</th>
@@ -509,8 +509,8 @@ <h2>Security</h2>
509509
<h2>Extension Points</h2>
510510
<ul class="simple">
511511
<li>Inherit <tt class="docutils literal">spp.api.extension</tt> to register custom fields</li>
512-
<li>Override <tt class="docutils literal">_get_fastapi_routers()</tt> in <tt class="docutils literal">fastapi.endpoint</tt> for
513-
custom endpoints</li>
512+
<li>Override <tt class="docutils literal">_get_fastapi_routers()</tt> in <tt class="docutils literal">fastapi.endpoint</tt> for custom
513+
endpoints</li>
514514
</ul>
515515
</div>
516516
<div class="section" id="dependencies">

0 commit comments

Comments
 (0)