Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions fastapi/models/fastapi_endpoint.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ class FastapiEndpoint(models.Model):
"unexpecteed disk space consumption.",
default=True,
)
route_group = fields.Char(help="Use this to classify routes together", size=32)

@api.depends("root_path")
def _compute_root_path(self):
Expand Down Expand Up @@ -124,7 +125,7 @@ def _registered_endpoint_rule_keys(self):
def _routing_impacting_fields(self) -> tuple[str, ...]:
"""The list of fields requiring to refresh the mount point of the pp
into odoo if modified"""
return ("root_path", "save_http_session")
return ("root_path", "save_http_session", "route_group")

#
# end of endpoint.route.sync.mixin methods implementation
Expand Down Expand Up @@ -161,7 +162,7 @@ def _make_routing_rule(self, options=None):
key = self._endpoint_registry_route_unique_key(routing)
endpoint_hash = hash(route)
return self._endpoint_registry.make_rule(
key, route, options, routing, endpoint_hash
key, route, options, routing, endpoint_hash, route_group=self.route_group
)

def _default_endpoint_options(self):
Expand Down
1 change: 1 addition & 0 deletions fastapi/views/fastapi_endpoint.xml
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@
<group>
<group>
<field name="app" />
<field name="route_group" />
<field name="root_path" />
<field name="user_id" />
<field name="company_id" />
Expand Down
Loading