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

[17.0][MIG] hr_timesheet_task_domain: Migration to 17.0 #721

Merged
merged 18 commits into from
Nov 12, 2024

Conversation

victoralmau
Copy link
Member

@victoralmau victoralmau commented Nov 6, 2024

Migration to 17.0

Please @pilarvargas-tecnativa and @carlos-lopez-tecnativa can you review it?

@Tecnativa TT51531

alexey-pelykh and others added 17 commits November 6, 2024 12:13
[ADD] icon.png

[UPD] Update hr_timesheet_task_domain.pot
Translated using Weblate (German)

Currently translated at 100.0% (1 of 1 strings)

Translation: timesheet-12.0/timesheet-12.0-hr_timesheet_task_domain
Translate-URL: https://translation.odoo-community.org/projects/timesheet-12-0/timesheet-12-0-hr_timesheet_task_domain/de/
It's `project.task.type`, not `project.stage`.
Translated using Weblate (French)

Currently translated at 75.0% (3 of 4 strings)

Translation: timesheet-14.0/timesheet-14.0-hr_timesheet_task_domain
Translate-URL: https://translation.odoo-community.org/projects/timesheet-14-0/timesheet-14-0-hr_timesheet_task_domain/fr/
Currently translated at 100.0% (4 of 4 strings)

Translation: timesheet-15.0/timesheet-15.0-hr_timesheet_task_domain
Translate-URL: https://translation.odoo-community.org/projects/timesheet-15-0/timesheet-15-0-hr_timesheet_task_domain/fr/
Translated using Weblate (Italian)

Currently translated at 100.0% (1 of 1 strings)

Translation: timesheet-15.0/timesheet-15.0-hr_timesheet_task_domain
Translate-URL: https://translation.odoo-community.org/projects/timesheet-15-0/timesheet-15-0-hr_timesheet_task_domain/it/
[UPD] Update hr_timesheet_task_domain.pot

[UPD] README.rst

Update translation files

Updated by "Update PO files to match POT (msgmerge)" hook in Weblate.

Translation: timesheet-16.0/timesheet-16.0-hr_timesheet_task_domain
Translate-URL: https://translation.odoo-community.org/projects/timesheet-16-0/timesheet-16-0-hr_timesheet_task_domain/
Currently translated at 100.0% (2 of 2 strings)

Translation: timesheet-16.0/timesheet-16.0-hr_timesheet_task_domain
Translate-URL: https://translation.odoo-community.org/projects/timesheet-16-0/timesheet-16-0-hr_timesheet_task_domain/it/
Currently translated at 100.0% (2 of 2 strings)

Translation: timesheet-16.0/timesheet-16.0-hr_timesheet_task_domain
Translate-URL: https://translation.odoo-community.org/projects/timesheet-16-0/timesheet-16-0-hr_timesheet_task_domain/es/

[UPD] README.rst
Translated using Weblate (Portuguese (Brazil))

Currently translated at 100.0% (2 of 2 strings)

Translation: timesheet-16.0/timesheet-16.0-hr_timesheet_task_domain
Translate-URL: https://translation.odoo-community.org/projects/timesheet-16-0/timesheet-16-0-hr_timesheet_task_domain/pt_BR/
Copy link

@carlos-lopez-tecnativa carlos-lopez-tecnativa left a comment

Choose a reason for hiding this comment

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

@victoralmau I've updated my review. I noticed that the hr_timesheet_sheet module explicitly adds a domain in the view, and it works fine in other places. Apologies for the confusion.

What are your thoughts on using the state field instead of the stage_id.folded field?

domain="[('project_id', '=', project_id)]"

@victoralmau
Copy link
Member Author

What are your thoughts on using the state field instead of the stage_id.folded field?

IMO that would be totally wrong, the state field is a text field that does not allow us to filter what we are really interested in, the stages that have been defined as fold (totally customized according to the ones that have been defined, there is not only 'Done').

@pilarvargas-tecnativa
Copy link

ping @carlos-lopez-tecnativa

@carlos-lopez-tecnativa
Copy link

What are your thoughts on using the state field instead of the stage_id.folded field?

IMO that would be totally wrong, the state field is a text field that does not allow us to filter what we are really interested in, the stages that have been defined as fold (totally customized according to the ones that have been defined, there is not only 'Done').

I understand your point. I was just referring to the new flow introduced in Odoo 17. If you check the Open Task filter, it uses the state field, regardless of whether the stage is folded or not, and the README mentions "Open."

But to avoid delaying the merge further, I'm okay with proceeding as is.
image
image
image

@OCA-git-bot
Copy link
Contributor

This PR has the approved label and has been created more than 5 days ago. It should therefore be ready to merge by a maintainer (or a PSC member if the concerned addon has no declared maintainer). 🤖

@pedrobaeza
Copy link
Member

Yes, indeed the move on Odoo is a bit weird, but anyway, let's keep this module with the previous approach. Let's just rephrase the README to mention folded stages instead of open tasks.

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.

Uhm, checking again the original Odoo PR specs: odoo/odoo#107593, we would twist the expected way of working relying on stages, so let's switch to the states, and we will fill the gap with a module setting the state when changing the stage.

@victoralmau victoralmau force-pushed the 17.0-mig-hr_timesheet_task_domain branch from 1ebefbc to d457fb7 Compare November 12, 2024 08:21
@victoralmau
Copy link
Member Author

Changes done.

Copy link

@carlos-lopez-tecnativa carlos-lopez-tecnativa left a comment

Choose a reason for hiding this comment

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

I may be missing something, as this should theoretically work. However, this project has three tasks—one closed and two open—yet nothing is being displayed.

image

image

@victoralmau victoralmau force-pushed the 17.0-mig-hr_timesheet_task_domain branch from d457fb7 to c51cdfd Compare November 12, 2024 16:49
Copy link

@carlos-lopez-tecnativa carlos-lopez-tecnativa left a comment

Choose a reason for hiding this comment

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

LGTM, thanks!

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.

/ocabot migration hr_timesheet_task_domain
/ocabot merge nobump

@OCA-git-bot OCA-git-bot added this to the 17.0 milestone Nov 12, 2024
@OCA-git-bot OCA-git-bot mentioned this pull request Nov 12, 2024
13 tasks
@OCA-git-bot
Copy link
Contributor

What a great day to merge this nice PR. Let's do it!
Prepared branch 17.0-ocabot-merge-pr-721-by-pedrobaeza-bump-nobump, awaiting test results.

@OCA-git-bot
Copy link
Contributor

This PR has the approved label and has been created more than 5 days ago. It should therefore be ready to merge by a maintainer (or a PSC member if the concerned addon has no declared maintainer). 🤖

@OCA-git-bot OCA-git-bot merged commit 84494cf into OCA:17.0 Nov 12, 2024
7 checks passed
@OCA-git-bot
Copy link
Contributor

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

@pedrobaeza pedrobaeza deleted the 17.0-mig-hr_timesheet_task_domain branch November 12, 2024 18:29
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.