[FIX] sale_stock: display qty_delivered
Before this commit, on the sale order lines, the field `json_forecast` displayed a value for line linked to a move line or a picking. Now it will at least display the `qty_delivered` value.
This commit is contained in:
@@ -372,7 +372,7 @@ class SaleOrderLine(models.Model):
|
||||
# compute
|
||||
precision = self.env['decimal.precision'].precision_get('Product Unit of Measure')
|
||||
for so_line in self:
|
||||
if any(move.state == 'done' for move in so_line.move_ids):
|
||||
if any(move.state == 'done' for move in so_line.move_ids) or not so_line.move_ids.picking_id:
|
||||
qty_delivered = float_repr(so_line.qty_delivered, precision)
|
||||
so_line.json_forecast = json.dumps({'reservedAvailability': qty_delivered})
|
||||
else:
|
||||
|
||||
Reference in New Issue
Block a user