summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThibault Delavallée <tde@openerp.com>2015-12-18 11:35:05 +0100
committerThibault Delavallée <tde@openerp.com>2015-12-18 13:30:13 +0100
commit52e18acbc895ca2decf0ca12872e6334707ae2df (patch)
treef399eb474c636df401693f24cfa6667db5f310dc
parentdf2d0c4f10abf18ca674b649a8fdf3f187e71932 (diff)
[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.
-rw-r--r--addons/mail/models/res_users.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/addons/mail/models/res_users.py b/addons/mail/models/res_users.py
index b803f3c47ee..e390b72da14 100644
--- a/addons/mail/models/res_users.py
+++ b/addons/mail/models/res_users.py
@@ -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