diff --git a/addons/fleet/report/fleet_report.py b/addons/fleet/report/fleet_report.py index eb4d65b444fa6..35e72222a46e0 100644 --- a/addons/fleet/report/fleet_report.py +++ b/addons/fleet/report/fleet_report.py @@ -43,7 +43,7 @@ def init(self): CROSS JOIN generate_series(( SELECT min(date) - FROM fleet_vehicle_log_services), CURRENT_DATE, '1 month') d + FROM fleet_vehicle_log_services), CURRENT_DATE + '1 month'::interval, '1 month') d LEFT JOIN fleet_vehicle_log_services se ON se.vehicle_id = ve.id AND date_trunc('month', se.date) = date_trunc('month', d) WHERE @@ -74,7 +74,7 @@ def init(self): CROSS JOIN generate_series(( SELECT min(acquisition_date) - FROM fleet_vehicle), CURRENT_DATE, '1 month') d + FROM fleet_vehicle), CURRENT_DATE + '1 month'::interval, '1 month') d LEFT JOIN fleet_vehicle_log_contract co ON co.vehicle_id = ve.id AND date_trunc('month', co.date) = date_trunc('month', d) LEFT JOIN fleet_vehicle_log_contract cod ON cod.vehicle_id = ve.id