Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FIX] shopfloor_base: Manage correctly parameters to the next call stack #845

Merged
merged 1 commit into from
May 13, 2024

Conversation

rousseldenis
Copy link
Contributor

@rousseldenis rousseldenis added enhancement New feature or request needs review labels Feb 26, 2024
@rousseldenis rousseldenis added this to the 16.0 milestone Feb 26, 2024
@OCA-git-bot
Copy link
Contributor

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

Copy link
Contributor

@lmignon lmignon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code review + functional

@sebalix
Copy link
Contributor

sebalix commented Feb 27, 2024

Build fixed here: #849

Copy link
Contributor

@simahawk simahawk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LG.
Can you rebase?

@@ -25,10 +32,25 @@ def _process_endpoint(
collection = collection or request.env["shopfloor.app"].browse(app_id)
# TODO: in base_rest `*args` is passed based on
# the type of route (eg: /<int:id>/update)
params = kwargs
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

would you mind adding the link to the change here?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@simahawk In Odoo < 16, all the requests to a route defined on a RestController was wrapped into a HttpRestRequest by a patch of the Root.get_request
As side effect the json document was part of the kwargs passed to the _process_endpointmethod (https://github.com/OCA/rest-framework/blob/14.0/base_rest/http.py#L125) This behavior is changed into odoo > 16 by the registration of a dedicated dispatcher class to use for the routes declared with a routing type 'restapi' (https://github.com/OCA/rest-framework/blob/16.0/base_rest/http.py#L129). Since you bypass the dispatching made by base_rest and redefine your own handlers for the declared rest methods, the specific dispatcher is no more used. An other fix would be to register your handers with routing_type 'restapi'...

@OCA-git-bot
Copy link
Contributor

This PR has the approved label and has been created more than 5 days ago. It should therefore be ready to merge by a maintainer (or a PSC member if the concerned addon has no declared maintainer). 🤖

@lmignon
Copy link
Contributor

lmignon commented Mar 11, 2024

@simahawk @jbaudoux can you merge this one PLZ?

@lmignon
Copy link
Contributor

lmignon commented Apr 25, 2024

@rousseldenis Can you merge this one PLZ?

@lmignon
Copy link
Contributor

lmignon commented May 10, 2024

@simahawk Is-it possible to merge this one plz?

@rousseldenis
Copy link
Contributor Author

/ocabot merge patch

@OCA-git-bot
Copy link
Contributor

What a great day to merge this nice PR. Let's do it!
Prepared branch 16.0-ocabot-merge-pr-845-by-rousseldenis-bump-patch, awaiting test results.

@OCA-git-bot OCA-git-bot merged commit d65c6ad into OCA:16.0 May 13, 2024
6 of 7 checks passed
@OCA-git-bot
Copy link
Contributor

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

@lmignon lmignon deleted the 16.0-fix-shopfloor-base-params-dro branch May 13, 2024 07:48
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.

5 participants