hi
i want add college details in the signup form ,how to solve it
Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:
hi
i want add college details in the signup form ,how to solve it
Hello,
you have to inherit template = auth_signup.fields from auth_signup module. where you can add your field Like this :
<template id="signup_layout_replace" inherit_id="auth_signup.fields" name="sign up layout">
<xpath expr="t" position="replace">
<t t-call="web.database_select"/>
<div class="form-group field-login">
<label for="login" class="control-label">Your Email</label>
<input type="text" name="login" t-att-value="login" id="login" class="form-control" autofocus="autofocus"
required="required" t-att-readonly="'readonly' if only_passwords else None"/>
</div>
<div class="form-group field-name">
<label for="name" class="control-label">Your Name</label>
<input type="text" name="name" t-att-value="name" id="name" class="form-control" placeholder="e.g. John Doe"
required="required" t-att-readonly="'readonly' if only_passwords else None"
t-att-autofocus="'autofocus' if login and not only_passwords else None" />
</div>
<div class="form-group field-password">
<label for="password" class="control-label">Password</label>
<input type="password" name="password" id="password" class="form-control"
required="required" t-att-autofocus="'autofocus' if only_passwords else None"/>
</div>
<div class="form-group field-confirm_password">
<label for="confirm_password" class="control-label">Confirm Password</label>
<input type="password" name="confirm_password" id="confirm_password" class="form-control" required="required"/>
</div>
//New Field
<div class="form-group field-new">
<label for="label" class="control-label">Label</label>
<input type="text" name="label" id="label" class="form-control" required="required"/>
</div>
</t>
</xpath>
</template>
Hope this will help.
Hi parikshit,
I used the this but its not saved in my db
Yes. It will never save in your database, because there is a controller which only allows to save 3 fields ('login', 'name', 'password'). So you need to override this method and do some change: do_signup (auth_signup/controllers/main.py)