Bỏ qua để đến Nội dung
Menu
Câu hỏi này đã bị gắn cờ
1 Trả lời
4130 Lượt xem

I'm trying to send a custom message notification to user that signup via the signup page. I plan to place that code just after the user as been created. Here's the controller extending the AuthSignHome controller :

_logger = logging.getLogger(__name__)

class AuthSignupHome(openerp.addons.web.controllers.main.Home):

    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', 'document_attestation'))
            assert any([k for k in values.values()]), "Le formulaire n'est pas correctement remplis."
            assert values.get('password') == qcontext.get('confirm_password'), "Les mot de passe ne concorde pas."
            self._signup_with_values(qcontext.get('token'), values)

            // SEND GREETING MESSAGE

            request.cr.commit()

How can it be done ?

Ảnh đại diện
Huỷ bỏ
Câu trả lời hay nhất

See this question:

https://www.odoo.com/forum/help-1/question/how-to-send-an-email-after-login-92692

Ảnh đại diện
Huỷ bỏ
Bài viết liên quan Trả lời Lượt xem Hoạt động
2
thg 12 15
635
0
thg 3 15
3483
1
thg 3 15
4499
3
thg 6 24
1581
1
thg 6 24
2499