[FIX] website: add missing link to template user for auth signup in settings
This commit is contained in:
@@ -1,6 +1,8 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
# Part of Odoo. See LICENSE file for full copyright and licensing details.
|
||||
|
||||
from ast import literal_eval
|
||||
|
||||
from odoo import api, fields, models
|
||||
from odoo.exceptions import AccessDenied
|
||||
|
||||
@@ -101,3 +103,10 @@ class WebsiteConfigSettings(models.TransientModel):
|
||||
set_param('website.has_google_analytics_dashboard', self.has_google_analytics_dashboard)
|
||||
set_param('website.has_google_maps', self.has_google_maps)
|
||||
set_param('google_maps_api_key', (self.google_maps_api_key or '').strip())
|
||||
|
||||
@api.multi
|
||||
def open_template_user(self):
|
||||
action = self.env.ref('base.action_res_users').read()[0]
|
||||
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
|
||||
|
||||
@@ -158,6 +158,11 @@
|
||||
<div class="mt8">
|
||||
<field name="auth_signup_uninvited" widget="radio" required="True"/>
|
||||
</div>
|
||||
<div class="content-group">
|
||||
<div class="mt16">
|
||||
<button type="object" name="open_template_user" string="Default Access Rights" icon="fa-arrow-right" class="btn-link"/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user