Skip to content
Snippets Groups Projects
Commit 52e18acb authored by Thibault Delavallée's avatar Thibault Delavallée
Browse files

[FIX] mail: res_users: context update in create

Context was a new one instead of updating the existing one. This was
preventing a correct context propagation.
parent df2d0c4f
No related branches found
No related tags found
No related merge requests found
......@@ -47,10 +47,10 @@ class Users(models.Model):
msg = _("You cannot create a new user from here.\n To create new user please go to configuration panel.")
raise openerp.exceptions.RedirectWarning(msg, action.id, _('Go to the configuration panel'))
user = super(Users, self.with_context({
'alias_model_name': self._name,
'alias_parent_model_name': self._name
})).create(values)
user = super(Users, self.with_context(
alias_model_name=self._name,
alias_parent_model_name=self._name
)).create(values)
user.alias_id.sudo().write({"alias_force_thread_id": user.id, "alias_parent_thread_id": user.id})
# create a welcome message
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment