[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.
This commit is contained in:
Thibault Delavallée
2017-09-08 18:59:25 +02:00
parent c6aea4afc2
commit 028c99db68
@@ -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