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

[18.0][MIG] hr_timesheet_task_domain: Migration to 18.0 #726

Open
wants to merge 19 commits into
base: 18.0
Choose a base branch
from

Conversation

BhaveshHeliconia
Copy link

No description provided.

@BhaveshHeliconia BhaveshHeliconia mentioned this pull request Jan 2, 2025
7 tasks
@BhaveshHeliconia BhaveshHeliconia force-pushed the 18.0-mig-hr_timesheet_task_domain branch from 71b43d4 to 3f4cf95 Compare January 2, 2025 10:24
@pilarvargas-tecnativa
Copy link

Please check CI

@BhaveshHeliconia BhaveshHeliconia force-pushed the 18.0-mig-hr_timesheet_task_domain branch from 3f4cf95 to a3382a9 Compare February 7, 2025 10:27
alexey-pelykh and others added 18 commits February 28, 2025 15:29
[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/
@BhaveshHeliconia BhaveshHeliconia force-pushed the 18.0-mig-hr_timesheet_task_domain branch from a3382a9 to e181e27 Compare February 28, 2025 10:00
@@ -0,0 +1 @@
from . import account_analytic_line_test
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
from . import account_analytic_line_test
from . import test_account_analytic_line_test

The test files must have the prefix test_.

@BhaveshHeliconia BhaveshHeliconia force-pushed the 18.0-mig-hr_timesheet_task_domain branch 2 times, most recently from 9a6ac85 to c49c684 Compare March 27, 2025 12:18
)

# Use Form to test domain
with Form(analytic_line) as line_form:
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
with Form(analytic_line) as line_form:
with Form(analytic_line, view="hr_timesheet.hr_timesheet_line_form") as line_form:

The way to avoid the error in the form and the task_id field would be this, but it is not really going to happen what you want to test. I think it is not possible to test this with a test in an easy way, because you would have to really test the domain of the task_id field and check if the task x applies in that domain or not, I think it is too “difficult” for the value it brings (because functionally it can be easily verified).

Copy link
Member

Choose a reason for hiding this comment

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

Reviewing the test again I see that it is not necessary, it doesn't add anything.
Don't get me wrong, it's great that you want to add a test and I value the effort to do it, but in this case, you are checking in a test that a task is defined and “nothing unexpected happens”, but really nothing is going to happen, only by interface is when you can see that a task x can not be selected.

Copy link
Author

@BhaveshHeliconia BhaveshHeliconia Mar 28, 2025

Choose a reason for hiding this comment

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

@victoralmau, Thank you for the feedback! I understand your point. Since the test doesn't add much value, we could consider removing it altogether. Alternatively, if you think there's a way to make the test more meaningful, I'd be happy to adjust it accordingly. Let me know what you prefer!

Copy link
Member

Choose a reason for hiding this comment

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

Although I love tests and they provide a lot of value, I think that in this specific case, it is better not to have them, functionally it is easy to verify the behavior of the module.

Copy link
Author

Choose a reason for hiding this comment

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

@victoralmau, Thank you! Please Review.

@BhaveshHeliconia BhaveshHeliconia force-pushed the 18.0-mig-hr_timesheet_task_domain branch from c49c684 to 3d2177c Compare March 28, 2025 09:48
@BhaveshHeliconia
Copy link
Author

@victoralmau, Please Review.it's Done.

@BhaveshHeliconia BhaveshHeliconia force-pushed the 18.0-mig-hr_timesheet_task_domain branch from 3d2177c to 24e1a58 Compare March 28, 2025 11:00
@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). 🤖

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.