From 1ef9c795ae5f33e6ccfb80634e7b3c0d366f9d3f Mon Sep 17 00:00:00 2001 From: Jose Zambudio Date: Mon, 26 Jan 2026 11:15:42 +0100 Subject: [PATCH 1/2] style(pre-commit): applying styles --- endpoint_route_handler/README.rst | 38 +++++++++---------- .../static/description/index.html | 4 +- 2 files changed, 21 insertions(+), 21 deletions(-) diff --git a/endpoint_route_handler/README.rst b/endpoint_route_handler/README.rst index 7c0573f3..bbe8ffe0 100644 --- a/endpoint_route_handler/README.rst +++ b/endpoint_route_handler/README.rst @@ -116,31 +116,31 @@ You can see a real life example on shopfloor.app model. Known issues / Roadmap ====================== -- add api docs helpers +- add api docs helpers -- allow multiple HTTP methods on the same endpoint +- allow multiple HTTP methods on the same endpoint -- multiple values for route and methods +- multiple values for route and methods - keep the same in the ui for now, later own we can imagine a - multi-value selection or just add text field w/ proper validation - and cleanup + keep the same in the ui for now, later own we can imagine a + multi-value selection or just add text field w/ proper validation + and cleanup - remove the route field in the table of endpoint_route + remove the route field in the table of endpoint_route - support a comma separated list of routes maybe support comma - separated list of methods use only routing.routes for generating - the rule sort and freeze its values to update the endpoint hash + support a comma separated list of routes maybe support comma + separated list of methods use only routing.routes for generating + the rule sort and freeze its values to update the endpoint hash - catch dup route exception on the sync to detect duplicated routes - and use the endpoint_hash to retrieve the real record (note: we - could store more info in the routing information which will stay - in the map) + catch dup route exception on the sync to detect duplicated routes + and use the endpoint_hash to retrieve the real record (note: we + could store more info in the routing information which will stay in + the map) - for customizing the rule behavior the endpoint the hook is to - override the registry lookup + for customizing the rule behavior the endpoint the hook is to + override the registry lookup - make EndpointRule class overridable on the registry + make EndpointRule class overridable on the registry NOTE in v16 we won't care anymore about odoo controller so the lookup of the controller can be simplified to a basic py obj that holds the @@ -167,8 +167,8 @@ Authors Contributors ------------ -- Simone Orsi -- Nguyen Minh Chien +- Simone Orsi +- Nguyen Minh Chien Maintainers ----------- diff --git a/endpoint_route_handler/static/description/index.html b/endpoint_route_handler/static/description/index.html index a2e619ca..49aff7de 100644 --- a/endpoint_route_handler/static/description/index.html +++ b/endpoint_route_handler/static/description/index.html @@ -471,8 +471,8 @@

Known issues / Roadmap

the rule sort and freeze its values to update the endpoint hash

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

+could store more info in the routing information which will stay in +the map)

for customizing the rule behavior the endpoint the hook is to override the registry lookup

make EndpointRule class overridable on the registry

From 17ab347fe8b22626146c89d2b45aa26dbc0d077c Mon Sep 17 00:00:00 2001 From: Jose Zambudio Date: Mon, 26 Jan 2026 11:16:51 +0100 Subject: [PATCH 2/2] perf: remove redundant index on endpoint_route_handler_tool --- endpoint_route_handler/__manifest__.py | 2 +- .../migrations/17.0.1.0.3/pre-migration.py | 7 +++++++ endpoint_route_handler/models/endpoint_route_handler.py | 1 - 3 files changed, 8 insertions(+), 2 deletions(-) create mode 100644 endpoint_route_handler/migrations/17.0.1.0.3/pre-migration.py diff --git a/endpoint_route_handler/__manifest__.py b/endpoint_route_handler/__manifest__.py index b2658e55..037f81b4 100644 --- a/endpoint_route_handler/__manifest__.py +++ b/endpoint_route_handler/__manifest__.py @@ -4,7 +4,7 @@ { "name": "Endpoint route handler", "summary": """Provide mixin and tool to generate custom endpoints on the fly.""", - "version": "17.0.1.0.2", + "version": "17.0.1.0.3", "license": "LGPL-3", "development_status": "Beta", "author": "Camptocamp,Odoo Community Association (OCA)", diff --git a/endpoint_route_handler/migrations/17.0.1.0.3/pre-migration.py b/endpoint_route_handler/migrations/17.0.1.0.3/pre-migration.py new file mode 100644 index 00000000..06c9d154 --- /dev/null +++ b/endpoint_route_handler/migrations/17.0.1.0.3/pre-migration.py @@ -0,0 +1,7 @@ +from openupgradelib import openupgrade + + +@openupgrade.migrate() +def migrate(env, _version): + # Remove redundant index on endpoint_route_handler_tool + env.cr.execute("DROP INDEX IF EXISTS endpoint_route_handler_tool__route_index") diff --git a/endpoint_route_handler/models/endpoint_route_handler.py b/endpoint_route_handler/models/endpoint_route_handler.py index cb757295..2dab945b 100644 --- a/endpoint_route_handler/models/endpoint_route_handler.py +++ b/endpoint_route_handler/models/endpoint_route_handler.py @@ -19,7 +19,6 @@ class EndpointRouteHandler(models.AbstractModel): name = fields.Char(required=True) route = fields.Char( required=True, - index=True, compute="_compute_route", inverse="_inverse_route", readonly=False,