Odoo Help

0

0
1 Answer
1
Avatar

Thayif kabir

--Thayif kabir--

8870
| 6 3 9
Calicut, India
--Thayif kabir--


Thayif kabir
2/28/19, 1:19 AM

hello Bhuwan,

To send  the notification you can do like this in your code.

            class name:
           _inherit = 'mail.thread'

    code:
        self.env['mail.message'].create({'message_type':"notification",
                "subtype": self.env.ref("mail.mt_comment").id,
                'body': "Message body",
                'subject': "Message subject",
                'needaction_partner_ids': [(4, self.user_id.partner_id.id)],
                'model': self._name,
                'res_id': self.id,
                }
2 Comments
Bhuwan Khadka
2/28/19, 5:12 AM

will you tell me what I have to do before writing this code?

Thayif kabir
3/4/19, 1:31 AM

You need to define condition on which mail to be send

Ask a Question
Writer
Keep Informed
1 follower(s)
About This Community

This platform 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.

Register
Odoo Training Center

Access to our eLearning platform and experience all Odoo Apps through learning videos, use cases and quizzes.

Test it now