-
-
Notifications
You must be signed in to change notification settings - Fork 720
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
[15.0][MIG] stock_move_auto_assign: Migration to 15.0 #1799
Closed
Conversation
This file contains 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
Automatically check availability of stock moves when a move is set to "done". It uses queue jobs to verify the availability in order to have a minimal impact on the user operations. The conditions to trigger the check are: * A move is marked as done * The destination locations of the move lines are internal * The move doesn't have successors in a chain of moves At this point, jobs are generated: * One job per product * Any move waiting for stock in a parent (or same) location of the internal destination locations from the done move has its availability checked Only one job is generated for an identical set of (product, locations).
When the 2 last moves of a stock.picking are assigned at the same time by 2 jobs (different products both available), none of the transaction will see that it is the last move to be assigned. As a result, the picking will stay in state "confirmed" even if all its moves are assigned. Lock the stock.picking records when we call auto_assign. If we have many pickings touched for the same product, the lock can be quite large, so we may have to find a better option. I could not write a test to exercise this, because we can't have 2 transactions being aware of it, even if we create the picking in demo data as tests can be run during install.
Following changes in OCA/queue#274
…tem from queue_job
…matic move assign
This module is being backported from v16, related PR: * OCA#1560
@augustodinizl @aug1804 can you review please? |
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. |
github-actions
bot
added
the
stale
PR/Issue without recent activity, it'll be soon closed automatically.
label
Mar 10, 2024
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.
cc @marcelsavegnago
#1278