diff --git a/modules/stock_forecast/forecast.py b/modules/stock_forecast/forecast.py index 08b145b167..675d892e77 100644 --- a/modules/stock_forecast/forecast.py +++ b/modules/stock_forecast/forecast.py @@ -220,6 +220,7 @@ class Forecast(Workflow, ModelSQL, ModelView): & (table.warehouse == forecast.warehouse.id) & (table.destination == forecast.destination.id) & (table.company == forecast.company.id) + & (table.state == 'done') & (table.id != forecast.id))) forecast_id = cursor.fetchone() if forecast_id: