[19.0][ADD] project_task_stage_state_sync#1748
Conversation
| @@ -0,0 +1,4 @@ | |||
| # License AGPL-3 - See http://www.gnu.org/licenses/agpl-3.0.html | |||
There was a problem hiding this comment.
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). | |||
There was a problem hiding this comment.
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 | |||
There was a problem hiding this comment.
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( |
There was a problem hiding this comment.
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"] ?
There was a problem hiding this comment.
You are right, I have changed this!
ff83649 to
0073908
Compare
Added project_task_stage_state_sync module