Ver código fonte

fix: Remove state restriction from planning slots query

- Removed state filter from planning slots search to include all states
- Now includes slots in draft, published, confirmed, done, and other states
- This should capture all planning slots regardless of their current state
- Fixes issue where some employees had incorrect planned hours due to state filtering
root 5 meses atrás
pai
commit
45e5122be3
1 arquivos alterados com 1 adições e 1 exclusões
  1. 1 1
      hr_efficiency/models/hr_efficiency.py

+ 1 - 1
hr_efficiency/models/hr_efficiency.py

@@ -404,7 +404,7 @@ class HrEfficiency(models.Model):
             ('employee_id', '=', employee.id),
             ('start_datetime', '>=', datetime.combine(start_date, datetime.min.time())),
             ('end_datetime', '<=', datetime.combine(end_date, datetime.max.time())),
-            ('state', 'in', ['draft', 'published']),
+            # Removed state restriction to include all planning slots regardless of state
         ])
         
         total_planned = 0.0