xml file
<template id="auth_signup.signup" name="Sign up login">
<t t-call="web.login_layout">
<form class="oe_signup_form" role="form" method="post" t-if="not message">
<input type="hidden" name="csrf_token" t-att-value="request.csrf_token()"/>
<t t-call="auth_signup.fields">
<t t-set="only_passwords" t-value="bool(token and not invalid_token)"/>
</t>
<p class="alert alert-danger" t-if="error" role="alert">
<t t-esc="error"/>
</p>
<input type="hidden" name="redirect" t-att-value="redirect"/>
<input type="hidden" name="token" t-att-value="token"/>
<div class="text-center oe_login_buttons pt-3">
<button type="submit" class="btn btn-primary btn-block"> Sign up</button>
<a t-attf-href="/web/login?{{ keep_query() }}" class="btn btn-link btn-sm" role="button">Already have an account?</a>
<div class="o_login_auth"/>
</div>
</form>
</t>
</template>
What im trying to do is i need to super the form submit into my custom module and i need to create a record in model A with the login data that user provide while they enter the login datas and sign up. Please feel free to ask if my explanation is unclear.Thanks,
You need to override the web_auth_signup method and get login data from kw
dict.
from odoo.addons.auth_signup.controllers.main import AuthSignupHome
class CustomAuthSignupHome(AuthSignupHome):
@http.route('/web/signup', type='http', auth='public', website=True, sitemap=False)
def web_auth_signup(self, *args, **kw):
response = super(CustomAuthSignupHome, self).web_auth_signup(*args, **kw)
# {'login': 'user', 'name': 'User', 'password': 'aL=5&A3#C"H([Sdr', 'confirm_password': 'aL=5&A3#C"H([Sdr', 'redirect': '', 'token': ''}
return response