diff --git a/controllers/main.py b/controllers/main.py index bf32fc50631025d5bb61d655b271880377334fbf..7c8ee7b2d60c5f1fa5544d15d3287c73e804e19d 100644 --- a/controllers/main.py +++ b/controllers/main.py @@ -1,6 +1,11 @@ from odoo import http, tools, _ +from odoo.addons.web.controllers.home import SIGN_UP_REQUEST_PARAMS + from odoo.addons.auth_signup.controllers.main import AuthSignupHome +# add firstname and lastname to qcontext whitelist +SIGN_UP_REQUEST_PARAMS.update({"firstname", "lastname"}) + class SolagroAuthSignupHome(AuthSignupHome): @http.route('/web/signup', type='http', auth='public', website=True, sitemap=False) def web_auth_signup(self, **post): diff --git a/views/auth_signup_login_templates.xml b/views/auth_signup_login_templates.xml index 5ef96e892c33bdc3873965c4d5e4fdd3a554c632..3638e232bdd64052954437795327ad48b9b882c3 100644 --- a/views/auth_signup_login_templates.xml +++ b/views/auth_signup_login_templates.xml @@ -15,6 +15,7 @@ <xpath expr="//input[@id='login']" position="attributes"> <attribute name="type">email</attribute> <attribute name="name">email</attribute> + <attribute name="t-att-value">email</attribute> <attribute name="t-attf-class">form-control {{'is-invalid' if error_email else ''}}</attribute> </xpath>