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

[14.0][IMP]project_timeline: improved timeline handling for project tasks #1335

Merged
merged 1 commit into from
Sep 11, 2024

Conversation

juanjosesegui-tecnativa
Copy link

@Tecnativa TT50618

@sergio-teruel
Copy link
Contributor

Review the tests

@pedrobaeza pedrobaeza added this to the 14.0 milestone Sep 6, 2024
Copy link
Member

@pedrobaeza pedrobaeza left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You have to remove hooks.py, as now there's no sense for that one.

project_timeline/views/project_task_view.xml Outdated Show resolved Hide resolved
@francesco-ooops
Copy link
Contributor

This is funny but I just picked up this module and I have a functional question (sorry maybe unrelated to this PR):

what is the reason to have the start/end fields in a tab accessible only through developer mode?

Or is there something I'm missing in the whole picture?

@pedrobaeza
Copy link
Member

Because setting them manually without the timeline view is not the usual way. Anyway, please enable technical features for all your users through base_technical_features module. Not having that one you miss a lot of info. I dislike a lot this decision from Odoo.

@francesco-ooops
Copy link
Contributor

Because setting them manually without the timeline view is not the usual way.

Sorry, what would be the "usual way"?

I don't understand the reason for adding fields to a tab hidden by default, unless is there another way to set start/end time for a task I'm not aware of

@pedrobaeza
Copy link
Member

As said, the timeline view, not the form view.

@francesco-ooops
Copy link
Contributor

francesco-ooops commented Sep 6, 2024

As said, the timeline view, not the form view.

Thanks, I understand now! Better documentation could have saved both of us some time :)

Would it be possible to use this PR to enhance USAGE in the following way:

A new "Timeline" view is added to both "Projects" and "Tasks" models.

Start / End dates for projects and tasks can be set respectively:

  • in the "Settings" tab for projects
  • in the "Extra Info" tab for tasks (only visible in developer mode).

Once dates have been set, they can be edited by drag and drop in timeline view.

@francesco-ooops
Copy link
Contributor

Because setting them manually without the timeline view is not the usual way.

Anyway this statement is not correct since when you create a new task, both "start date" and "end date" are not set

so task does not appear in timeline view and there's no way to set start/end without dev mode access

It's ok to keep it under dev mode (while I don't agree that it should be assumed everyone uses base_technical_features by default), I've updated the description accordingly.

@francesco-ooops
Copy link
Contributor

Furthermore (and then I'll stop as I don't want to hijack this PR) there's no constraint in setting end date before start date, resulting in glitchy behaviors in the view:

image

@pedrobaeza
Copy link
Member

@juanjosesegui-tecnativa please attend my comments.

@juanjosesegui-tecnativa juanjosesegui-tecnativa force-pushed the 14.0-imp-project_timeline-handling branch 3 times, most recently from 38f5973 to 1ca2713 Compare September 9, 2024 07:51
@juanjosesegui-tecnativa
Copy link
Author

@juanjosesegui-tecnativa please attend my comments.

Hi @pedrobaeza , if something is missing, I'm not sure what it could be. Could you tell me what else is needed for it to be correct?

@pedrobaeza pedrobaeza force-pushed the 14.0-imp-project_timeline-handling branch 2 times, most recently from d7ce46f to 66c9f75 Compare September 10, 2024 12:22
Copy link
Member

@pedrobaeza pedrobaeza left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have performed the final improvements.

@pedrobaeza pedrobaeza force-pushed the 14.0-imp-project_timeline-handling branch 2 times, most recently from 31524d3 to 594bcb4 Compare September 11, 2024 07:43
The fields `date_assign` and `date_end` can't be used, as they are
automatically rewritten on certain flow events (user assignation and
stage changed to finished one), so we need dedicated fields for the
planning. A previous change switches `date_assign` to `date_start`, but
it didn't change demo data, and better to use a consistent naming,
prefixing both fields with `planned_`.

This includes the migration scripts for preserving previous data, and
automations to fill planned data from the previous fields. It also
pre-fills planning information from assignation date/close date as a
best effort pre-planning for existing tasks.

TT50618

Co-Authored-By: Pedro M. Baeza <[email protected]>
@pedrobaeza pedrobaeza force-pushed the 14.0-imp-project_timeline-handling branch from 594bcb4 to 42bd28c Compare September 11, 2024 07:50
@pedrobaeza
Copy link
Member

/ocabot merge nobump

@juanjosesegui-tecnativa forward-port it to upper versions

@OCA-git-bot
Copy link
Contributor

On my way to merge this fine PR!
Prepared branch 14.0-ocabot-merge-pr-1335-by-pedrobaeza-bump-nobump, awaiting test results.

@OCA-git-bot OCA-git-bot merged commit 99806b3 into OCA:14.0 Sep 11, 2024
7 of 9 checks passed
@OCA-git-bot
Copy link
Contributor

Congratulations, your PR was merged at 0fc41f1. Thanks a lot for contributing to OCA. ❤️

@pedrobaeza pedrobaeza deleted the 14.0-imp-project_timeline-handling branch September 11, 2024 17:54
The Task timeline uses the "Planned Start Date" and "Planned End Date" fields, in the
"Extra Info" tab (only visible in debug mode).

When a user is assigned, and there's no planned start date, current datetime is filled
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

TBH this is working only when new task is created from kanban, but not from form: video

@juanjosesegui-tecnativa @pedrobaeza

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That seems a glitch of v14 + the widget. If you do it in 2 steps (create it, and the assign it), it should work. It's out of the scope of the module anyway. Update to newer versions of Odoo for ORM improvements.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure, it was just a heads up in case it happens in later versions

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants