diff --git a/controllers/main.py b/controllers/main.py index 731f6a0d44be5cfc8b2876de26ac6ea703a94542..e78a07289e9ff8acc153b15bc58b83950b1a4ab8 100644 --- a/controllers/main.py +++ b/controllers/main.py @@ -1,7 +1,6 @@ from odoo import http, tools, _ from odoo.addons.auth_signup.controllers.main import AuthSignupHome - class SolagroAuthSignupHome(AuthSignupHome): @http.route('/web/signup', type='http', auth='public', website=True, sitemap=False) def web_auth_signup(self, **post): @@ -16,7 +15,8 @@ class SolagroAuthSignupHome(AuthSignupHome): if post and http.request.httprequest.method == 'POST': firstname = post.get('firstname') lastname = post.get('lastname') - post["name"] = firstname + " " + lastname + # compute name using partner_firstname method + post["name"] = http.request.env['res.partner']._get_computed_name(firstname, lastname) # update request params because super() uses this instead of kwargs http.request.params.update(post) return super().web_auth_signup(**post)