Skip to content
Snippets Groups Projects
Commit cacc677a authored by Arnold Moyaux's avatar Arnold Moyaux
Browse files

[IMP] stock: quantity done on stock.move is always editable


Quantity done will be always editable. Different use case:
1. If there is not location/package/tracing/owner -> same behavior than
  before
2. If the details are needed:
- Immediate transfer. In case of increase the quants are reserved and the
`qty_done` on `stock.move.line` is increased depending the reservation.
If the quantity couldn't be fully reserve then default `stock.move.line`
are create (depending the putaway rules or multiple ones if the products
are tracked). In case of decrease, the quantity reserved are unreserve
but the `stock.move.line` are not unlink until the validation.
- Planned transfer. The quantity done will fill the reservation. If the
picking is not assign, it will reserve the quantity needed. In case of
decrease, it will only unreserve the extra quantity (compare to the
initial demand). To unreserve the quantity bellow the intial demand, the
`stock.move.line` could be unlink or use the `unreserve` button.

force_qty in `_action_assign` is needed because we don't reserve only
base on the initial demand (`product_uom_qty`) but sometimes on the
quantity_done.

In order to never block the user. The action_show_details is always
available. If the id is not available, it will save and open the record
(we take the record based on the new existing line with same product
and highest id).

closes odoo/odoo#102500

Task-id: 2960983
Related: odoo/enterprise#32465
Signed-off-by: default avatarWilliam Henrotin (whe) <whe@odoo.com>
parent d4b55271
Branches
Tags
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment