title: Odoo 12: How to send a Inbox message to Specific User?
body: <p>I need to send a inbox message when I call this function, but I just get error ...</p>
  <pre class="lang-py prettyprint-override"><code>from odoo import models, fields, api, _
  
  class MyModel(models.Model):
      _inherit = ['mail.thread']
  
      
      def inbox_message(self):
          notification_ids = [(0, 0, {
              'res_partner_id': self.user_id.partner_id.id,
              'notification_type': 'inbox'
          })]
          self.message_post(body='This picking has been validated!', message_type=&quot;notification&quot;,
                            subtype=&quot;mail.mt_comment&quot;, author_id=self.env.user.partner_id.id,
                            notification_ids=notification_ids)
  
  </code></pre>
  <p>And it's returning this error:
  <code>An error occurred when sending an email</code></p>