-
- Downloads
[FIX] stock,mrp: Wrong forecasting on widget
**Summary :**
When using a great decimal precision, forecast_widget shows red
neverthless the available quantity is sufficient.
**Steps to reproduce :**
- In Settings >> Technical >> Database Structure >> Decimal Accuracy
- For usage __Product Unit of Measure__, set __Digits__ to **__6__**
- Create products of type storable :
- __Test Component__ with a __Qty on hand__ of **__76.6__** Units
- __Test Product__
- Create a BoM for __Test Product__, with Quantity set to **__1__** Units
- Add component __Test Component__ with Quantity set to **__15.32__** Units
- Create a MO for BoM __Test Product__ with a Quantity set to **__5__** Units
- Confirm the MO.
**Before :**
Neverthless the __To Consume__ qty is set to 76.6, which is equal to the
__Qty on hand__ of the component, the forecast widget shows red as if
there's an insufficient quantity of the component
**After :**
With help of the Odoo's __formatFloat__ method, we round the data used
in the comparison defining the __willBeFulfilled__.
The forecast_widget now display properly, taking into account the digit
precision setup in the database.
opw-3281588
closes odoo/odoo#123074
Signed-off-by:
Tiffany Chang <tic@odoo.com>
Please register or sign in to comment