[FIX] mrp: UoM of quantity available
The field `quantity_available` can be computed in two different ways:
- equal to `product_uom_qty`
- equal to `reserved_availability`
However, `product_uom_qty` is in the UoM of the move, while
`reserved_availability` is in the UoM of the product.
We convert into the UoM of the move, because `quantity_available` is
supposed to be in the same UoM than `product_uom_qty` ("To Consume").
opw-704775
This commit is contained in:
@@ -88,7 +88,7 @@ class StockMove(models.Model):
|
||||
if move.state == 'assigned':
|
||||
move.quantity_available = move.product_uom_qty
|
||||
else:
|
||||
move.quantity_available = move.reserved_availability
|
||||
move.quantity_available = move.product_id.uom_id._compute_quantity(move.reserved_availability, move.product_uom)
|
||||
|
||||
@api.multi
|
||||
@api.depends('move_lot_ids', 'move_lot_ids.quantity_done', 'quantity_done_store')
|
||||
|
||||
Reference in New Issue
Block a user