Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
When we validate a SO with an MTO product, then an RFQ and a delivery picking are created. The status of the delivery picking is in state 'confirmed', but should be 'waiting' as the delivery waits for a specific delivery input. The problem is caused by the unreserve method, which is called in the 'procurement_jit' module. This method only checks that a move has ancestors to determine if the move should be in waiting or in confirmed, which is not the case for our delivery move because the RFQ has not been validated yet so there is not ancestors yet. To fix this issue, we check the 'procure_method' of the move, and if it is in 'make_to_order' we put it in 'waiting' instead of 'confirmed'. We also fixed the function recalculate_move_state that could cause the same problem.
- Loading branch information
Showing
2 changed files
with
67 additions
and
2 deletions.
There are no files selected for viewing
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
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