Ir al contenido
Menú
Se marcó esta pregunta
3796 Vistas

Hello, I'm using Odoo 10. And I've just add a phone field on the signup page since the default signup page only asks users to enter their name, email and password.
I've tried following the instruction in the link here https://www.odoo.com/forum/help-1/question/how-to-capture-additional-fields-on-signup-74161, but it's not working for me.
I even tried hard-coding the controller file, main.py, in the do_signup function,
              def do_signup(self, qcontext):

        """ Shared helper that creates a res.partner out of a token """

        values = dict((key, qcontext.get(key)) for key in ('login', 'name', 'password'))

        assert any([k for k in values.values()]), "The form was not properly filled in."

        assert values.get('password') == qcontext.get('confirm_password'), "Passwords do not match; please retype them."

        self._signup_with_values(qcontext.get('token'), values) 
and it didn't work. I tried adding next to password and the value is not added into the database.
Can someone tell me how to make a custom module to inherit main.py, do_signup function in auth_signup folder step by step? Thank you!

Avatar
Descartar
Publicaciones relacionadas Respuestas Vistas Actividad
3
jul 24
29975
1
dic 21
5538
3
abr 18
6414
2
feb 18
3466
1
jul 17
4342