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

[16.0][MIG]project_task_recurring_activity: migration to 16.0 #1323

Open
wants to merge 9 commits into
base: 16.0
Choose a base branch
from

Conversation

PicchiSeba
Copy link

No description provided.

dessanhemrayev and others added 3 commits August 8, 2024 10:03
This module allow users to add activities to the recurring tasks and have them automatically
duplicated within recurring tasks at set intervals.
Added form the model and add a button to call a private method
@PicchiSeba PicchiSeba force-pushed the 16.0-mig-project_task_recurring_activity branch from 6da6882 to b008502 Compare August 8, 2024 10:33
@PicchiSeba PicchiSeba marked this pull request as ready for review August 8, 2024 10:36
@PicchiSeba PicchiSeba force-pushed the 16.0-mig-project_task_recurring_activity branch from b008502 to 05f8935 Compare August 8, 2024 12:13
Copy link

@aleuffre aleuffre left a comment

Choose a reason for hiding this comment

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

Code review, LGTM

@rousseldenis
Copy link
Sponsor

/ocabot migration project_task_recurring_activity

@OCA-git-bot OCA-git-bot added this to the 16.0 milestone Sep 17, 2024
@OCA-git-bot OCA-git-bot mentioned this pull request Sep 17, 2024
36 tasks
@PicchiSeba PicchiSeba force-pushed the 16.0-mig-project_task_recurring_activity branch from 05f8935 to 2c3597b Compare September 24, 2024 14:59
@PicchiSeba PicchiSeba force-pushed the 16.0-mig-project_task_recurring_activity branch from ad7d1f2 to 3adc50e Compare September 26, 2024 10:09
@PicchiSeba
Copy link
Author

PicchiSeba commented Sep 26, 2024

Compared to the previous version, with the deletion of the onchange lines 83-84 of recurring_activity.py are never hit. Should we remove the check entirely or restore (at least a part of) the previous behavior?

@rousseldenis
Copy link
Sponsor

Compared to the previous version, with the deletion of the onchange lines 83-84 of recurring_activity.py are never hit. Should we remove the check entirely or restore part of the previous behavior?

No, that's ok, only the #84. I suppose because user_id is already set. If you want to improve coverage, do a test without assigning a user (or a default ?)

@PicchiSeba
Copy link
Author

PicchiSeba commented Sep 26, 2024

If you want to improve coverage, do a test without assigning a user (or a default ?)

With the current implementation it is not possible not to assign a user. That's why at the current state those checks are not useful. The issue lies in required=True.

Maybe we could remove that requirement from the field but maintain the same behavior.
For example we could add checks in the write method that, if not user is set, we use the one defined in activity_type_id, and if it doesn't have an user too then we raise an error.

@PicchiSeba PicchiSeba force-pushed the 16.0-mig-project_task_recurring_activity branch from 3adc50e to 54dab64 Compare October 4, 2024 07:58
@PicchiSeba
Copy link
Author

I removed the check for user_id because it was unnecessary

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

Successfully merging this pull request may close these issues.

7 participants