summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThibault Delavallée <tde@odoo.com>2017-09-08 17:00:09 +0200
committerThibault Delavallée <tde@odoo.com>2017-09-08 18:59:25 +0200
commit028c99db68cc2bc91c9e993f68afe35ad936d67c (patch)
tree06fd05320f88f7b2a0076020619aa6f9b7a9d64f
parentc6aea4afc262a26c1ec7db6c5b81cc47527a2227 (diff)
[FIX] auth_signup: open correct user for access rights in settings
Actually the signup template user to open is configurable and come from an ir.config_parameter and is not necessarily the data created in auth_signup even if it is the default value.
-rw-r--r--addons/auth_signup/models/base_config_settings.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/addons/auth_signup/models/base_config_settings.py b/addons/auth_signup/models/base_config_settings.py
index 8e8999d91a7..81736c0fc07 100644
--- a/addons/auth_signup/models/base_config_settings.py
+++ b/addons/auth_signup/models/base_config_settings.py
@@ -40,6 +40,6 @@ class BaseConfigSettings(models.TransientModel):
@api.multi
def open_template_user(self):
action = self.env.ref('base.action_res_users').read()[0]
- action['res_id'] = self.env.ref('auth_signup.default_template_user').id
+ action['res_id'] = literal_eval(self.env['ir.config_parameter'].sudo().get_param('auth_signup.template_user_id', 'False'))
action['views'] = [[self.env.ref('base.view_users_form').id, 'form']]
return action