[IMP] mrp: MO component qty changes reflected in pickings
When changing quantities of raw moves after MO confirm,
procurement is run to fulfill updated need.
Since procurement creates new moves, some fixes were also done to allow
moves to be merged with older ones, including:
1) `date_planned_start` of merged MO included microsecond which
blocked merging new moves created by procurement with orig moves.
Removed microseconds.
2) `_set_date_deadline` did not allow a simple date update to moves with
orig or dest moves. Added context to hard set all moves in self to specific
deadline.
3) `_update_candidate_moves_list` when merging moves, did not return candidates
from pickings that were merged to same MO. Usually just mattered when decreasing
quantity. Added explicit check for sibling pickings in MO
closes odoo/odoo#93712
Task: 2859547
Signed-off-by:
William Henrotin (whe) <whe@odoo.com>
Showing
- addons/mrp/models/mrp_production.py 6 additions, 17 deletionsaddons/mrp/models/mrp_production.py
- addons/mrp/models/mrp_workorder.py 1 addition, 1 deletionaddons/mrp/models/mrp_workorder.py
- addons/mrp/models/stock_move.py 35 additions, 4 deletionsaddons/mrp/models/stock_move.py
- addons/mrp/tests/test_procurement.py 129 additions, 0 deletionsaddons/mrp/tests/test_procurement.py
- addons/mrp/wizard/mrp_production_backorder.py 1 addition, 1 deletionaddons/mrp/wizard/mrp_production_backorder.py
- addons/stock/models/stock_move.py 6 additions, 6 deletionsaddons/stock/models/stock_move.py
Loading
Please register or sign in to comment