-
-
Notifications
You must be signed in to change notification settings - Fork 196
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
[14.0][IMP] shopfloor_base: Propagate the shopfloor.app to actions #960
[14.0][IMP] shopfloor_base: Propagate the shopfloor.app to actions #960
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@mt-software-de sorry, this fell completely off my radar :)
if component_instance.collection._name == "shopfloor.app": | ||
kwargs["app"] = component_instance.collection |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would add an explicit arg app=None
and then
if component_instance.collection._name == "shopfloor.app": | |
kwargs["app"] = component_instance.collection | |
if not app and component_instance.collection._name == "shopfloor.app": | |
app = component_instance.collection | |
kwargs["app"] = app |
Then you can pass the app also from the actions class.
And we should probably add it to _propagate_kwargs
.
You could also add work_context.app
in the __init___
of the base service class.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I changed it.
ad837d9
to
8895807
Compare
/ocabot merge minor |
This PR looks fantastic, let's merge it! |
Congratulations, your PR was merged at 6120b8f. Thanks a lot for contributing to OCA. ❤️ |
At the moment there is no property on the actions which represents the app.
Since i'm extending right now the scan everything screens, i need to know the warehouse.
Because by scanning a product i want to show the quants. But not all quants only the configured ones on the app.
The warehouse would then be reachable by
self.work.app.profile_ids.menu_ids.picking_type_ids.warehouse_id
@simahawk could you maybe give some more information about this?
Why was this f6f54b0 necessary?
Would i be a problem to set the actions_collection like this
actions_collection = collection or component_instance.collection
cc @jbaudoux