diff --git a/addons/fleet/report/fleet_report.py b/addons/fleet/report/fleet_report.py index fe59895e145..73f57472579 100644 --- a/addons/fleet/report/fleet_report.py +++ b/addons/fleet/report/fleet_report.py @@ -51,7 +51,7 @@ WITH service_costs AS ( 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 @@ -90,7 +90,7 @@ contract_costs AS ( 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