Odoo Help

Welcome!

This community is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.

0

How to programmatically send a message with Odoo 8.0

By
Alexandre Boudreault
on 12/11/15, 2:14 PM 451 views

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 ?

1

zbik

--zbik--
5941
| 6 4 7
Lodz, Poland
--zbik--


zbik
On 12/12/15, 5:51 AM

See this question:

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

Your Answer

Please try to give a substantial answer. If you wanted to comment on the question or answer, just use the commenting tool. Please remember that you can always revise your answers - no need to answer the same question twice. Also, please don't forget to vote - it really helps to select the best questions and answers!

About This Community

This community is for professionals and enthusiasts of our products and services. Read Guidelines

Question tools

1 follower(s)

Stats

Asked: 12/11/15, 2:14 PM
Seen: 451 times
Last updated: 12/14/15, 1:47 PM