Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Project forecasts #768

Closed
enricostano opened this issue Nov 26, 2020 · 31 comments
Closed

Project forecasts #768

enricostano opened this issue Nov 26, 2020 · 31 comments
Labels
stale PR/Issue without recent activity, it'll be soon closed automatically.

Comments

@enricostano
Copy link

Hi,

is anybody working on an open source module to cover Projects Forecasts?

Based on https://www.cybrosys.com/blog/project-forecast-in-odoo-v12 , for example.

We're evaluating development efforts, but would be nice to do this as a contribution to OCA.

Is anybody else interested on working on this?

Thanks!

@pedrobaeza
Copy link
Member

pedrobaeza commented Nov 26, 2020

We want to revive soon #419 working with project_timeline or maybe bringing Frappe Gantt to Odoo.

@enricostano
Copy link
Author

enricostano commented Nov 26, 2020

Hi @pedrobaeza ! That's interesting, is there an RFC or a document that describes the functionality?
Could we join you to share our ideas on that?

@pedrobaeza
Copy link
Member

Nothing except the module itself. OK for me on sharing ideas. I'm a bit busy these days, but I try to answer you asynchronously on anything you put.

@thomaspaulb
Copy link

I've looked at #419, it has a focus on the wizard that does automatic scheduling.

Why not a simpler base module that allows doing the scheduling by hand? This is now not possible because stock Odoo has removed 'task.date_start' and replaced by date_assign, which is readonly and automatically filled when a task changes owner. If a new project_task_scheduling module would:

  • Add new fields date_planned_start and date_planned_end, perhaps helped by the date_range module for easy filling, and some per-project setting 'Require strict planning' to make them required when the state is moved to 'Started'

  • Modify project_timeline to use these new fields, or, create a new dedicated scheduling timeline that allows dragging and is under a new menu/action 'Task scheduling`

This would already allow for a nice free planning of tasks. The work of @ernestotejeda could then be included later as project_task_scheduling_automatic.

My goal would be to add a field planned into the HR Utilization analysis, based on the output of a compute function that calculates the work per calendar day as hours_planned / days(task.date_planned_end - task.date_planned_start). Alternatively this can be a sum of physical records defining the number of hours planned per day, which are generated after saving the task and also allow for the kind of fine-grained forecasting-per-day offered in project_forecast.

@pedrobaeza
Copy link
Member

@thomaspaulb yeah, project_timeline should include that fields and expose them in the form view and use them on timeline view as base for anything more. In v12 there's no such problem, as they still exists.

@alexey-pelykh
Copy link
Contributor

I've discussed this subject with @pedrobaeza for some time as part of OCA/calendar#8 but I didn't get anywhere close to actually allocating time to the PR

@thomaspaulb
Copy link

@pedrobaeza Which fields were still in 12.0? Do you mean date_start or another field?

@pedrobaeza
Copy link
Member

Yeah, that's it!

@dreispt
Copy link
Member

dreispt commented Dec 6, 2020

If the target is having something like EE project_forecast I have a module that does that for monthly planning, and is used in an EE database as a complement to the Forecast weekly planning.
It could be a good starting point to a resource panning module.

@thomaspaulb
Copy link

thomaspaulb commented Dec 6, 2020

Per month is already very useful, IMO a powerful version would store the values per day, so that for reporting it is easy to drill down to any desired time scale. (In our case we would want to compare available hours vs planned hours vs worked hours, with an enhanced version of hr_utilization_analysis). I'd say in most cases someone would just say "this task starts in october and ends in november", and then the planner by default just distributes the hours evenly over each day. That can then be adjusted in detail if needed.

Does your module use the web_widget_many2one_2d_matrix component to do the planning?

@dreispt
Copy link
Member

dreispt commented Dec 7, 2020

No matrix. For monthly planning that is not very useful.
But for weekly planning that would be useful, and I would surely add that.

The kind of planning you mention is "MS Project" style planning, unfortunately I don't use that.
I do find per-day planning useful for duty rosters scenarios, and there a few tries to add that to the OCA: see https://github.com/OCA/hr/pulls?q=is%3Apr+shift

@enricostano
Copy link
Author

@alexey-pelykh @dreispt @thomaspaulb @pedrobaeza would you like to schedule a call to talk about this? We have some time to dedicate and also need to move forward ASAP.

Thanks!

@thomaspaulb
Copy link

@enricostano As for me I prefer doing it here on the issue - can you outline your need then I can comment in my own time.

@pedrobaeza
Copy link
Member

Well, I have very few time these days, but if you agree on meeting, tell me. For me it's OK also to discuss asynchronously through here.

@enricostano
Copy link
Author

Ok, we did some research and we think that what we need actually is not Project Forecast (we cannot even understand where to find the module), but something similar to Odoo Enterprise Planning v12 or Planning v14.

We're not really interested on the "shifts" part but we see that it's easy to use it to basically plan employees dedication to specific projects/tasks over a specific time span and compare later with the executed dedication (timesheets).

Does any of the implementations and/or PRs discussed until now cover this kind of requirements?

What do you think?

@pedrobaeza
Copy link
Member

I don't know any, and not sure to be the good approach. Let me know if you want to meet to discuss it.

@thomaspaulb
Copy link

@enricostano This is basically what I wanted to do for a customer when I posted my above comment of December 2. My plan was to:

  • Modify project_timeline to be able to freely drag start and end date of tasks MS-project style, so that it's easy to say for example 'employee A will work on task X from 1 November - 31 December', and the total amount of hours for that task is say 200.

  • Modify hr_utilization_analysis to be the hub where everything comes together: hours planned (from tasks), hours worked (from timesheets) and hours available (from contract). You'll need to select a time unit around which this is based, eg. a week, month or even a work day. By being able to "click through" to tasks and modifying their total hours, shifting hours from one employee to another, you can make sure that the availability of employees matches the hours planned to them. And afterwards you can also see here how much time they actually write.

  • Have another report, perhaps one of the default project reports or a custom one, where you can look at the overall project tasks and the subtasks assigned to the employee, and ensure that the total hours planned to subtasks for each employee matches the total need for each task.

In this way, going back and forth through these three screens, planners can complete a sensible resource planning that adds up, and adjust it as reality passes by and resources perhaps get sick or new resources are hired, etc.

What they had previously were two custom planners for this based on OCA's web 2d matrix module, one with employees vs. hours (rough planning), and another with employees vs. sale orders, now allocating the resource time further to each customer. This was then for one full year, and they also adjusted it as time went by. On the background, tasks were created for each employee to write time on.

@thomaspaulb
Copy link

A rough draft/demo of that first idea is found in this PR: https://github.com/OCA/timesheet/pull/414/files

It however lumps all the hours planned to one task on the start date of the task, where in reality it would be more smooth to spread it out over the weeks that the task lasts.

You could take a look at it and see whether this approach could be a start for you, or whether you'll want to go for something completely different.

I'm happy to bounce off ideas here.

@ypapouin
Copy link

For the record, I'm also interested to help building a forecast/planning framework.
Adding a web_frappe_gantt module would also be very interesting.

@ypapouin
Copy link

ypapouin commented Feb 22, 2021

I made these two new modules web_fgantt and project_fgantt greatly inspired from web_timeline and project_timeline:
https://github.com/dec-industrie/odoo-addons-incubator

Currently, you can drag and resize tasks/projects, clicking on them to open their form.
I have an issue with dates and timezone since I don't know when we should work without timezone and when we should not.
image

The Frappe Gantt library is a good start to build something with more advanced functionalities (all the drawing stuffs are managed by the snap.svg library), but there is some cons/bugs:

  • No groups support, so no columns on the left side.
  • No UI-way to "draw" a line to create a new task.
  • No UI-way to delete a task.
  • No UI-way to link tasks dynamically.
  • No way to initialize an empty Gantt.
  • No way to lock some editing functionalities (drag/resize) based on read/write access (add/remove/edit).
  • A tasks without an end date is not draggable/resizeable and throw an error.
  • The popup should be displayed on mouse hover not on a click.

A fork would be necessary since this project does not seems to be very active.

@numeropi
Copy link

numeropi commented Apr 7, 2021

From coopdevs we've made some progress on the module code here:
https://github.com/coopdevs/calendar/tree/12-project-task-schedulable

it is based on the code https://github.com/OCA/timesheet/tree/12.0/hr_timesheet_sheet that uses the web_widget_x2many_2d_matrix

The plan was to use the jquery fgantt library as @ypapouin did to show the task schedules with a gantt representation. Could you try the module and take a look at the module structure to see if we are in the correct path?Advices are welcome..

Some screenshots attached.
image
image
image

@yajo @pedrobaeza @enricostano

@pedrobaeza
Copy link
Member

pedrobaeza commented Apr 25, 2021

It seems OK in a first sight. Maybe I miss a way to populate tasks in batch according some criteria, and also not sure about adding manually the hours to work on each day, but auto-populate them, but it can be discussed in the PR. Thanks for the work.

@estekadigital
Copy link

Hello, I am also interested in working on this module, is there any progress?

@ypapouin
Copy link

Hello, I decided to re-implement dhtmlxgantt by forking an existing WIP.
https://github.com/decgroupe/odoo_dhtmlxgantt

Sample of the "classic" gantt view for project's tasks:
image

But after a long reflection on the subject, I'm more decided to create a Gantt view for the mail.activity model, because after looking for a way to create an inter-model way to plan data, the used of built-in Activities seems obvious to forecast all ERP models.

Adding the mail_activity_team OCA module over also make it powerful to plan team activities.

The current mail.activity only have a date_deadline so it will require to add:

  • date_start (datetime)
  • date_stop (datetime) (== date_deadline ?)
  • duration (float)

Basically I will first create two modules: mail_activity_forecast and mail_activity_forecast_dhxgantt.

And then, since the main objective is to have only one way to plan entire ERP data (sales, projects, mrp, etc.) some activities will be automatically created for planning.

Example for a project_forecast module:

  • The project.task.date_start and project.task.date_stop would be linked to a Task activity automatically created/updated with task data and the same in the other direction, updating the activity dates will update the task ones.

Another example for a calendar_forecast module:

  • Use the same logic for the calendar.event model

And, as a bonus, when an activity is ended, a popup could be raised to create a pre-filled timesheet line.

@ypapouin
Copy link

I forgot to add that it would also require a new notification widget based on date_start and date_stop, the open action will directly open the gantt view:

image

After asking around, the date_deadline is a stopper and must block gantt date_start and date_stop dragging with condition:
date_start < date_stop < date_deadline

@enricostano
Copy link
Author

Cool @ypapouin ! From Coopdevs we're planning to dedicate some resource to this during the 3rd quarter this year.

@github-actions
Copy link

github-actions bot commented Oct 9, 2022

There hasn't been any activity on this issue in the past 6 months, so it has been marked as stale and it will be closed automatically if no further activity occurs in the next 30 days.
If you want this issue to never become stale, please ask a PSC member to apply the "no stale" label.

@github-actions github-actions bot added the stale PR/Issue without recent activity, it'll be soon closed automatically. label Oct 9, 2022
@thomaspaulb
Copy link

@gjotten Did i overhear correctly that there was some progress on this?

@gjotten
Copy link

gjotten commented Oct 12, 2022

@gjotten Did i overhear correctly that there was some progress on this?

Yes, although not to the exact degree some people above were suggesting, for instance there's no full substitution with Odoo EE's planning (yet).

Task assignations and even potential hours worked on quotations can be nicely compared to employee's resource calendars and leaves though, and then grouped on projects for example. Personally I feel that's quite the amount of planning already.

Anyway, starting with #957 @gurneyalex and @yankinmax have been adding quite the interesting set of modules:

We look to be feature-complete on them now, also thanks to some work over the last couple of days in filling some gaps. I suggest people try these modules out on Runboat and give feedback!

@gjotten
Copy link

gjotten commented Oct 12, 2022

Forgot to add: we'll dedicate some resources to finishing our backport to 14.0 on the above modules soon as well.

@github-actions github-actions bot removed the stale PR/Issue without recent activity, it'll be soon closed automatically. label Oct 16, 2022
@github-actions
Copy link

There hasn't been any activity on this issue in the past 6 months, so it has been marked as stale and it will be closed automatically if no further activity occurs in the next 30 days.
If you want this issue to never become stale, please ask a PSC member to apply the "no stale" label.

@github-actions github-actions bot added the stale PR/Issue without recent activity, it'll be soon closed automatically. label Apr 16, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
stale PR/Issue without recent activity, it'll be soon closed automatically.
Projects
None yet
Development

No branches or pull requests

9 participants