Skip to content

Commit

Permalink
Merge pull request #331 from SDIsl/12.0-quick_fix
Browse files Browse the repository at this point in the history
[FIX] With context on return create
  • Loading branch information
valentincastravete authored Nov 28, 2023
2 parents 6075855 + f563290 commit a0aed97
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 a0aed97

Please sign in to comment.