Update project_task.py

This commit is contained in:
zainab2097 2024-10-10 15:08:41 +03:00 committed by GitHub
parent 2d778c4b33
commit ffc4316289
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 5 additions and 2 deletions

View File

@ -56,8 +56,7 @@ class ProjectTask(models.Model):
_("Total planned hours for all tasks in stage %s must not exceed Total stage hours %s") % (
record.phase_id.display_name, record.phase_hours))
@api.onchange('stage_id', 'stage_id.is_closed')
def _compute_stage(self):
def _send_state_change_notification(self):
manager_users = self.env.ref('project.group_project_manager').users
department_manager_users = self.env.ref('project_base.group_project_department_manager').users
# Combine both user sets
@ -75,3 +74,7 @@ class ProjectTask(models.Model):
'author_id': self.env.user.partner_id and self.env.user.partner_id.id
})
@api.onchange('stage_id', 'stage_id.is_closed')
def _compute_stage(self):
self._send_state_change_notification()