Only consider done forecast when checking if they overlap

Closes #13553
This commit is contained in:
Sergi Almacellas Abellana
2024-10-01 13:49:34 +02:00
parent 29de47586c
commit b9478515c0
+1
View File
@@ -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: