Skip to content

Commit

Permalink
[FIX] With context on return create
Browse files Browse the repository at this point in the history
  • Loading branch information
valentincastravete committed Nov 28, 2023
1 parent 81e5605 commit f563290
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,7 @@ def create(self, vals):
user_id = self.env['res.users'].browse(self._context['uid'])
if not user_id.project_disable_auto_subscribe:
return super().create(vals)
return super().with_context(mail_create_nosubscribe=True).create(vals)
return super(
Project,
self.with_context(mail_create_nosubscribe=True)
).create(vals)
5 changes: 4 additions & 1 deletion project_task_disable_auto_subscribe/models/project_task.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,7 @@ def create(self, vals):
user_id = self.env['res.users'].browse(self._context['uid'])
if not user_id.project_task_disable_auto_subscribe:
return super().create(vals)
return super().with_context(mail_create_nosubscribe=True).create(vals)
return super(
ProjectTask,
self.with_context(mail_create_nosubscribe=True)
).create(vals)

0 comments on commit f563290

Please sign in to comment.