Skip to content

Commit

Permalink
[IMP] project_ux: change to send the stage change message to task fol…
Browse files Browse the repository at this point in the history
…lowers

closes #111

X-original-commit: 31b0c4a
Signed-off-by: Nicolas Mac Rouillon <nmr@adhoc.com.ar>
  • Loading branch information
vib-adhoc committed Feb 10, 2023
1 parent 3776a8b commit 78d51d3
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions project_ux/models/project_task.py
Expand Up @@ -19,6 +19,11 @@ class Task(models.Model):
def _track_template(self, changes):
task = self[0]
res = super()._track_template(changes)
if 'stage_id' in changes and task.stage_id.mail_template_id:
res['stage_id'] = (task.stage_id.mail_template_id, {
'message_type': 'comment',
'auto_delete_message': True,
'email_layout_xmlid': 'mail.mail_notification_light'})
if 'stage_id' in res and task.dont_send_stage_email and task.stage_id.mail_template_id:
res.pop('stage_id')
task.dont_send_stage_email = False
Expand Down

0 comments on commit 78d51d3

Please sign in to comment.