13 lines
1.0 KiB
Markdown
13 lines
1.0 KiB
Markdown
# Stock Fix Unpicked Backorder
|
|
|
|
## Overview
|
|
This module patches an issue in Odoo 19 where validating a partial stock picking and choosing "No Backorder" causes Odoo to explicitly cancel any stock move lines that have not been manually marked as `picked`. This cancellation results in their quantity being zeroed out, even if the line's quantity perfectly matched its demand.
|
|
|
|
## Technical Details
|
|
Odoo 19's `stock.picking` validation skips automatically marking lines as `picked = True` if *any* other line in the transfer was manually processed/picked. When `cancel_backorder=True` is provided (via the "No Backorder" wizard), the `_action_done` method of `stock.move` cancels moves that are not picked or have <= 0 quantity.
|
|
|
|
This module overrides `_pre_action_done_hook` on `stock.picking` to ensure that any move with a `quantity > 0` is automatically marked as `picked = True` right before the validation logic runs.
|
|
|
|
## Usage
|
|
Simply install the module. The fix is applied automatically during the backorder validation flow.
|