Skip to content

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

Merged
OCA-git-bot merged 2 commits intoOCA:16.0from
acsone:16-fix-shopfloor_base-routing
Apr 14, 2026
Merged

[16.0][FIX] shopfloor_base: fix _registered_endpoint_rule_keys#1136
OCA-git-bot merged 2 commits intoOCA:16.0from
acsone:16-fix-shopfloor_base-routing

Conversation

@nicolas-delbovier-acsone
Copy link
Copy Markdown

@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
Copy Markdown
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
@sebalix
Copy link
Copy Markdown

sebalix commented Apr 14, 2026

/ocabot merge patch

@OCA-git-bot
Copy link
Copy Markdown
Contributor

Hey, thanks for contributing! Proceeding to merge this for you.
Prepared branch 16.0-ocabot-merge-pr-1136-by-sebalix-bump-patch, awaiting test results.

@OCA-git-bot OCA-git-bot merged commit 8ad2725 into OCA:16.0 Apr 14, 2026
6 of 7 checks passed
@OCA-git-bot
Copy link
Copy Markdown
Contributor

Congratulations, your PR was merged at ad80a9a. Thanks a lot for contributing to OCA. ❤️

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants