Skip to Content
Menu
This question has been flagged

Let's say we have Odoo User A (a user in res.users). Their e-mail is OdooUserA@gmail.com.

Let's say Random Customer 1, who may or may not be a res.partner / contact in Odoo, sends an e-mail directly to OdooUserA@gmail.com.

Odoo User gets this e-mail, they know it should be associated with a specific res.partner / crm.lead / project.task – or such. How can they forward this e-mail into Odoo and have it recognized? Specifically, recognized in chatter, as a mail.message, so it can appear underneath the proper record.

From what I can see, when Odoo sends an e-mail, it uses the following headers to know which model and which id to associate with:


X-Odoo-Objects: crm.lead-5962 

X-Odoo-db-uuid: 029017e4-1590-11e8-876a-705681c369f7


If I could send an actual e-mail to mymainodooaccount@gmail.com, and do something like this:  mymainodooaccount+crm.lead-193@gmail.com, then I could display this e-mail on the actual record in a view, and Odoo users know where to forward e-mails in this scenario. That would be ideal.

In actuality, we're using Google Apps, so we're using Google's SMTP server and POP with a single Odoo e-mail (eg. odoo@ourdomain.com). Odoo 11. Thank you – 

Avatar
Discard
Author

After many, many hours on this: looks like I can inherit mail.thread and extend message_process. In there, I have these arguments:

```

@api.model

def message_process(self, model, message, custom_values=None,

save_original=False, strip_attachments=False,

thread_id=None):

```

I can pass a model (str) and thread_id (int) – this is considered a fallback. While I see it getting used in the logs, I don't see my message appear there. Been at this for days, would love any other feedback. Wondering if this is a bug with the fallback.

Hi foo. Would be interested if you ever accomplished this and found an answer? We're having the same trouble.

Hello you can use this module for that https://apps.odoo.com/apps/modules/15.0/mail_to_record/
it uses the mail aliases to create rules for incoming emails and will try to find a record by name or email in the subject in format [Document Name] or [ID]

Did either of you have any luck? (Calgavin or foo?)

I'd love to find a solution that skips the manually assigned [id] of the mail to record app above and just looks at the contact email (and ideally an alternate email if they have one). Or ideas where to next would be super appreciated if you ended up working with someone on this.

Related Posts Replies Views Activity
0
Dec 23
565
2
Aug 19
2853
1
Nov 17
3801
0
Feb 24
415
1
Sep 21
4856