Skip to content

[19.0][ADD] project_task_stage_state_sync#1748

Open
IsabelAForgeFlow wants to merge 1 commit into
OCA:19.0from
ForgeFlow:19.0-add-project_task_stage_state_sync
Open

[19.0][ADD] project_task_stage_state_sync#1748
IsabelAForgeFlow wants to merge 1 commit into
OCA:19.0from
ForgeFlow:19.0-add-project_task_stage_state_sync

Conversation

@IsabelAForgeFlow

Copy link
Copy Markdown

Added project_task_stage_state_sync module

@OCA-git-bot OCA-git-bot added series:19.0 mod:project_task_stage_state_sync Module project_task_stage_state_sync labels Jun 15, 2026
@@ -0,0 +1,4 @@
# License AGPL-3 - See http://www.gnu.org/licenses/agpl-3.0.html

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

According to the OCA, you don't put a License [header] in __init__.py files.

@@ -0,0 +1,3 @@
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

According to the OCA, you don't put a License [header] in __init__.py files.

@@ -0,0 +1,3 @@
# License AGPL-3 - See http://www.gnu.org/licenses/agpl-3.0.html

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

According to the OCA, you don't put a License [header] in init.py files.

stage = self.project_id.type_ids.filtered(
lambda s: s.task_state == state and s.sync_state_to_stage
)[:1]
return stage or self.env["project.task.type"].search(

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

If there is no stage in the project that is configured with the wanted state, then it returns any stage of any other project that it is sync to the required state. Why would we want this? If we don't find a stage that is linked to that state in the project, shouldn't we simply return self.env["project.task.type"] ?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

You are right, I have changed this!

@IsabelAForgeFlow IsabelAForgeFlow force-pushed the 19.0-add-project_task_stage_state_sync branch from ff83649 to 0073908 Compare June 23, 2026 13:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

mod:project_task_stage_state_sync Module project_task_stage_state_sync series:19.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants