diff options
| author | Adrien Widart <awt@odoo.com> | 2020-12-17 13:22:23 +0000 |
|---|---|---|
| committer | Adrien Widart <awt@odoo.com> | 2020-12-17 13:50:15 +0000 |
| commit | f5c0990c6af2f44f503de1cc50cc5b094e31976a (patch) | |
| tree | 3e0736d3870e64bea94486bc03627fa0c11536e9 /doc/reference/javascript_reference.rst | |
| parent | be1e1207a849d95e54a76b841a74e94468d13e1f (diff) | |
[FIX] stock: no backorder if added on delivery page
In the Barcode app, if the user is on a delivery order, adds a product
and then decreases the product's quantity, when validating the order,
the backorder window is displayed.
To reproduce the error:
(Need sale_management,stock_barcode)
1. Go to Sales
2. Create a SO
- Add one Product P
3. Save, Confirm
4. Check the generated delivery reference R
4. Go to Barcode > Operations > Delivery Orders > R
5. Complete the P's quantity
6. Add Product
- Select a Product P_extra
- Set a quantity (e.g., 1)
7. Confirm
8. Edit the P_extra's line
- Decrease the quantity (e.g., 0)
9. Confirm
10. Validate
=> A window is displayed so the user can create a backorder for the
missing P_extra. Since the SO does not contains any P_extra, proposing
to create a backorder does not make sense.
When adding an extra product to the delivery, it creates a stock move
line with the `product_uom_qty` set to 0. Since there isn't any stock
move associated, it also creates a new one. Here is the issue: the
`product_uom_qty` of the stock move is defined thanks to the `qty_done`
of the extra product. Later, when validating the delivery, the server
uses the `product_uom_qty` of the stock move to check if a backorder is
needed. This the reason why, if the user decreased the quantity, the
backorder proposition is displayed: the `qty_done` is less than the
`product_uom_qty`.
OPW-2411461
closes odoo/odoo#63542
Signed-off-by: adwid <adwid@users.noreply.github.com>
Diffstat (limited to 'doc/reference/javascript_reference.rst')
0 files changed, 0 insertions, 0 deletions
