Skip to Content
Menu
This question has been flagged

I create a custom module that should receive mail incoming mail. After configuring the Incoming Mail Servers I tested it with the creating ticket in helpdesk but when I use my module nothing happens not receiving log am don't something wrong

Thank you for the help

```

from odoo import api, fields, models, tools, _
import logging
_logger = logging.getLogger(__name__)


class TestMailer(models.Model):
_name = 'test.mailer'
_inherit = ['mail.alias.mixin','mail.thread', 'mail.activity.mixin']
_description = 'Sort Email'


name = fields.Char(string='Name')
email_from = fields.Char(string='email from')
email_cc = fields.Char(string='email cc')
mail_body = fields.Text(string='mail body')
partner_id = fields.Many2one('res.partner', 'Partner',required=True,select=True)

@api.model
def message_new(msg_dict, custom_values=None):
# def message_new(self, msg, custom_values=None):
_logger.warning('hi i am message_new')
```

I get this when I fetch now in Incoming Mail Servers.

```

odoo.addons.mail.models.mail_thread: Routing mail from "name"  to test_sort@email.net,"test_sort@email.net"  with Message-Id : fallback to model:test.mailer, thread_id:None, custom_values:None, uid:2


```


Avatar
Discard
Related Posts Replies Views Activity
1
May 22
3116
0
Nov 21
21
0
Nov 21
2382
1
Jan 23
1682
1
Aug 22
1400