[FIX] stock_request: Change to free_qty field to use stock

We need to use the free_qty field because it is the one that has the
correct value if for example we have stock reservations.

TT43413
This commit is contained in:
Víctor Martínez
2023-09-07 08:11:22 +02:00
parent 2130562353
commit 88ae978498

View File

@@ -404,7 +404,7 @@ class StockRequest(models.Model):
float_compare(
request.product_id.sudo()
.with_context(location=request.location_id.id)
.qty_available,
.free_qty,
request.product_uom_qty,
precision_digits=precision,
)