diff options
| author | Florent de Labarre <florent.mirieu@gmail.com> | 2020-12-21 19:10:20 +0000 |
|---|---|---|
| committer | Florent de Labarre <florent.mirieu@gmail.com> | 2020-12-21 19:58:56 +0000 |
| commit | 257cfeeda708cade0bd19b64eb8a95b3f61a063d (patch) | |
| tree | b2374b5d75f50e930b22e33c676971022df46aaa /addons/sale_stock | |
| parent | 1bf10e9c2fec5f063c1ef300f35eea0635e5f972 (diff) | |
[FIX] sale_stock : widget wrong value
closes odoo/odoo#63669
Signed-off-by: Simon Goffin (sig) <sig@openerp.com>
Diffstat (limited to 'addons/sale_stock')
| -rw-r--r-- | addons/sale_stock/models/sale_order.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/addons/sale_stock/models/sale_order.py b/addons/sale_stock/models/sale_order.py index 6020a35e6ec..0ebd7a23333 100644 --- a/addons/sale_stock/models/sale_order.py +++ b/addons/sale_stock/models/sale_order.py @@ -342,11 +342,13 @@ class SaleOrderLine(models.Model): line.free_qty_today = free_qty_today - qty_processed_per_product[line.product_id.id] line.virtual_available_at_date = virtual_available_at_date - qty_processed_per_product[line.product_id.id] line.forecast_expected_date = False + product_qty = line.product_uom_qty if line.product_uom and line.product_id.uom_id and line.product_uom != line.product_id.uom_id: line.qty_available_today = line.product_id.uom_id._compute_quantity(line.qty_available_today, line.product_uom) line.free_qty_today = line.product_id.uom_id._compute_quantity(line.free_qty_today, line.product_uom) line.virtual_available_at_date = line.product_id.uom_id._compute_quantity(line.virtual_available_at_date, line.product_uom) - qty_processed_per_product[line.product_id.id] += line.product_uom_qty + product_qty = line.product_uom._compute_quantity(product_qty, line.product_id.uom_id) + qty_processed_per_product[line.product_id.id] += product_qty treated |= lines remaining = (self - treated) remaining.virtual_available_at_date = False |
