[IMP] mrp: store quantity available
We store quantity available to avoid numerical inconsistencies. For exemple, with a rounding of 1e-6: - `product_uom_qty` = 0.058824 (stored) - `quantity_available` = 0.058823999999994 (not stored) The dependencies of the field are fixed from v10.0. opw-704775
This commit is contained in:
@@ -66,7 +66,7 @@ class StockMove(models.Model):
|
||||
has_tracking = fields.Selection(related='product_id.tracking', string='Product with Tracking') # TDE FIXME: naming ...
|
||||
# Quantities to process, in normalized UoMs
|
||||
quantity_available = fields.Float(
|
||||
'Quantity Available', compute="_qty_available",
|
||||
'Quantity Available', compute="_qty_available", store=True,
|
||||
digits=dp.get_precision('Product Unit of Measure'))
|
||||
quantity_done_store = fields.Float('Quantity', digits=0)
|
||||
quantity_done = fields.Float(
|
||||
|
||||
Reference in New Issue
Block a user