OdooWiki OCA HUB

Project Forecast Lines

project_forecast_line folder_open OCA/project open_in_new
Project License: AGPL-3

This module allows to plan your resources using forecast lines.

For each employee of the company, the module will generate forecast line records with a positive capacity based on their working time schedules. Then, tasks assigned to employees will generate forecast lines with a negative capacity which will "consume" the work time capacity of the employees.

The idea is that you can then see the work capacity and scheduled work of people by summing the "forecasts" per time period. If you have more resources (positive forecast) than work (negative forecast) you will have a positive net sum. Otherwise you are in trouble and need to recruit or reschedule your work. Another way to use the report is checking when the work capacity of a department becomes positive (or high enough) in order to provide you potential customers with an estimate of when a project would be able to start.

Forecast lines also come in two states "forecast" or "confirmed", depending on whether the consumption is confirmed or not. For instance, holidays requests and sales quotation lines create lines of type "forecast", whereas tasks for project which are in a running state create lines with type "confirmed".

To get the best experience using the Forecast application you may want to install:

  • project_forecast_line_holidays_public module which takes public holidays into account during forecast lines creation
  • project_forecast_line_bokeh_chart module which improves the reports of project_forecast_line module by using the bokeh widget available in OCA/web

auto_awesome What this module does

AI-generated from the code · Odoo 19.0

Plan employee work capacity and see, per period, whether your team is over- or under-booked. The module builds forecast lines from working schedules, tasks, holidays and sales, and shows them in a dedicated Forecast menu.

This module adds a Forecast area to Odoo that compares how much time your employees can work with how much work is already planned for them.

  • Each employee's working schedule generates positive capacity lines, split by day, week or month depending on the company setting.
  • Tasks with a planned start and end date, a forecast role and remaining hours generate negative lines that consume that capacity.
  • Holidays and confirmed leaves also reduce capacity, while draft sales orders with forecast products reserve capacity for future work.

You can review everything in the Forecast menu, with list, graph and pivot views, plus a consolidated view that sums capacity and consumption per employee and period. A Configuration submenu lets you define Forecast Roles, set the period granularity and the planning horizon in months, and enable forecast lines on quotations.

Roles are linked to job positions, products and tasks, and employees can have several roles with a rate percentage and validity dates. When a task is assigned to users, the main role of the employee is proposed automatically. Changing the granularity or horizon triggers a full recomputation, and a scheduled job refreshes forecast lines regularly. Multi-company rules keep each company's forecasts separate.

Depends on

hrhr_holidaysproductprojectsalesale_projectsales_teamsale_timesheetuomutm

Menus it adds

ForecastConfigurationForecastForecast RolesSettings
Models and fields (15)
  • hr.job · extends an existing modelrole_id
  • hr.leave · new model
  • sale.order · extends an existing modeldefault_forecast_date_end, default_forecast_date_start
  • hr.employee · extends an existing modelrole_ids, main_role_id
  • res.company · extends an existing modelforecast_line_horizon, forecast_line_granularity
  • project.task · new modelforecast_role_id, forecast_date_planned_end (Planned end date), forecast_date_planned_start (Planned start date), forecast_recomputation_trigger
  • forecast.line · new modelcost, name, type, res_id (Record ID), date_to, sale_id (Sale), task_id (Task), date_from, res_model (Model), company_id, project_id (Project), currency_id, employee_id (Employee), hr_leave_id (Leave), sale_line_id (Sale line), forecast_hours (Forecast), forecast_role_id (Forecast role), consolidated_forecast, employee_forecast_role_id (Employee Forecast Role), confirmed_consolidated_forecast (Confirmed lines consolidated forecast), employee_resource_consumption_ids, employee_resource_forecast_line_id
  • forecast.role · new modelname, description
  • sale.order.line · new modelforecast_date_end, forecast_date_start
  • product.template · extends an existing modelforecast_role_id
  • forecast.line.mixin · new model
  • res.config.settings · extends an existing modelforecast_line_horizon, forecast_line_granularity, group_forecast_line_on_quotation (Forecast Line on Quotations)
  • project.project.stage · extends an existing modelforecast_line_type
  • resource.calendar.leaves · new model
  • hr.employee.forecast.role · new modelrate, role_id, date_end, sequence, company_id, date_start, employee_id

Text generated by AI (DeepSeek) from reading the Odoo 19.0 code on GitHub; it may contain mistakes, so check the code before deciding. The module is very large and only part of the code was read. View the code on GitHub

Availability by version

Reviewed: 2026-11-03
Confirmed (verified in repository and branch) Estimated (unverified) No information

Confirmation status: 4 confirmed, 5 with no information of 9 versions.

terminal Installation and usage

OCA documentation · Odoo 19.0

Forecast lines have the following data:

  • Forecast hours: it is positive for resources (employees) and negative for things which consume time (project tasks, for instance)
  • From and To date which are the beginning and ending of the period of the capacity
  • Consolidated forecast: this is a computed field, which is computed as follows:
  • for costs (project tasks for instance) we take the absolute value of the forecast hours (so it is a positive number)
  • for resources (employee capacity for a period), we take the capacity and substract all the costs for that employee on the same period. So it will be positive if the employee still has some free time, and negative if he is overloaded with work.
  • this consolidated forecast is currently converted to days to ease readability of the forecast report

Objects creating forecast lines:

  • employees with a forecast role will create forecast line with a positive capacity and type "confirmed" for each day on which they work. This information comes from their work calendar, and the different roles that are linked to the employee.
  • draft sale orders (if enabled in the settings) will create forecast lines of type "forecast" for each sale order line having a product with a forecast role and start and end dates. The forecast hours are negative
  • confirmed sale orders don't create forecast lines. This is handled by the tasks created at the confirmation of the sale order
  • project tasks create forecast lines if they have a linked role and planned start/end dates. The type of the line will depend on the related project's stage. The forecast_hours field is based on the remaining time of the task, which is spread on the work days of the planned start and end date of the task. If the current date is in the middle of the planned duration of the task, it is used as the start date. If the planned end date is in the past the task does not generate forecast lines (and you need to fix your planning). In case multiple employees are assigned to the task the forecast is split equally between them.
  • holiday requests create negative forecast lines with type "forecast" when they are pending manager validation.
  • Validated holiday requests do not generate forecast lines, as they alter the work calendar of the employee: the employee will not have a positive line associated to his leave days.

The creation of forecast lines is done either in real time when some actions are performed by the user (requesting leaves, updating the remaining time on a project task, timesheeting) and also via a cron that runs on a daily basis. The cron is required to cleanup lines related to dates in the past and to recompute the lines related to project tasks by computing the ratio of remaing time on the tasks on the remaining days, for tasks which are in progress. So, to start using consolidated forecast report you first need to set everything mentioned in Usage section. Then, probably run Forecast recomputation cron manually from Scheduled Actions or wait till cron creates records.

No verified information in OCA: Installation, Configuration.

info

Data imported from GitHub: this sheet reflects the latest catalog review, not a live lookup. Always check the module documentation and staging before installing in production.