Skip to content

Commit

Permalink
[FIX] Unit test updating milestone with no project
Browse files Browse the repository at this point in the history
  • Loading branch information
lanto-razafindrabe committed Jun 11, 2024
1 parent f802d2f commit 2369c28
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions project_milestone_spent_hours/models/project_milestone.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ class ProjectMilestone(models.Model):
)

@api.depends(
"project_id",
"project_task_ids",
"project_task_ids.active",
"project_task_ids.milestone_id",
Expand Down
4 changes: 2 additions & 2 deletions project_milestone_spent_hours/tests/test_spent_hours.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,5 +70,5 @@ def test_update_milestone_total_hours_when_task_inactive(self):
assert self.milestone_2.total_hours == 0

def test_update_milestone_total_hours_when_remove_project(self):
self.milestone_1.write({"project_id": False})
assert self.milestone_1.total_hours == 0
self.milestone_1.project_id = False
assert self.milestone_1.total_hours == 0.0

0 comments on commit 2369c28

Please sign in to comment.