Repository navigation
[16.0][IMP] shopfloor: multi company - #1290
Merged
Merged
Conversation
Contributor
|
Hi @simahawk, @sebalix, @mmequignon, @TDu, @jbaudoux, |
This was referenced Oct 2, 2026
Author
Author
This was referenced Oct 2, 2026
nicolas-delbovier-acsone
approved these changes
Oct 2, 2026
jbaudoux
approved these changes
Oct 5, 2026
mt-software-de
force-pushed
the
16-shopfloor-multi-company
branch
from
October 6, 2026 11:05
5afae3b to
c1b855e
Compare
Author
|
@jbaudoux This is now ready to merge. |
Contributor
|
/ocabot merge minor |
Contributor
|
Hey, thanks for contributing! Proceeding to merge this for you. |
Contributor
|
Congratulations, your PR was merged at a9d4c67. Thanks a lot for contributing to OCA. ❤️ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Make the shopfloor services work with the companies of the current menu, for the whole request.
This replaces the approach from #1133 (14.0) and its forward port #1142, following the review in #1133 (comment). Instead of overriding
envon thebase.shopfloor.processcomponent,allowed_company_idsis now set once on the request env in the controller.shopfloor_base
shopfloor.menu._get_allowed_companies(). It returns no companies by default, meaning no restriction.ShopfloorControlleroverrides the new base_rest hook_get_collection_env_context(). It reads the menu from theSERVICE-CTX-MENU-IDheader and setsallowed_company_idsto the menu's companies that the user belongs to. If the header is missing or invalid, the context is left untouched; the services still validate the header themselves.shopfloor
_get_allowed_companies()returns the companies of the menu's picking types.Depends on:
Supersedes #1142.
cc @simahawk @nicolas-delbovier-acsone @jbaudoux