-
-
Notifications
You must be signed in to change notification settings - Fork 195
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
[16.0] shopfloor: location_content_transfer: get_work additional domain and sort key. #917
[16.0] shopfloor: location_content_transfer: get_work additional domain and sort key. #917
Conversation
This comment was marked as outdated.
This comment was marked as outdated.
af89661
to
6ccbfa5
Compare
e56b453
to
e05e7aa
Compare
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.
Some remarks
30deba0
to
e9e1549
Compare
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 still don't get the purpose of enforce_picking_types
:/
@jbaudoux If I remove the possibility to search for picking in an other picking type than the one provided by the menu if specified, I'm no more able to support the use case in the location_content_transfer scenario when content has different picking type than menu, and the menu is configured with the option to unreserve. In such a case, content must be unreserved, new moves created and the previous content re-reserved. That why I need this new |
e9e1549
to
504f3a3
Compare
The priority lines count must be the sum of operations linked to a priority move, while the priority pickings count must be the sum of priority pickings.
Ensures opertations assigned to current user are always first when sorting lines
Never return operations from pickings assigned to an other user when the method is called with the parameter 'match_user' set to True
If a location is not provided we take the one from the picking type by default
The scenario now uses the 'search_move_line' action to search for operations to perform when the user requests work. This eliminates duplicate code between the scenario and the 'search_move_line' action.
For scenario using the 'search_move_line' action to get lines to work on, it's now possible to provide an additional domain and a custom sort key code when configuring menu using these scenario. This applies to the location_content_transfer scenario and partialy to the zone_picking one
b977550
to
62d227b
Compare
@jbaudoux Your last comment is now implemented into the last commit. |
62d227b
to
6c647b6
Compare
@jbaudoux done |
To disable the filtering of move line based on specific picking types, the additional parameter ‘enforce_picking_types’ had to be set to True when calling the method 'search_move_lines' of the 'hopfloor.search.move.line' action. The name of this parameter was not really relevant and its meaning conflicted with another parameter ‘enforce_package_types’. To avoid this situation, the semantics of the ‘picking_type’ parameter have been modified so that it can be explicitly stated that the search is not on a particular picking type if an empty recordset is passed as a parameter. Previously, if the parameter was None or an empty recordset, the filtering was forced on the picking types specified into the work context. Translated with DeepL.com (free version)
6c647b6
to
d3fc8c3
Compare
/ocabot merge nobump |
What a great day to merge this nice PR. Let's do it! |
Congratulations, your PR was merged at bc58cd6. Thanks a lot for contributing to OCA. ❤️ |
The initial aim of this PR is to enable the 'location_content_transfer' scenario to be configured more precisely.
It aims to:
When analysing the code, I found that there was an inconsistency between the code used to create the menu counters and the one used to find the transactions in the 'location_content_transfer' scenario. The code in the latter scenario was functionally identical to the one used for menus and zone_picking. Harmonisation work has therefore been carried out to eliminate this inconsistency.
As result, a generic solution has been put in place for scenarios using the 'search_move_line' action to find the operations to be carried out, so that the menus can be used to configure an additional domain to be applied by default and the method for sorting operations.