-
- Downloads
[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:
William Henrotin (whe) <whe@odoo.com>
Showing
- addons/mrp/models/stock_move.py 2 additions, 2 deletionsaddons/mrp/models/stock_move.py
- addons/stock/models/stock_move.py 79 additions, 22 deletionsaddons/stock/models/stock_move.py
- addons/stock/models/stock_move_line.py 1 addition, 7 deletionsaddons/stock/models/stock_move_line.py
- addons/stock/models/stock_scrap.py 10 additions, 1 deletionaddons/stock/models/stock_scrap.py
- addons/stock/static/src/views/picking_form/picking_form_controller.js 49 additions, 0 deletions.../static/src/views/picking_form/picking_form_controller.js
- addons/stock/static/src/views/picking_form/picking_form_model.js 25 additions, 0 deletions...stock/static/src/views/picking_form/picking_form_model.js
- addons/stock/static/src/views/picking_form/picking_form_view.js 14 additions, 0 deletions.../stock/static/src/views/picking_form/picking_form_view.js
- addons/stock/static/src/views/picking_form/stock_move_one2many.js 33 additions, 0 deletions...tock/static/src/views/picking_form/stock_move_one2many.js
- addons/stock/views/stock_picking_views.xml 3 additions, 2 deletionsaddons/stock/views/stock_picking_views.xml
Loading