diff options
| author | Yannick Tivisse <yti@odoo.com> | 2020-10-29 10:07:47 +0000 |
|---|---|---|
| committer | Yannick Tivisse <yti@odoo.com> | 2020-10-29 11:17:33 +0000 |
| commit | 447c1c3d67afffc1f34b96579408fc31b64eaf95 (patch) | |
| tree | 522456884edae1d6d729224532c271dba386b101 /addons | |
| parent | 81098122c574ab701dfad610a26cfad1bb1b9b84 (diff) | |
[FIX] resource: Fix erroneous date/datetime comparison
closes odoo/odoo#60969
X-original-commit: febd3251aa970f6711f303d539eeeabebf16e818
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
Diffstat (limited to 'addons')
| -rw-r--r-- | addons/resource/models/resource.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/addons/resource/models/resource.py b/addons/resource/models/resource.py index 4697c35b035..2bd2c2d5ac6 100644 --- a/addons/resource/models/resource.py +++ b/addons/resource/models/resource.py @@ -800,7 +800,7 @@ class ResourceCalendar(models.Model): if not self.attendance_ids: return 0 mapped_data = defaultdict(lambda: 0) - for attendance in self.attendance_ids.filtered(lambda a: (not a.date_from or not a.date_to) or (a.date_from <= end and a.date_to >= start)): + for attendance in self.attendance_ids.filtered(lambda a: (not a.date_from or not a.date_to) or (a.date_from <= end.date() and a.date_to >= start.date())): mapped_data[(attendance.week_type, attendance.dayofweek)] += attendance.hour_to - attendance.hour_from return max(mapped_data.values()) |
