-
-
Notifications
You must be signed in to change notification settings - Fork 192
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] stock_available_to_promise_release: Migration to 16.0 #475
[16.0] stock_available_to_promise_release: Migration to 16.0 #475
Conversation
When: * using a 3 steps delivery * creating and confirming a sale order * opening the transfer using the "Deliveries" button on the sale order * clicking on the "Release" button The pickings generated by the release are incorrect. This is because the smart button of the sale order view adds several "default_" fields that are then interpreted during the creation of the chained pickings. Clean these fields from the context.
When stock moves have been released, their 'need_release' flag must be set to False. Due to a coding mistake, they were not. The most visible effect was the "Release" button still visible on transfers and moves, but other vicious effects can't be excluded. The issue come from an inversion in the order of the list comprehension, added up to the fact that the 'procurement' variable name was recycled from the code above: 'procurement' was always equal to the latest procurement used in the loop before the list comprehension.
To reproduce * Order 100x [E-COM10] * Update quantities in stock to have 70 [E-COM10] in Stock/Shelf 1 * Release the moves Actual result: 2 transfer, the backorder for the waiting 30 [E-COM10] has no backorder link with the original transfer Expected result: 2 transfer, the backorder for the waiting 30 [E-COM10] has a backorder link with the original transfer
Current behavior: When we release an OUT stock move, the OUT transfer is set to printed. The origin transfers (e.g. Pick+Pack) are not. Expected behavior: When we release an OUT stock move, all the origin transfer (e.g. Pick+Pack) are set to printed. Reason: The original reason for setting "printed" to True, is that when "_assign_picking()" is called on a stock.move, the stock.move can be added only in a stock.picking which is not printed yet. In other terms, "printed" means the transfer has been started and shouldn't be modified. When we "release" moves, we actually planify the work to be done, and if we release again new moves, we don't expect transfers of the 2 waves of releases to be merged together. If we set the flag "printed" on the Out transfer only, we can end up with one Packing transfer leading to 2 Out transfers, which generally doesn't make sense.
The management of priorities on stock moves and stock picking has changed between on v14 see * odoo/odoo@e405537 This make the priority field that was nicely flowing between stock move through the procurement values, not working any more. That change on Odoo core omits the inverse function on the priority field in stock move, but it would not help when going through the procurement mechanism, because moves are created before they are assigned to picking.
In 13.0 the field used on 'stock.move' was `date_expected` which has been merged into `date` field in 14.0: odoo/odoo@57f805f This addon has been updated during the 14.0 migration to use `date_deadline` by mistake.
To integrate routing flows with the release of operations. This applies the routing flow on the move when this one is released (when confirmed the flow is not applied anymore).
978adaa
to
c52ff7d
Compare
c52ff7d
to
e99e8c5
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.
LG, minor comments
/ocabot migration stock_available_to_promise_release |
e99e8c5
to
d66ae0a
Compare
d66ae0a
to
7e8cec1
Compare
@sebalix All comments taken into account. |
/ocabot merge nobump |
On my way to merge this fine PR! |
Congratulations, your PR was merged at 92f8656. Thanks a lot for contributing to OCA. ❤️ |
No description provided.