Thanks to visit codestin.com
Credit goes to Github.com

Skip to content

[16.0][FIX] shopfloor_base: fix _registered_endpoint_rule_keys#1136

Open
nicolas-delbovier-acsone wants to merge 2 commits intoOCA:16.0from
acsone:16-fix-shopfloor_base-routing
Open

[16.0][FIX] shopfloor_base: fix _registered_endpoint_rule_keys#1136
nicolas-delbovier-acsone wants to merge 2 commits intoOCA:16.0from
acsone:16-fix-shopfloor_base-routing

Conversation

@nicolas-delbovier-acsone
Copy link

@nicolas-delbovier-acsone nicolas-delbovier-acsone commented Feb 18, 2026

This PR is a partial backport of OCA/shopfloor-app#19, following up on the discussion in #1104.

Improvements & Fixes

shopfloor_base: fix _registered_endpoint_rule_keys

Corrects a TypeError where EndpointRule objects were being accessed as tuples (non-subscriptable).
This ensures that archiving an app and syncing the registry no longer triggers a crash.

Exclusions & Technical Notes

Routing Registration Fix

I have intentionally excluded the "routing registration" fix from this backport for the following reasons:

  1. Compatibility Issue: Implementing the change in Odoo 16.0 resulted in a ValueError:
    Wrong value for endpoint.route.handler.tool.route_type: 'restapi'
  2. Non-Reproducible: I was unable to reproduce the bug (unwrapped server-side exceptions leading to "undefined undefined" alerts).

@OCA-git-bot
Copy link
Contributor

Hi @simahawk, @guewen, @sebalix,
some modules you are maintaining are being modified, check this out!

This was breaking _unregister_controllers since we don't get tuples
but EndpointRule objects.

Prior to this change the call failed like

  File /odoo/external-src/shopfloor-app/shopfloor_base/models/shopfloor_app.py, line 166, in _registered_endpoint_rule_keys
    return [x[0] for x in self._registered_routes()]
            ~^^^
TypeError: 'EndpointRule' object is not subscriptable
* ensure manifest url is always the same
* improve comparison on handler options
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants