[15.0][MIG] shopfloor#446
Closed
flachica wants to merge 710 commits into
Closed
Conversation
"_id" has been replaced by *args
Since version 13.0.3.0.0 of base_rest, we have to setup registries
In the initial implementation of rest_api, the schema validators
had to be returned by methods in the same service as the method, named
after the endpoint's method with a prefix: "_validator_<method>" or
"_validator_return_<method>".
As we have a lot of endpoints methods in some services, we extracted
the validator methods in dedicated components with
"base.shopfloor.validator" and "base.shopfloor.validator.return" usages,
and methods of the same name as the endpoint's method.
With the new API, endpoints are decorated with "@restapi.method" and the
validator is defined there. Example:
@restapi.method(
[(["/<int:id>/get", "/<int:id>"], "GET")],
output_param=restapi.CerberusValidator("_get_partner_schema"),
auth="public",
)
For backward compatilibity, base_rest patches the methods not decorated
and sets the "input_param" and "output_param" to call the
"_validator_<method>" or "_validator_return_<method>":
https://github.com/OCA/rest-framework/blob/abd74cd7241d3b93054825cc3e41cb7b693c9000/base_rest/models/rest_service_registration.py#L240-L250
This change adds the extra layer that will call the validator components
when one of these methods is called.
A follow-up commit will replace the getattr by a better fix with a
change in base_rest, but meanwhile, this commit will unblock the OCA/wms
CI.
Before: when moves are processed, we were managing two cases: - if the current moves to process are all the moves remaining in a transfer, we validate the transfer - if the current moves to process are a subset of available moves of a transfer, then we put these moves to process in a new transfer which is validated. All remaining moves stay in the current transfer. After: a third case is added: - if the current moves to process are equal to all available moves of the current picking - but there are still unavailable moves to process - then we validate the current transfer as usual, which will create a backorder with remaining/unavailable moves. As this third case is very specific to Shopfloor, it has been implemented in a new StockAction component (used by all related scenarios). Now all scenarios use this new component to validate stock moves, and the `extract_and_action_done` method on `stock.move` can stay generic. The opportunity was taken to create a new method `split_unavailable_qty` on `stock.move` to put unavailable qty to a new move and update the current move to `assigned` (it was done directly in `extract_and_action_done` before).
Currently translated at 100.0% (235 of 235 strings) Translation: wms-14.0/wms-14.0-shopfloor Translate-URL: https://translation.odoo-community.org/projects/wms-14-0/wms-14-0-shopfloor/es_AR/
…idated batch Unavailable transfers could be part of a batch (following a stock inventory happening at the same time for instance), as such we have to remove such transfers from the batch picking when this one is validated. The transfers will be assigned to a new batch thereafter.
If the user starts to process a line, and for whatever reason he stops there and restarts the scenario from the beginning, he should still be able to find/recover the previous line. For that purpose we are using the `shopfloor_user_id` field on move lines (already used to manage currently processed lines in the Zone picking and Location content transfer scenarios).
When a location is scanned and several items are found ask to scan a package instead of saying that the location is empty.
* active arg can be a callable * fail only if 'mandatory' arg is True
The warehouse of the picking type only should be used.
* It allows grouping and providing stats per menu/profile (example: number of move lines to process for a profile). * A migration script changes the relation and duplicates a menu if it had several profiles
Both 'Single pack transfer' and 'Location content transfer' are fixed.
Refactor to reduce method complexity. In case some pickings are split, only split pickings had unreserved quantity extracted.
Extract processed move lines in a split order like in the location content transfer. Set shopfloor user and printed flag on the processed split order knowing who is working on what.
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate. Translation: wms-14.0/wms-14.0-shopfloor Translate-URL: https://translation.odoo-community.org/projects/wms-14-0/wms-14-0-shopfloor/
This option allows to scan product packaging for bulk products and process the packaging qty.
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate. Translation: wms-14.0/wms-14.0-shopfloor Translate-URL: https://translation.odoo-community.org/projects/wms-14-0/wms-14-0-shopfloor/
… package When picking a move, allow to set a destination package that was already used for the other lines.
With this option, the lines you process by putting on a package during the picking process will be put as bulk products at the final destination location. This is useful if your picking device is emptied at the destination location or if you want to provide bulk products to the next operation. Incompatible with: "Pick and pack at the same time"
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate. Translation: wms-14.0/wms-14.0-shopfloor Translate-URL: https://translation.odoo-community.org/projects/wms-14-0/wms-14-0-shopfloor/
Currently translated at 100.0% (230 of 230 strings) Translation: wms-14.0/wms-14.0-shopfloor Translate-URL: https://translation.odoo-community.org/projects/wms-14-0/wms-14-0-shopfloor/es_AR/
No need to generate moves manually for the package level, it is done automatically by calling `action_confirm` on its picking right after.
It is already working for package levels containing only one product/move, but it doesn't for packages having several products.
Fix 'Expected singleton' error when calling the cancel action. As a package could contain multiple products, a package level could be linked to multiple moves.
When scanning a location out of the previously selected zone, instead of sending the user back to the start, keep him on the line selection of the zone.
The user may end up in the `scan_location` screen with some products to unload. It can happen when clicking on the back button but also when there is no lines left to process in the current zone. This change adds an Unload At Destination button on the `scan_location` screen which will be display only when the user has some product to unload.
|
There hasn't been any activity on this pull request in the past 4 months, so it has been marked as stale and it will be closed automatically if no further activity occurs in the next 30 days. |
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.
[WIP] Progresivelly migrating dependencies
I don't know where is the migration issue for this project
Dependencies:
OCA/product-attribute#1151
OCA/product-attribute#1149
OCA/stock-logistics-warehouse#1490
OCA/stock-logistics-workflow#1095
OCA/server-tools#2409
#448
#447
#445
/cc @simahawk