Skip to content

Commit

Permalink
[14.0][FIX] project_milestone : Wrong assignment of tasks to mileston…
Browse files Browse the repository at this point in the history
…es when duplicating a project OCA#1283
  • Loading branch information
abenzbiria committed May 20, 2024
1 parent 2134030 commit b9157bd
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions project_milestone/tests/test_project_milestone.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,3 +65,10 @@ def test_sub_task(self):
with Form(Task) as task:
task.project_id = self.test_project
task.name = "SubTask"

def test_copy_project(self):
project = self.test_project.copy({})
tasks = project.with_context(active_test=False).task_ids
milestone = project.milestone_ids.filtered(
lambda milestone: "2" not in milestone.name)
assert tasks[0].milestone_id == milestone and tasks[1].milestone_id == milestone

0 comments on commit b9157bd

Please sign in to comment.