Skip to Content
Menu
This question has been flagged
2831 Views

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
Discard
Related Posts Replies Views Activity
3
Jul 24
27563
1
Dec 21
3557
3
Apr 18
4960
2
Feb 18
2135
1
Jul 17
3192