[IMP]hr_employee_stats_sheet:add dependecie to hr_employee_calendar_planning and identifies the planning using by a employee during a time period
Some checks failed
pre-commit / pre-commit (pull_request) Failing after 1m31s

This commit is contained in:
2025-12-10 14:49:53 +01:00
parent 5b103056d6
commit 231d0d892d
6 changed files with 186 additions and 98 deletions

View File

@@ -88,7 +88,7 @@ class HrEmployeeStats(models.Model):
total_planned_hours = 0
if self.employee_id and self.date and not self.is_public_holiday:
dayofweek = int(self.date.strftime("%u")) - 1
calendar_id = self.employee_id.resource_calendar_id
calendar_id = self.employee_id._get_calendar_in_progress_during_a_time_period(self.date,self.date)
week_number = self.date.isocalendar()[1] % 2
if calendar_id.two_weeks_calendar:
hours = calendar_id.attendance_ids.search(