Passa al contenuto
Menu
È necessario essere registrati per interagire con la community.
La domanda è stata contrassegnata
3540 Visualizzazioni

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
Abbandona
Post correlati Risposte Visualizzazioni Attività
3
lug 24
29564
1
dic 21
5166
3
apr 18
6033
2
feb 18
3209
1
lug 17
4077