Project Forecast Lines
project_forecast_line · OCA/project
-
Security25/25No findings
-
Activity25/25Human commit this month
-
Required by5/250 modules depend on it
-
Maturity25/25In 4 Odoo series since 14.0
Heuristic over the facts below, not an audit · How it's computed
Description
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
Dependencies
Code analysis
Extracted from the source by best-effort static analysis (no code is executed); details may be incomplete.
Views touched 17
| XML ID | Name | Model | Type | Status |
|---|---|---|---|---|
product_template_form |
product.template | form | Inherits product.product_template_only_form_view | |
project_project_stage_view_form |
project.project.stage | form | Inherits project.project_project_stage_view_form | |
project_project_stage_view_form_quick_create |
project.project.stage | form | Inherits project.project_project_stage_view_form_quick_create | |
project_project_stage_view_tree |
project.project.stage | tree | Inherits project.project_project_stage_view_tree | |
res_config_settings_view_form |
res.config.settings.view.form.inherit.forecast | res.config.settings | form | Inherits base.res_config_settings_view_form |
view_employee_form |
hr.employee | form | Inherits hr.view_employee_form | |
view_forecast_line_graph |
forecast.line | graph | New | |
view_forecast_line_graph_stacked |
forecast.line | graph | New | |
view_forecast_line_list |
forecast.line | list | New | |
view_forecast_line_pivot |
forecast.line | pivot | New | |
view_forecast_line_search |
forecast.line | search | New | |
view_forecast_role_form |
forecast.role | form | New | |
view_forecast_role_list |
forecast.role | list | New | |
view_forecast_role_search |
forecast.role | search | New | |
view_hr_job_form |
hr.job | form | Inherits hr.view_hr_job_form | |
view_order_form |
sale.order | form | Inherits sale.view_order_form | |
view_task_form |
project.task | form | Inherits project.view_task_form2 |
HTTP endpoints 0
No HTTP endpoints found for this module.
Models touched 15
-
company_idMany2one → res.companydefault=<expr>required=True args: 'res.company' -
confirmed_consolidated_forecastFloatcompute='_compute_consolidated_forecast'digits=(12, 5)help='Consolidated forecast for lines of type confirmed'store=Truestring='Confirmed lines consolidated forecast' -
consolidated_forecastFloatcompute='_compute_consolidated_forecast'digits=(12, 5)help='Consolidated forecast for lines of all types consumed'store=True -
costMonetaryhelp='Cost, in company currency. Cost is positive for things which add forecast, such as employees and negative for things which consume forecast such as holidays, sales, or tasks. ' -
currency_idMany2onerelated='company_id.currency_id'store=True -
date_fromDatehelp='Date of the period start for this line'required=True -
date_toDaterequired=True -
employee_forecast_role_idMany2one → hr.employee.forecast.roleondelete='cascade' args: 'hr.employee.forecast.role' -
employee_idMany2one → hr.employeeondelete='cascade' args: 'hr.employee' -
employee_resource_consumption_idsOne2many → forecast.lineargs: 'forecast.line', 'employee_resource_forecast_line_id' -
employee_resource_forecast_line_idMany2one → forecast.linecompute='_compute_employee_forecast_line_id'help='technical field giving the name of the resource (model=hr.employee.forecast.role) line for that employee and that period'index=Trueondelete='set null'store=True args: 'forecast.line' -
forecast_hoursFloathelp='Forecast (in hours). Forecast is positive for resources which add forecast, such as employees, and negative for things which consume forecast, such as holidays, sales, or tasks.' args: 'Forecast' -
forecast_role_idMany2one → forecast.roleindex=Trueondelete='restrict'required=Truestring='Forecast role' args: 'forecast.role' -
hr_leave_idMany2one → hr.leaveindex=Trueondelete='cascade'string='Leave' args: 'hr.leave' -
nameCharrequired=True -
project_idMany2one → project.projectindex=Trueondelete='cascade' args: 'project.project' -
res_idIntegerindex=Truestring='Record ID' -
res_modelCharindex=Truestring='Model' -
sale_idMany2one → sale.orderindex=Truerelated='sale_line_id.order_id'store=Truestring='Sale' args: 'sale.order' -
sale_line_idMany2one → sale.order.lineindex=Trueondelete='cascade'string='Sale line' args: 'sale.order.line' -
task_idMany2one → project.taskindex=Trueondelete='cascade' args: 'project.task' -
typeSelectiondefault='forecast'required=True args: [('forecast', 'Forecast'), ('confirmed', 'Confirmed')]
-
convert_days_to_hours(self, days)@api.model -
create(self, vals_list)@api.model_create_multi -
unlink(self) -
write(self, vals)
No new fields.
Public methods (0)No public methods.
-
descriptionText -
nameCharrequired=True
No public methods.
-
main_role_idMany2one → forecast.rolecompute='_compute_main_role_id'groups='hr.group_hr_user'ondelete='restrict' args: 'forecast.role' -
role_idsOne2many → hr.employee.forecast.rolegroups='hr.group_hr_user' args: 'hr.employee.forecast.role', 'employee_id'
-
create(self, values)@api.model_create_multi -
write(self, values)
-
company_idMany2onerelated='employee_id.company_id'store=True -
date_endDate -
date_startDatedefault=fields.Date.todayrequired=True -
employee_idMany2one → hr.employeeondelete='cascade'required=True args: 'hr.employee' -
rateIntegerdefault=100 -
role_idMany2one → forecast.rolerequired=True args: 'forecast.role' -
sequenceInteger
-
create(self, vals_list)@api.model_create_multi -
write(self, values)
-
role_idMany2one → forecast.roleondelete='restrict' args: 'forecast.role'
No public methods.
No new fields.
Public methods (2)-
create(self, vals_list)@api.model_create_multi -
write(self, values)
-
forecast_role_idMany2one → forecast.roleondelete='restrict' args: 'forecast.role'
No public methods.
-
forecast_line_typeSelectionhelp='type of forecast lines created by the tasks of projects in that stage' args: [('forecast', 'Forecast'), ('confirmed', 'Confirmed')]
No public methods.
-
forecast_date_planned_endDateargs: 'Planned end date' -
forecast_date_planned_startDateargs: 'Planned start date' -
forecast_recomputation_triggerFloatcompute='_compute_forecast_recomputation_trigger'help='Technical field used to trigger the forecast recomputation'store=True -
forecast_role_idMany2one → forecast.roleondelete='restrict' args: 'forecast.role'
-
onchange_user_ids(self)@api.onchange('user_ids') -
set_forecast_type(self) -
write(self, values)
-
forecast_line_granularitySelectiondefault='month'help='Periodicity of the forecast that will be generated' args: [('day', 'Day'), ('week', 'Week'), ('month', 'Month')] -
forecast_line_horizonIntegerdefault=12help='Number of month for the forecast planning'
-
write(self, values)
-
forecast_line_granularitySelectionreadonly=Falserelated='company_id.forecast_line_granularity' -
forecast_line_horizonIntegerreadonly=Falserelated='company_id.forecast_line_horizon' -
group_forecast_line_on_quotationBooleanimplied_group='project_forecast_line.group_forecast_line_on_quotation' args: 'Forecast Line on Quotations'
No public methods.
No new fields.
Public methods (3)-
create(self, vals_list)@api.model_create_multi -
unlink(self) -
write(self, values)
-
default_forecast_date_endDate -
default_forecast_date_startDate
-
action_cancel(self) -
action_confirm(self) -
write(self, values)
-
forecast_date_endDate -
forecast_date_startDate
-
create(self, vals_list)@api.model_create_multi
Loading…
Loading…
Loading…